diff --git a/src/Makefile.am b/src/Makefile.am index b813c42bd08e67033975b44080f5849715cbdf45..008433110350ad52dc785d761baa87085705092f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -208,6 +208,7 @@ nobase_noinst_HEADERS = align.h approx_math.h atomic.h barrier.h cycle.h error.h riemann/riemann_hllc.h riemann/riemann_trrs.h \ riemann/riemann_exact.h riemann/riemann_vacuum.h \ riemann/riemann_checks.h \ + rt.h rt/none/rt.h rt/debug/rt.h rt/M1closure/rt.h \ stars.h stars_io.h \ stars/Default/stars.h stars/Default/stars_iact.h stars/Default/stars_io.h \ stars/Default/stars_debug.h stars/Default/stars_part.h stars/Default/stars_logger.h \ diff --git a/src/rt.h b/src/rt.h new file mode 100644 index 0000000000000000000000000000000000000000..f318542f75ce5e4795947cb2ef5f360694b42130 --- /dev/null +++ b/src/rt.h @@ -0,0 +1,41 @@ +/******************************************************************************* + * This file is part of SWIFT. + * Copyright (c) 2020 Mladen Ivkovic (mladen.ivkovic@hotmail.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + ******************************************************************************/ +#ifndef SWIFT_RT_H +#define SWIFT_RT_H + +/** + * @file src/rt.h + * @brief Branches between the different radiative transfer schemes. + */ + +/* Config parameters. */ +#include "../config.h" + +/* Import the right cooling definition */ +#if defined(RT_NONE) +#include "./rt/none/rt.h" +#elif defined(RT_DEBUG) +#include "./rt/debug/rt.h" +#elif defined(RT_M1) +#include "./rt/M1closure/rt.h" +#else +#error "Invalid choice of radiation scheme" +#endif + +#endif /* SWIFT_RT_H */ diff --git a/src/rt/M1closure/rt.h b/src/rt/M1closure/rt.h new file mode 100644 index 0000000000000000000000000000000000000000..5a9f2e3e8d890bbf693f4a4fc321b51a3acf6e24 --- /dev/null +++ b/src/rt/M1closure/rt.h @@ -0,0 +1,32 @@ +/******************************************************************************* + * This file is part of SWIFT. + * Copyright (c) 2020 Mladen Ivkovic (mladen.ivkovic@hotmail.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + ******************************************************************************/ +#ifndef SWIFT_RT_M1_H +#define SWIFT_RT_M1_H + +/** + * @file src/rt/M1closure/rt.h + * @brief Main header file for the M1 Closure radiative transfer scheme. + */ + +/** + * @brief Dummy function to test whether inclusions work properly. + */ +void rt_dummy_function(void) { message("Called M1 closure RT scheme."); } + +#endif /* SWIFT_RT_M1_H */ diff --git a/src/rt/debug/rt.h b/src/rt/debug/rt.h new file mode 100644 index 0000000000000000000000000000000000000000..230bc458adb3a200dc41afca493d39af216bc878 --- /dev/null +++ b/src/rt/debug/rt.h @@ -0,0 +1,32 @@ +/******************************************************************************* + * This file is part of SWIFT. + * Copyright (c) 2020 Mladen Ivkovic (mladen.ivkovic@hotmail.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + ******************************************************************************/ +#ifndef SWIFT_RT_DEBUG_H +#define SWIFT_RT_DEBUG_H + +/** + * @file src/rt/debug/rt.h + * @brief Main header file for the debug radiative transfer scheme. + */ + +/** + * @brief Dummy function to test whether inclusions work properly. + */ +void rt_dummy_function(void) { message("Called debug RT scheme."); } + +#endif /* SWIFT_RT_DEBUG_H */ diff --git a/src/rt/none/rt.h b/src/rt/none/rt.h new file mode 100644 index 0000000000000000000000000000000000000000..f35052adb1d7b2538990c536f3febb1020f31206 --- /dev/null +++ b/src/rt/none/rt.h @@ -0,0 +1,32 @@ +/******************************************************************************* + * This file is part of SWIFT. + * Copyright (c) 2020 Mladen Ivkovic (mladen.ivkovic@hotmail.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + ******************************************************************************/ +#ifndef SWIFT_RT_NONE_H +#define SWIFT_RT_NONE_H + +/** + * @file src/rt/debug/rt.h + * @brief Main header file for no radiative transfer scheme. + */ + +/** + * @brief Dummy function to test whether inclusions work properly. + */ +void rt_dummy_function(void) { message("Called no RT scheme."); } + +#endif /* SWIFT_RT_NONE_H */ diff --git a/src/swift.h b/src/swift.h index ad16acf3758abfe783a7bf986e15691f1c9096c6..4237bfab323813a06994c1ae2e5e025d8da7d22c 100644 --- a/src/swift.h +++ b/src/swift.h @@ -75,6 +75,7 @@ #include "queue.h" #include "random.h" #include "restart.h" +#include "rt.h" #include "runner.h" #include "scheduler.h" #include "serial_io.h"