From d3b1994c5ade1da26c70dc48f2e15565b6a36d98 Mon Sep 17 00:00:00 2001 From: Mladen Ivkovic <mladen.ivkovic@hotmail.com> Date: Tue, 8 Nov 2022 16:14:24 +0000 Subject: [PATCH] GEARRT tiny fix. --- doc/RTD/source/RadiativeTransfer/GEAR_RT.rst | 2 +- src/rt/GEAR/rt_thermochemistry_utils.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/RTD/source/RadiativeTransfer/GEAR_RT.rst b/doc/RTD/source/RadiativeTransfer/GEAR_RT.rst index dc0fa6c9bd..58dde33968 100644 --- a/doc/RTD/source/RadiativeTransfer/GEAR_RT.rst +++ b/doc/RTD/source/RadiativeTransfer/GEAR_RT.rst @@ -30,7 +30,7 @@ Compiling for GEAR RT you to select a hydro Riemann solver, e.g ``--with-riemann-solver=hllc``. - The thermochemistry requires the `grackle <https://github.com/grackle-project/grackle>`_ - library. Grackle is a chemistry and cooling library presented in + library version 3.2. Grackle is a chemistry and cooling library presented in `B. Smith et al. 2017 <https://ui.adsabs.harvard.edu/abs/2017MNRAS.466.2217S>`_. Please note that the current implementation is not (yet) as advanced as the :ref:`GEAR subgrid model grackle cooling <gear_grackle_cooling>`, diff --git a/src/rt/GEAR/rt_thermochemistry_utils.h b/src/rt/GEAR/rt_thermochemistry_utils.h index 7b88032ffb..5808134713 100644 --- a/src/rt/GEAR/rt_thermochemistry_utils.h +++ b/src/rt/GEAR/rt_thermochemistry_utils.h @@ -239,17 +239,17 @@ rt_tchem_set_particle_radiation_field_for_test( const double time_to_cgs = units_cgs_conversion_factor(us, UNIT_CONV_TIME); const double t_Myr = time * time_to_cgs / (3600. * 24. * 365. * 1e6); - double fixed_fluxes[RT_NGROUPS]; - for (int g = 0; g < RT_NGROUPS; g++) fixed_fluxes[g] = 0.; + /* NOTE: this assumes that the test is set up with 3 photon groups. */ + double fixed_fluxes[3]; + for (int g = 0; g < 3; g++) fixed_fluxes[g] = 0.; if (t_Myr < 0.5) { /* Be vocal, just in case somebody forgets you exist. */ if (p->id == 1) message("Setting fixed radiation field."); /* Set fixed radiation fields, in cgs*/ - fixed_fluxes[0] = 0.; - fixed_fluxes[1] = 1.350e01; - fixed_fluxes[2] = 2.779e01; - fixed_fluxes[3] = 6.152e00; + fixed_fluxes[0] = 1.350e01; + fixed_fluxes[1] = 2.779e01; + fixed_fluxes[2] = 6.152e00; } const double flux_to_cgs = -- GitLab