Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
390 commits
Select commit Hold shift + click to select a range
3874332
Updated test problems' idefix.ini and testme.py
nscepi Nov 29, 2024
fea87b8
Changed name of pulse *.ini
nscepi Nov 29, 2024
061630e
Remove some headers to avoid circular dependencies
nscepi Nov 29, 2024
0579d4a
Add flux irradiation in source solver instead of setup.cpp
nscepi Dec 2, 2024
eed9877
Add irradiation heating into fixed_point_rad solver
nscepi Dec 3, 2024
f77c5d0
Update and clean stellar_irradiation test problem
nscepi Dec 3, 2024
e4618e3
Put haveIrradiation flag to switch on/off irradiation
nscepi Dec 4, 2024
2884d33
Add irr_flag to fix_point_rad solver
nscepi Dec 4, 2024
b0df3c3
Add Internal Boundary on conservative variables and tau in dumps
nscepi Dec 4, 2024
ee8ae7a
Add comments
nscepi Dec 4, 2024
ccd60a6
Clean idefix.ini
nscepi Dec 4, 2024
e8ef357
Change solver to full_implicit
nscepi Dec 4, 2024
7b06d66
Change tolerance according to MPI or not because of computation of co…
nscepi Dec 4, 2024
6c209c8
Add EXPANDs in initializations of variables in radsource.cpp
nscepi Dec 4, 2024
eac8886
Add different decomposition according to dimension in testme.py
nscepi Dec 4, 2024
90df1a6
Add testme.py to mhd_blast test
nscepi Dec 6, 2024
7b15500
cleaning up useless config files
glesur Dec 9, 2024
40905e5
more cleanup
glesur Dec 9, 2024
0202140
Merge branch 'master' into commercon_source_term
nscepi Dec 10, 2024
8944074
Cleaned radsource and removed some implicit calls to this pointer
nscepi Dec 10, 2024
8c0256b
Move kappa calculation out of while loop in fixed_point_rad
nscepi Dec 10, 2024
9dc8ddb
Add local copy of unit Class in radsource.cpp and radsource.hpp
nscepi Dec 11, 2024
6282c6a
Change names of functions to Idefix convention
nscepi Dec 11, 2024
888c09d
Change names of function according to Idefix's convention
nscepi Dec 11, 2024
8d131ec
Solved implicit capture of this pointer in idefix_loop for computatio…
nscepi Dec 11, 2024
d47daf4
Fixed mistakes in changing computation of opacities
nscepi Dec 11, 2024
4b9578c
Fixed testme.py in case of check only
nscepi Dec 11, 2024
abb358d
Reinstated some units in Radsource class for function LimitSpeedRad
nscepi Dec 11, 2024
96b2575
Removed copy of units in LimitSpeedsRad
nscepi Dec 11, 2024
053a5e5
Moved some variable declaration out of if in radsource.cpp
nscepi Dec 12, 2024
f5478e9
Merge branch 'commercon_source_term' into rad_in_class_fluid
nscepi Dec 12, 2024
dd47a93
Uncomment M10 and M11 in full_implicit solver
nscepi Dec 12, 2024
7862e2c
Added fix to compute gamma and mu in general case in radiation part
nscepi Dec 12, 2024
49d7f29
Change resolution of diffusion_disk test to be a power of 2 and remov…
nscepi Dec 12, 2024
7c4818a
Merge branch 'rad_in_class_fluid' of github.com:nscepi/idefix_radiati…
nscepi Dec 12, 2024
d7c006b
Comment some unused members of inverse matrix in full_implicit solver
nscepi Dec 12, 2024
8ab68fd
Removed use of idfx::units in idefix_for in radsource.cpp
nscepi Dec 12, 2024
9caf5fa
Added declaration of local opacity variables in FixedPointGas
nscepi Dec 12, 2024
6bd11b6
Declare column density locally in IrrFlux
nscepi Dec 12, 2024
92eda76
Changed argument of function IrrFlux and fixed some bugs with general…
nscepi Dec 12, 2024
7cfbc6e
Added pre-compiler flags to ensure compilation with isothermal setups
nscepi Dec 12, 2024
9820cf1
Add local copy of datablock in IrrFlux
nscepi Dec 12, 2024
ff3bb0d
Make local copy of A1, x1l, dV instead of data in IrrFlux
nscepi Dec 12, 2024
41a4b7c
Fix typo in radsource.cpp
nscepi Dec 12, 2024
5ab7075
Changed tolerance of regression test in opt_thin_riemann tests
nscepi Dec 13, 2024
413a875
Remove deprecated getter of divF
nscepi Dec 13, 2024
7a41c1b
Moved prefix initialization on top of constructor
nscepi Dec 16, 2024
987710b
Fixed local copy of EOS in RadSource class
nscepi Dec 17, 2024
824f819
Moved local copy of Type_opac in const type
nscepi Dec 17, 2024
45c4473
Commented some unreferenced variables
nscepi Dec 17, 2024
155107e
add proper copy constructor to units (tentative)
glesur Dec 19, 2024
3f02fde
add decoration for Kokkos
glesur Dec 19, 2024
557505d
better decoration
glesur Dec 19, 2024
c743f90
use accessors in place of references
glesur Dec 19, 2024
ba5eac8
use proper getter and conform to idefix coding style
glesur Dec 20, 2024
0545aea
Merge branch 'addUnits' of github.com:idefix-code/idefix into rad_in_…
nscepi Dec 20, 2024
79c5eb3
Added energy and time in units
nscepi Dec 20, 2024
7730bf4
Use getters for units
nscepi Dec 20, 2024
e6be8c8
Fixed execution space issues in stellar_irradiation's setup
nscepi Dec 20, 2024
a927951
Added shallow copy of idfx::units in MySourceTerm of diffusion_disk test
nscepi Jan 10, 2025
d726d8d
Added shallow copy of idfx::units in UserDefBoundaryRad of diffusion_…
nscepi Jan 10, 2025
2b9cadd
Change resolution in shock test
nscepi Jan 10, 2025
205eb1a
Adapted setup of pulse for any nb of dimensions
nscepi Jan 10, 2025
7b32728
Added user functions for defining opacities. Still in progress.
nscepi Jan 14, 2025
fc81371
Fixed call of radsource class from radiation[0] not hydro object
nscepi Jan 14, 2025
0109f09
Fixed issues related to userfunc opacities in setup.cpp
nscepi Jan 14, 2025
f1659f9
Updated stellar_irradiation test for userfunc opacities
nscepi Jan 14, 2025
66cb89a
Merge branch 'addColumnDensityExample' of github.com:idefix-code/idef…
nscepi Jan 14, 2025
a9042df
Used new signature of Column constructor
nscepi Jan 14, 2025
fa39613
Bug in column class with interface 3D
nscepi Jan 15, 2025
e33a402
Merge branch 'addColumnDensityExample' of github.com:idefix-code/idef…
nscepi Jan 17, 2025
8be0ff9
Clean up radsource after solving bug with column 3D interface
nscepi Jan 17, 2025
2899832
Moved userfunc opacities computation from RadSource class to Fluid class
nscepi Jan 17, 2025
7a9960e
Fixed some implicit capture of this in radsource.cpp
nscepi Jan 17, 2025
2247058
Fixed some more implicit capture of this in radsource.cpp
nscepi Jan 17, 2025
f0866c6
Fixed error in warning message for userfunc opacities
nscepi Jan 17, 2025
a9f2764
Remove undesired update of prim variables in radsource solvers
nscepi Jan 21, 2025
3610b86
Add sublimation_2D_viscous test problem
nscepi Jan 21, 2025
e82afe8
Merge branch 'master' into rad_in_class_fluid
nscepi Jan 21, 2025
b096859
Changed initial velocity and switched to 3D to prepare for fargo
nscepi Jan 21, 2025
05fe21a
Moved back to 2D and removed Fargo function
nscepi Jan 21, 2025
3574f06
Increased reduced c in sublimation_2D_viscous
nscepi Jan 21, 2025
84da6f5
Added variable alpha in sublimation_2D_viscous
nscepi Jan 21, 2025
6ff5925
Remove unnecessary ConsToPrim in full_implicit radsource solver
nscepi Jan 30, 2025
3472fe3
Correct typo in kramers law
nscepi Feb 5, 2025
a25a917
Correct another typo in kramers law
nscepi Feb 5, 2025
2c2810f
Add working 2D sublimation radius test
nscepi Feb 18, 2025
2cd5980
Add preliminary 3D sublimation radius test
nscepi Feb 18, 2025
ac2854d
Correct a host device error
nscepi Feb 18, 2025
e45b956
Fix typo in alpha in sublimation_2D_viscous
nscepi Feb 21, 2025
abf85bb
Add novae_like test
nscepi Feb 21, 2025
f9826b0
Fix setup of novae_like
nscepi Feb 21, 2025
485d564
Fix typo in setup of novae_like
nscepi Feb 25, 2025
082c339
Fix other typo in setup of novae_like
nscepi Feb 25, 2025
f9a8c09
Change resolution test novae_like
nscepi Feb 25, 2025
5646493
Add novae_like_3D setup
nscepi Feb 28, 2025
9fc11b2
Fixed nostress BC in setup of novae_like and sublimation_radius
nscepi Mar 6, 2025
5d228b0
Add relativistic correction to RadSource
nscepi Mar 12, 2025
9ce5693
Add electron charge in Units class
nscepi Apr 10, 2025
189a9af
Add relatistic correction to gas
nscepi Apr 11, 2025
1cc728b
Corrected and tested relativistic corrections
nscepi Apr 16, 2025
3e5cdb6
Merge branch 'relativist_correction' into rad_in_class_fluid
nscepi Apr 16, 2025
ad5f82e
Remove deprecated radiation folder in src
nscepi Apr 16, 2025
df2a440
Fix capture in radiation_drag test
nscepi Apr 16, 2025
d7edbde
Add 2D usertable for opacities and fix kramers opacity for diffusion …
nscepi Apr 18, 2025
e16f2d9
Changed how to activate relativist_correction
nscepi Apr 18, 2025
477f585
Fix implicit capture in relativist_correction
nscepi Apr 22, 2025
782a4e8
Fix implicit capture in relativist_correction
nscepi Apr 22, 2025
7126da6
Update various test setups
nscepi Apr 22, 2025
bc54a44
Merge master into rad_in_class_fluid
nscepi Apr 22, 2025
2d857c4
keep Flux array in each direction (increase memory footprint, but easier
glesur Apr 22, 2025
04932c1
fix linting issues
glesur Apr 22, 2025
b32367c
fix Uniform collapse test
glesur Apr 22, 2025
813108b
fix uniform collapse test (forgot to save...)
glesur Apr 23, 2025
d3407db
Merge branch 'keepFlux' into rad_in_class_fluid
nscepi Apr 23, 2025
2a0b4d1
Save setup for novae_like restart in 3D with radiation
nscepi Apr 25, 2025
ba80591
Modified constant kappa input to kappa_p and kappa_r
nscepi Apr 25, 2025
8ef1611
Added constant and kramers opacity cases in novae_like_3D_no_damping_rad
nscepi Apr 25, 2025
25c3e07
Remove idefix.ini in novae_like_3D_no_damping_rad
nscepi Apr 25, 2025
13053aa
Added user variables to idefix.ini
nscepi Apr 30, 2025
8cf8be5
Fix uncommited conflict resolution
nscepi Apr 30, 2025
bfa22da
Removed unnecessary DataBlock host containing RadFlux
nscepi Apr 30, 2025
283f535
Fixed typo in uservar
nscepi Apr 30, 2025
c2fddf9
Comment diagnostics in RadSource
May 7, 2025
0b90f2b
Fixed UserVar in novae_like_3D_no_damping_rad
nscepi May 7, 2025
46f64c4
Fixed UserVar novae_like_3D_no_damping_rad again
nscepi May 7, 2025
db9a649
Fix UserVar of novae_like_3D_no_damping_rad round 3
nscepi May 7, 2025
6e50cfe
Reduce memory imprint of vtk outputs in novae_like_3D_no_damping_rad
nscepi May 7, 2025
2fbd75a
Fixed setup for restarting novae_like run with radiation
May 9, 2025
8f3663f
Add axis_rad (axis for fluid and reflective for rad) BC
nscepi May 20, 2025
ffeb51e
Fixed axis_rad BC
nscepi May 20, 2025
462cf4c
Remove debugging message
nscepi May 21, 2025
1d39fe6
Update setup of novae_like_3D_no_damping_rad
nscepi May 21, 2025
386a39c
Add userdef BC for radiation in axis_rad
nscepi May 21, 2025
47e5440
Add userdef BC for radiation in axis_rad again
nscepi May 21, 2025
ba14a58
Add FluxRad BC to novae_like_3D_no_damping_rad
nscepi May 21, 2025
d83c993
Update idefix_kappa_kramers.ini in novae_like
nscepi May 23, 2025
792ece6
Try other BC in axis_rad
nscepi May 23, 2025
16e8bdd
Add Flux BC to novae_like_3D_no_damping_rad
nscepi May 23, 2025
bc82e7c
Add novae_like_3D_no_damping setup
nscepi May 28, 2025
a6f5276
Fix Flux signature in novae_like_3D_no_damping
nscepi May 28, 2025
be1f5b2
Add userdef variables to novae_like_3D_no_damping
nscepi May 28, 2025
faea0ae
Change outputs in novae_like_3D_no_damping
nscepi May 28, 2025
2ce4200
Fix coarsening in novae_like_3D_no_damping
nscepi May 31, 2025
f191ce2
Update sublimation_MRI_3D test
nscepi Jun 4, 2025
5a2c866
Add missing files to sublimation_MRI_3D
nscepi Jun 4, 2025
9fdaa02
Fix warning in setup of sublimation_MRI_3D
nscepi Jun 4, 2025
4baddf2
Update sublimation_3D setup after fixes
nscepi Jul 4, 2025
ac5917f
novae_like beta1e3 version
Aug 19, 2025
7aa4848
Add steady_state_subliation test
nscepi Sep 8, 2025
cf306ab
Merge branch 'rad_in_class_fluid' of github.com:nscepi/idefix_radiati…
nscepi Sep 8, 2025
8ab15ad
Change sublimation_2D_viscous setup
nscepi Sep 12, 2025
6a227e1
Add viscous heating in radiation source
nscepi Sep 12, 2025
9dc5034
Update novae_like_3D_no_damping_rad
Sep 15, 2025
2440469
Reconstruction on faces preserving Fr/Er<=1
nscepi Dec 3, 2025
12767af
Merge branch 'rad_in_class_fluid' of github.com:nscepi/idefix_radiati…
nscepi Dec 3, 2025
c25b023
Fix typo in ini file shadow
nscepi Dec 6, 2025
263d144
Add separate kappairr
nscepi Dec 8, 2025
b954a0c
Fix typo in radsource.hpp
nscepi Dec 8, 2025
fd93fe6
Compute kappairr only if irr is defined
nscepi Dec 8, 2025
9890ed8
Update vertical diffusion test to directional Flux signature
nscepi Dec 9, 2025
54bf69b
Add new reconstruction to hllc
nscepi Dec 9, 2025
2ac81e4
Add kappairr to IrrFlux
nscepi Dec 9, 2025
63e95f1
Add opacity before domain in IrrFlux
nscepi Dec 24, 2025
5481fd8
Fix lambda implicit call in IrrFlux
nscepi Dec 24, 2025
1da0701
Fix missing units in IrrFlux
Jan 20, 2026
472b69c
Use overloaded K_Flux and compute xi in K_SpeedsRad
nscepi Jan 22, 2026
beacc5b
Add test for dynamic diffusion regime
nscepi Feb 9, 2026
3bc5d66
Add source term in tau*beta for dynamic diffusion
nscepi Feb 9, 2026
c071f72
Add function to define irradiation in general case
nscepi Feb 9, 2026
2ee5aff
Update dynamic_diffusion test with irradiation
nscepi Feb 9, 2026
8a25d5b
Fix units in radiation_drag test
nscepi Feb 11, 2026
7ce861e
Removed idefix.ini in dynamic_diffusion test
nscepi Feb 11, 2026
d1b21ac
Use linter on previous commits
nscepi Feb 12, 2026
e910819
Fixed typo following linting
nscepi Feb 12, 2026
c6d49d7
One Prad computation for all geometries in addSourceTerms
nscepi Feb 12, 2026
250d1ba
Removed outflow_pluto BC
nscepi Feb 12, 2026
8d5d8cc
Start documentation for radiation
nscepi Feb 12, 2026
abb73b6
Update doc for radiation
nscepi Feb 12, 2026
129bd86
Updated documentation of radiation module
nscepi Feb 13, 2026
0ad7478
Add warning when nFrequencies>1
nscepi Feb 13, 2026
f71bcf0
Removed some commented debug printf in hll and hllc
nscepi Feb 13, 2026
52f6664
Fixed errors in opacities in sublimation_2D
nscepi Feb 19, 2026
3d5b7c4
Add constant opacity to kramers
nscepi Mar 30, 2026
05860d0
Check irradiation config only if irradiation is on
nscepi Mar 30, 2026
5561fe9
Fixed lambda capture
nscepi Mar 30, 2026
aad1801
Add grid coarsening to radiation
Jun 29, 2026
4295ec4
Switch off radiation reconstruction
Aug 3, 2026
afd7126
Merge branch 'master' into rad_in_class_fluid
nscepi Aug 26, 2026
ac97d9d
Merge branch 'develop' into rad_in_class_fluid
nscepi Aug 26, 2026
1bb6fb2
Change limiter of radiative flux in HllcRad
nscepi Sep 8, 2026
007c6b5
Correct typo in hllc ini file of opt_thin_riemann
nscepi Sep 8, 2026
915d744
Remove reference to flagShock pointer in HllcRad
nscepi Sep 8, 2026
617c03a
Clarify output message on rad source
nscepi Sep 9, 2026
24c41e8
Add radiative flux limiter as an option in ini file
nscepi Sep 9, 2026
220f889
Remove small_factor in simple rad flux limiting
nscepi Sep 9, 2026
9f6c381
Pre-compute fractions in speed_rad
nscepi Sep 9, 2026
28f15aa
Put absolute value back in speedRad to avoid Nan when f=1
nscepi Sep 9, 2026
1a5b176
Clean up HllcRad
nscepi Sep 9, 2026
d4c5b5f
Add f-preserving rad flux limiter in opt_thin_riemann tests
nscepi Sep 10, 2026
b33f2ae
radiation: add the required testme.json to insert the test in the new…
svalat Sep 7, 2026
acad694
radiation: remove some files added by mistake in the test suite
svalat Sep 7, 2026
bf70233
radiation: fix precommit issues about python
svalat Sep 8, 2026
57997d3
radiation: fix pre-commit issues about C++ code
svalat Sep 8, 2026
212dd47
radiation: fix compiler warnings and remove dead codes
svalat Sep 14, 2026
66f4e2e
radiation: rename enum types
svalat Sep 14, 2026
e4b0120
radiation: oops forgot to commit one changed file on enum type renaming
svalat Sep 14, 2026
5b767df
radiation: fix some warnings and compile errors
svalat Sep 14, 2026
b5a833a
radiation: add error message if Rad is enabled and more than one flui…
svalat Sep 14, 2026
d1dd5e8
radiation: fix a build issue with MPI
svalat Oct 5, 2026
12f7f6d
Added correct rad_limiter to all tests
nscepi Oct 22, 2026
976a4b6
Switch hlld_rad to hll_rad when optically thick in a cell
nscepi Oct 22, 2026
b22a2e3
Remove donor cell reconstruction from diffusion_disk test
nscepi Oct 28, 2026
ec978d8
Corrected dynamic_diffusion test
nscepi Oct 28, 2026
e8db515
Updated radiation module doc (still not complete)
nscepi Oct 28, 2026
bbd6ea0
Merge remote-tracking branch 'nscepi/rad_in_class_fluid' into merge/n…
svalat Oct 30, 2026
3e239b7
Create thermal_wind setup
nscepi Nov 4, 2026
696f51f
Fixed lambda capture in thermal_wind setup
Nov 5, 2026
12c63ac
Remove deprecated testing line in thermal_wind setup
Nov 5, 2026
16c39f4
Add more diagnostics to thermal_wind
Nov 5, 2026
f43a7ab
Add diagnostics in idefix.ini of thermal_wind
Nov 5, 2026
fecc67b
Add ne function in thermal_wind
nscepi Nov 5, 2026
c147a93
Corrected error in ne and added to diagnostics
nscepi Nov 5, 2026
4c4fc3d
Add ne in diagnostics of thermal_wind
nscepi Nov 6, 2026
4f11101
Add ne in idefix.ini uservar and change resolution to Luketic 2010 in…
nscepi Nov 6, 2026
8e6eace
radiation: adapt a testme.json
svalat Nov 9, 2026
b5735fb
test: make such that --init used on ./test.py re-create the init file…
svalat Nov 10, 2026
0de03b6
Merge remote-tracking branch 'nscepi/rad_in_class_fluid' into merge/n…
svalat Nov 10, 2026
1ea73b8
test: oops forgot a return
svalat Nov 10, 2026
2653410
Merge branch 'develop' into merge/nscepi-rad_in_class_fluid
svalat Nov 13, 2026
8753c9c
radiation: remove tests with reconstruction=1 in Radiation directory
svalat Nov 13, 2026
cbaca16
radiation: fix merge issue due to missing include
svalat Nov 16, 2026
62a8bf6
radiation: fix 4 integration test failures avoud mpi & dec (wrong val…
svalat Nov 16, 2026
3fc439b
radiation: make passing test/Radiation/stellar_irradiation
svalat Nov 16, 2026
3198149
radiation: temporary skip test/Radation/pulse HLLC + thin + reconstru…
svalat Nov 16, 2026
5402779
add plotting tools to tests to reproduce the paper plots
glesur Nov 19, 2026
4fcf86c
use relative error when comparing against reference dump files
glesur Nov 20, 2026
f700c48
use relative error when required in tests
glesur Nov 20, 2026
444d3ca
radiation: disallow ORDER=3 when Radiation is enabled
svalat Nov 23, 2026
2478001
radiation: skip tests with reconstruction=3 for now
svalat Nov 23, 2026
d33afd8
radiation: fix tolerance for one test
svalat Nov 26, 2026
b8edda4
radiation: restrain the list of Radiation tests
svalat Nov 26, 2026
b410e72
Radiation: add the new Radiation tests to the CI
svalat Nov 26, 2026
698564a
radiation: update reference git commit to get the new Radation refs
svalat Nov 27, 2026
3691c0b
Revert "test: make such that --init used on ./test.py re-create the i…
svalat Nov 27, 2026
0275b94
Merge branch 'develop' into merge/nscepi-rad_in_class_fluid
svalat Nov 27, 2026
1505dd3
radiation: fix mpi build issue due to mistake in previous merge confl…
svalat Nov 27, 2026
64a4f38
radiation: add file headers for the new files
svalat Nov 27, 2026
fdf1ddc
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Nov 27, 2026
ce7e9af
radiation: fix errors to pass the pre-commit filter
svalat Nov 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/idefix-ci-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,34 @@ jobs:
- name: Collisionless thermal conduction
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/clessTDiffusion -all $TESTME_OPTIONS

Radiation:
needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD]
runs-on: self-hosted
steps:
- name: Check out repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive
persist-credentials: false
- name: Prep python
uses: ./.github/workflows/actions/pre-install-py-packages
- name: MHD Blast
run: scripts/ci/run-tests $IDEFIX_DIR/test/Radiation/mhd_blast -all $TESTME_OPTIONS
- name: Free Streaming Beam
run: scripts/ci/run-tests $IDEFIX_DIR/test/Radiation/free_streaming_beam -all $TESTME_OPTIONS
- name: Shadow
run: scripts/ci/run-tests $IDEFIX_DIR/test/Radiation/shadow -all $TESTME_OPTIONS
- name: Diffusion Disk
run: scripts/ci/run-tests $IDEFIX_DIR/test/Radiation/diffusion_disk -all $TESTME_OPTIONS
- name: Shocks
run: scripts/ci/run-tests $IDEFIX_DIR/test/Radiation/shocks -all $TESTME_OPTIONS
- name: Opt Thin Riemann
run: scripts/ci/run-tests $IDEFIX_DIR/test/Radiation/opt_thin_riemann -all $TESTME_OPTIONS
- name: Stellar Irradiation
run: scripts/ci/run-tests $IDEFIX_DIR/test/Radiation/stellar_irradiation -all $TESTME_OPTIONS
- name: Pulse
run: scripts/ci/run-tests $IDEFIX_DIR/test/Radiation/pulse -all $TESTME_OPTIONS

Examples:
needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity]
runs-on: self-hosted
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ test/**/KokkosCore*
test/**/*.csv
test/**/*.pyc
test/**/*.dat
test/**/*.png
test/**/git-state.txt
test/**/generated
test/**/cmake_packages*
test/**/
idefix-tests.junit.xml
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ target_include_directories(idefix-core PUBLIC
src/fluid/RiemannSolver/HDsolvers
src/fluid/RiemannSolver/MHDsolvers
src/fluid/RiemannSolver/Dustsolvers
src/fluid/RiemannSolver/Radiationsolvers
src/fluid/tracer
src/output
src/rkl
Expand Down
4 changes: 4 additions & 0 deletions doc/source/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ In this section, you will find a more detailed documentation about each module t
The Braginskii module, models the anisotropic flux of heat and momentum
taking place in weakly collisional, magnetised plasma (like the intracluster medium).

:ref:`radiationModule`
The radiation module, models the photon field as an effective radiative fluid.
It uses the M1 approximation and is fully coupled to the gas.

:ref:`gridCoarseningModule`
The grid coarsening module, that allows to derefine the grid in particular locations to speed up the computation.

Expand Down
231 changes: 231 additions & 0 deletions doc/source/modules/radiation.rst

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion pytools/idfx_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,9 +747,13 @@ def _computeError(self, Vref, Vtest):
if Vtest.data[fld].ndim == 3:
if fld in Vref.data.keys():
# print("error in "+fld+" = "+str(np.sqrt(np.mean((Vref.data[fld]-Vtest.data[fld])**2))))
error = error + np.sqrt(
norm = np.sqrt(np.mean(Vref.data[fld] ** 2))
fld_error = np.sqrt(
np.mean((Vref.data[fld] - Vtest.data[fld]) ** 2)
)
if norm > 1:
fld_error = fld_error / norm
error = error + fld_error
ntested = ntested + 1

if ntested == 0:
Expand Down
3 changes: 2 additions & 1 deletion pytools/update_file_headers.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
"makefile.rules",
"*.yml",
"*.toml",
"run-tests"
"run-tests",
"run-unit-tests"
]
},
"c": {
Expand Down
5 changes: 5 additions & 0 deletions src/dataBlock/coarsen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ void DataBlock::Coarsen() {
ComputeGridCoarseningLevels();
// This routine coarsen the *conservative* variables
hydro->CoarsenFlow(hydro->Uc);
if (haveRadiation) {
for(int i = 0 ; i < radiation.size() ; i++) {
radiation[i]->CoarsenFlow(radiation[i]->Uc);
}
}
#if MHD==YES
hydro->CoarsenMagField(hydro->Vs);
#endif
Expand Down
71 changes: 71 additions & 0 deletions src/dataBlock/dataBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,17 @@ DataBlock::DataBlock(Grid &grid, Input &input) {
if (grid.xproc[dir]==0) {
lbound[dir] = grid.lbound[dir];
if(lbound[dir]==axis) this->haveAxis = true;
if(lbound[dir]==axis_rad) this->haveAxis = true;

} else {
lbound[dir] = internal;
}

if (grid.xproc[dir] == grid.nproc[dir]-1) {
rbound[dir] = grid.rbound[dir];
if(rbound[dir]==axis) this->haveAxis = true;
if(rbound[dir]==axis_rad) this->haveAxis = true;

} else {
rbound[dir] = internal;
}
Expand Down Expand Up @@ -162,6 +166,21 @@ DataBlock::DataBlock(Grid &grid, Input &input) {
dust.emplace_back(std::make_unique<Fluid<DustPhysics>>(grid, input, this, i));
}
}

// Initialise radiation fluid if needed
if(input.CheckBlock("Rad")) {
haveRadiation = true;
int nFrequencies = input.Get<int>("Rad","nFrequencies",0);
if (nFrequencies >1) {
std::stringstream msg;
msg << "Only 1 frequency group is currently accepted." << std::endl;
IDEFIX_ERROR(msg);
}
for(int i = 0 ; i < nFrequencies ; i++) {
radiation.emplace_back(std::make_unique<Fluid<RadiationPhysics>>(grid, input, this, i));
}
}

// Register variables that need to be saved in case of restart dump
dump->RegisterVariable(&t, "time");
dump->RegisterVariable(&dt, "dt");
Expand Down Expand Up @@ -196,13 +215,15 @@ DataBlock::DataBlock(SubGrid *subgrid) {
if (grid->xproc[dir]==0) {
lbound[dir] = grid->lbound[dir];
if(lbound[dir]==axis) this->haveAxis = true;
if(lbound[dir]==axis_rad) this->haveAxis = true;
} else {
lbound[dir] = internal;
}

if (grid->xproc[dir] == grid->nproc[dir]-1) {
rbound[dir] = grid->rbound[dir];
if(rbound[dir]==axis) this->haveAxis = true;
if(rbound[dir]==axis_rad) this->haveAxis = true;
} else {
rbound[dir] = internal;
}
Expand Down Expand Up @@ -267,6 +288,11 @@ void DataBlock::ResetStage() {
dust[i]->ResetStage();
}
}
if(haveRadiation) {
for(int i = 0 ; i < radiation.size() ; i++) {
radiation[i]->ResetStage();
}
}
}

void DataBlock::ConsToPrim() {
Expand All @@ -276,6 +302,11 @@ void DataBlock::ConsToPrim() {
dust[i]->ConvertConsToPrim();
}
}
if(haveRadiation) {
for(int i = 0 ; i < radiation.size() ; i++) {
radiation[i]->ConvertConsToPrim();
}
}
}

void DataBlock::PrimToCons() {
Expand All @@ -285,6 +316,11 @@ void DataBlock::PrimToCons() {
dust[i]->ConvertPrimToCons();
}
}
if(haveRadiation) {
for(int i = 0 ; i < radiation.size() ; i++) {
radiation[i]->ConvertPrimToCons();
}
}
}

// Set the boundaries of the data structures in this datablock
Expand All @@ -300,12 +336,22 @@ void DataBlock::SetBoundaries() {
dust[i]->CoarsenFlow(dust[i]->Vc);
}
}
if(haveRadiation) {
for(int i = 0 ; i < radiation.size() ; i++) {
radiation[i]->CoarsenFlow(radiation[i]->Vc);
}
}
}
if(haveDust) {
for(int i = 0 ; i < dust.size() ; i++) {
dust[i]->boundary->SetBoundaries(t);
}
}
if(haveRadiation) {
for(int i = 0 ; i < radiation.size() ; i++) {
radiation[i]->boundary->SetBoundaries(t);
}
}
hydro->boundary->SetBoundaries(t);
}

Expand Down Expand Up @@ -337,6 +383,16 @@ void DataBlock::ShowConfig() {
dust[i]->ShowConfig();
}*/
}
if(haveRadiation) {
idfx::cout << "DataBlock: evolving " << radiation.size()
<< " radiation frequencies." << std::endl;
// Only show the config the first radiation frequency
radiation[0]->ShowConfig();
/*
for(int i = 0 ; i < radiation.size() ; i++) {
radiation[i]->ShowConfig();
}*/
}
}


Expand Down Expand Up @@ -369,6 +425,21 @@ real DataBlock::ComputeTimestep() {
dt = std::min(dt,dtDust);
}
}
if(haveRadiation) {
for(int n = 0 ; n < radiation.size() ; n++) {
real dtRadiation;
auto InvDt = radiation[n]->InvDt;
idefix_reduce("Timestep_reduction_radiation",
beg[KDIR], end[KDIR],
beg[JDIR], end[JDIR],
beg[IDIR], end[IDIR],
KOKKOS_LAMBDA (int k, int j, int i, real &dtmin) {
dtmin=FMIN(ONE_F/InvDt(k,j,i),dtmin);
},
Kokkos::Min<real>(dtRadiation));
dt = std::min(dt,dtRadiation);
}
}
Kokkos::fence();
return(dt);
}
Expand Down
2 changes: 2 additions & 0 deletions src/dataBlock/dataBlock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ class DataBlock {
std::unique_ptr<Fluid<DefaultPhysics>> hydro; ///< The Hydro object attached to this datablock
bool haveDust{false};
std::vector<std::unique_ptr<Fluid<DustPhysics>>> dust; ///< Holder for zero pressure dust fluid
bool haveRadiation {false};
std::vector<std::unique_ptr<Fluid<RadiationPhysics>>> radiation; ///< Holder for radiation fluid

std::unique_ptr<Vtk> vtk;
std::unique_ptr<Dump> dump;
Expand Down
28 changes: 28 additions & 0 deletions src/dataBlock/dataBlockHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ DataBlockHost::DataBlockHost(DataBlock& datain) {
gbeg = data->gbeg;
gend = data->gend;
haveDust = data->haveDust;
haveRadiation = data->haveRadiation;

// TO BE COMPLETED...

Expand Down Expand Up @@ -84,6 +85,17 @@ DataBlockHost::DataBlockHost(DataBlock& datain) {
}
}

if(haveRadiation) {
RadVc = std::vector<IdefixHostArray4D<real>>(data->radiation.size());
RadUc = std::vector<IdefixHostArray4D<real>>(data->radiation.size());
//RadFlux = std::vector<IdefixHostArray4D<real>>(data->radiation.size());
for(int i = 0 ; i < data->radiation.size() ; i++) {
RadVc[i] = Kokkos::create_mirror_view(data->radiation[i]->Vc);
RadUc[i] = Kokkos::create_mirror_view(data->radiation[i]->Uc);
//RadFlux[i] = Kokkos::create_mirror_view(data->radiation[i]->FluxRiemann);
}
}

// if grid coarsening is enabled
if(data->haveGridCoarsening) {
this->haveGridCoarsening = data->haveGridCoarsening;
Expand Down Expand Up @@ -142,6 +154,14 @@ void DataBlockHost::SyncToDevice() {
}
}

if(haveRadiation) {
for(int i = 0 ; i < RadVc.size() ; i++) {
Kokkos::deep_copy(data->radiation[i]->Vc, RadVc[i]);
Kokkos::deep_copy(data->radiation[i]->Uc, RadUc[i]);
//Kokkos::deep_copy(data->radiation[i]->FluxRiemann, RadFlux[i]);
}
}

Kokkos::deep_copy(data->hydro->Uc,Uc);

if(haveGridCoarsening) {
Expand Down Expand Up @@ -183,6 +203,14 @@ void DataBlockHost::SyncFromDevice() {
}
}

if(haveRadiation) {
for(int i = 0 ; i < RadVc.size() ; i++) {
Kokkos::deep_copy(RadVc[i], data->radiation[i]->Vc);
Kokkos::deep_copy(RadUc[i], data->radiation[i]->Uc);
//Kokkos::deep_copy(RadFlux[i], data->radiation[i]->FluxRiemann);
}
}

if(haveGridCoarsening) {
for(int dir = 0 ; dir < 3 ; dir++) {
if(coarseningDirection[dir]) {
Expand Down
9 changes: 9 additions & 0 deletions src/dataBlock/dataBlockHost.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ class DataBlockHost {
IdefixHostArray3D<real> Ex3; ///< x3 electric field

#endif

bool haveRadiation{false};
std::vector<IdefixHostArray4D<real>> RadVc; ///< Cell-centered primitive variables index
///< for radiation
std::vector<IdefixHostArray4D<real>> RadUc; ///< Cell-centered conservative variables index
///< for radiation
std::vector<IdefixHostArray4D<real>> RadFlux; ///< Cell-centered conservative variables index
///< for radiation

IdefixHostArray4D<real> Uc; ///< Main cell-centered conservative variables
IdefixHostArray3D<real> InvDt; ///< Inverse of maximum timestep in each cell

Expand Down
6 changes: 6 additions & 0 deletions src/dataBlock/evolveStage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ void DataBlock::EvolveStage() {
}
}

if(haveRadiation) {
for(int i = 0 ; i < radiation.size() ; i++) {
radiation[i]->EvolveStage(this->t,this->dt);
}
}

idfx::popRegion();
}

Expand Down
5 changes: 5 additions & 0 deletions src/dataBlock/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ int DataBlock::CheckNan() {
nNans += dust[n]->CheckNan();
}
}
if(haveRadiation) {
for(int n = 0 ; n < radiation.size() ; n++) {
nNans += radiation[n]->CheckNan();
}
}
idfx::popRegion();
return(nNans);
}
Expand Down
2 changes: 2 additions & 0 deletions src/fluid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ target_sources(idefix-core
PRIVATE ${CMAKE_CURRENT_LIST_DIR}/drag.cpp
PRIVATE ${CMAKE_CURRENT_LIST_DIR}/evolveStage.hpp
PRIVATE ${CMAKE_CURRENT_LIST_DIR}/fluid_defs.hpp
PRIVATE ${CMAKE_CURRENT_LIST_DIR}/radsource.hpp
PRIVATE ${CMAKE_CURRENT_LIST_DIR}/radsource.cpp
PRIVATE ${CMAKE_CURRENT_LIST_DIR}/enroll.hpp
PRIVATE ${CMAKE_CURRENT_LIST_DIR}/fluid.hpp
PRIVATE ${CMAKE_CURRENT_LIST_DIR}/viscosity.hpp
Expand Down
21 changes: 21 additions & 0 deletions src/fluid/RiemannSolver/Radiationsolvers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
######################################################################################
# Idefix MHD astrophysical code
#
# Source file src/fluid/RiemannSolver/Radiationsolvers/CMakeLists.txt
#
# Last modified : 02/2026
#
# Copyright(C) by :
# - Nicolas Scepi <nicolas.scepi@univ-grenoble-alpes.fr> (IPAG/UGA/CNRS - 2026)
# and other code contributors
#
# Licensed under CeCILL 2.1 License, see COPYING for more information
######################################################################################

target_sources(idefix
PUBLIC ${CMAKE_CURRENT_LIST_DIR}/hllRad.hpp
PUBLIC ${CMAKE_CURRENT_LIST_DIR}/hllcRad.hpp
PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lfrRad.hpp
PUBLIC ${CMAKE_CURRENT_LIST_DIR}/speedRad.hpp
PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lim_fluxRad.hpp
)
Loading
Loading