Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
72244f8
Added new branch with collisionless TC from develop
vreville Dec 3, 2024
cb3bea8
Fixed undeclared CL arrays (GPU compiling)
vreville Dec 12, 2024
6ec6d0d
collisionless tc as an option of bragTDiffusion
Dec 14, 2024
9ac6698
idefix error includes collisionless status
vreville Dec 16, 2024
94a71d2
Added a saturation option for collisionless formulation
vreville Dec 20, 2024
e2f7a9a
add a column Density example
glesur Jan 12, 2025
26ffc60
add some documentation
glesur Jan 12, 2025
a1e6e67
add it to the tests
glesur Jan 12, 2025
9c58596
imrove documentation
glesur Jan 12, 2025
6283fd5
add doc link for column density
glesur Jan 12, 2025
8277ed0
missing testme file
glesur Jan 12, 2025
31ae1b8
add a 3D interface for column density computation
glesur Jan 14, 2025
d656036
Upwind scheme for cless TC with limiters + tests
Jan 15, 2025
7c10ec0
fix dimensions for alias
glesur Jan 15, 2025
79e70cf
updated ShowConfig functions from braginskii tc and viscosity to disp…
jeankpf Jan 16, 2025
c1cd824
Merge pull request #1 from jeankpf/collisionlessTC
vreville Jan 16, 2025
4286299
Merge pull request #316 from idefix-code/V2.2.00
glesur Jan 18, 2025
d0f348a
Génération automatique de plots de performance dans la doc
Jan 17, 2025
a61eb61
Updated doc for Collisionless TC
vreville Jan 20, 2025
7bef7a9
Corrected doc typo
vreville Jan 20, 2025
8f48bc2
Corrected typo
vreville Jan 21, 2025
1f891c7
add global routines to dump Idefix arrays (useful for debugging or
glesur Jan 21, 2025
afc3e4d
add missing header
glesur Jan 21, 2025
e840e2f
revert back to old reference commit sha to avoid merge conflicts
glesur Jan 21, 2025
ac10470
go back to last reference before fork
glesur Jan 22, 2025
76e399a
Récupération des derniers benchmarks sur JeanZay
Jan 24, 2025
49a56ee
Récupération de benchs pour H100; ajout de labels aux axes
Jan 24, 2025
0cb52ea
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Jan 24, 2025
0c07a8e
Use a std::vector of IdefixArray as input for the userdef braginskii …
vreville Jan 29, 2025
250610a
corrected typo
vreville Jan 29, 2025
2f54bb5
Merge pull request #308 from idefix-code/addColumnDensityExample
glesur Feb 9, 2025
898fcf3
add some doc
glesur Feb 9, 2025
241c69c
refactor DumpArray
glesur Feb 10, 2025
ab340ed
implements a 1st order IMEX1 solver for polydisperse dust species
glesur Feb 10, 2025
c0fbc84
switch for std.vector.at() in userdef TD tests
vreville Feb 11, 2025
22eaf5b
refactor dust drag law
glesur Feb 11, 2025
cbcc63f
clean up
glesur Feb 11, 2025
05ca488
change signature of userdef drag function
glesur Feb 11, 2025
6fbd722
add the dustyShock test from Benitez-Llambay 2019
glesur Feb 11, 2025
60740e7
add back dump files for reference
glesur Feb 11, 2025
4b8e277
update reference files for new dusyShock
glesur Feb 11, 2025
e844bc1
add documentation for implicit dust module
glesur Feb 11, 2025
78fae02
use proper update variables istead of pre-stage ones
glesur Feb 13, 2025
59a91d3
switch off heating terms when feedback is disabled (feedback assumes
glesur Feb 13, 2025
f1141ee
typo
glesur Feb 13, 2025
9b2afc5
restore energy conservation in implicit scheme with feedback
glesur Feb 13, 2025
e8d34bb
fix label of dust tracers with non-isothermal equation of state
glesur Feb 13, 2025
f87b698
Merge pull request #317 from vreville/CollisionlessTC
glesur Feb 17, 2025
34d9366
fix a bug that could lead to Nans when using the RKL scheme on grids
glesur Feb 19, 2025
cb7b999
change the way polar singularities are handled
glesur Feb 19, 2025
2874fda
-refactor curvature terms without using a small number on all Areas
glesur Feb 19, 2025
461ae58
fix typo
glesur Feb 20, 2025
a4ed690
fix capture on Cuda
glesur Feb 20, 2025
b3481f5
do not make an exception when Area=0, as this artificiallykills off one
glesur Feb 20, 2025
af6b3b7
update reference test
glesur Feb 20, 2025
9ea85b0
do not perform implicit capture
glesur Feb 20, 2025
ff459c0
remove reference to useless feedback
glesur Feb 20, 2025
3c9f26d
update signature of fargo+planet+dust drag function
glesur Feb 21, 2025
630836b
Merge pull request #321 from idefix-code/implicitDrag
glesur Feb 21, 2025
59dc0d6
Merge pull request #318 from idefix-code/addDumpArray
glesur Feb 21, 2025
ecb9d2d
Merge pull request #323 from idefix-code/fixRKLSmallGridSpacing
glesur Feb 21, 2025
902c003
add the job to the test suite
glesur Feb 21, 2025
24a62e4
update reference commit #
glesur Feb 21, 2025
c34b819
clean up test
glesur Feb 21, 2025
6f3bedd
too much cleaning
glesur Feb 22, 2025
dbdd28d
final cleanup
glesur Feb 22, 2025
2bc09a0
Merge pull request #324 from idefix-code/addCollionslessTCTest
glesur Feb 22, 2025
da27024
check coarsening inside ghost zone, and detect Nan.
glesur Mar 3, 2025
8bed32b
fix loop unrolling
glesur Mar 3, 2025
3d96f41
add back axis flux tube test
glesur Mar 3, 2025
f283f78
remove analysis from axisfluxtube
glesur Mar 4, 2025
4c9985f
add environement to gitignore
glesur Mar 4, 2025
3fb2236
final improvement to error message on grid coarsening levels
glesur Mar 4, 2025
1d9d101
use one single plot
glesur Mar 4, 2025
282cd12
Merge pull request #329 from idefix-code/checkCoarseningLevels
glesur Mar 4, 2025
4771bde
Update Adastra Mi250 to lock Rocm version
glesur Mar 6, 2025
b2168df
add benchmark data
glesur Mar 10, 2025
eccab2d
Merge pull request #319 from lih/marc-bench-plots
glesur Mar 11, 2025
d59ecf0
attempt at fixing Kokkos SYCL loop configuration (a proper benchmark
glesur Mar 11, 2025
ca9c8b0
tabs
glesur Mar 11, 2025
dd702ab
add a static_assert so that the error observed on syscl doesn't go
glesur Mar 12, 2025
9d7c589
do this for all loops
glesur Mar 12, 2025
217a812
catch misbehaved loops earlier (fix cuda!), and be more explicit.
glesur Mar 12, 2025
e58f724
cleaning up
glesur Mar 12, 2025
4c8ccb8
Merge pull request #331 from idefix-code/fixSyclConfig
glesur Mar 12, 2025
939f0cd
fix axis current regularisation along the south pole
glesur Mar 31, 2025
8e0481e
make divB check diemsionless
glesur Apr 14, 2025
bfc1aca
Merge pull request #334 from idefix-code/improveDivB
glesur Apr 15, 2025
1c33a03
Merge pull request #333 from idefix-code/fixJaxis
glesur Apr 16, 2025
d894627
use one single extra parameter for dump time output
glesur Apr 16, 2025
83986d0
add doc for wallclock dump outputs
glesur Apr 16, 2025
2529e80
Improve Wallclock dump outputs
glesur Apr 16, 2025
0a739f4
update changelog
glesur Apr 16, 2025
d406c2b
nothing was removed
glesur Apr 16, 2025
2fe1a9a
update version number
glesur Apr 16, 2025
5bf399e
update changelog
glesur Apr 16, 2025
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
6 changes: 6 additions & 0 deletions .github/workflows/idefix-ci-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ jobs:
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang -all $TESTME_OPTIONS
- name: Orszag Tang 3D+restart tests
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang3D -all $TESTME_OPTIONS
- name: Axis Flux tube
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/AxisFluxTube -all $TESTME_OPTIONS

ParabolicMHD:
runs-on: self-hosted
Expand Down Expand Up @@ -177,6 +179,8 @@ jobs:
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sphBragTDiffusion -all $TESTME_OPTIONS
- name: Spherical anisotropic viscosity
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sphBragViscosity -all $TESTME_OPTIONS
- name: Collisionless thermal conduction
run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/clessTDiffusion -all $TESTME_OPTIONS

Examples:
needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity]
Expand All @@ -201,3 +205,5 @@ jobs:
run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/lookupTable -all $TESTME_OPTIONS
- name: Dump Image
run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/dumpImage -all $TESTME_OPTIONS
- name: Column density
run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/columnDensity -all $TESTME_OPTIONS
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ doc/source/_static/*
doc/source/_public/*
doc/source/api/*
doc/source/xml/*
doc/env/*

# compiled files
**/__pycache__
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.2.01] 2025-04-16
### Changed

- Fix a bug that led to instabilities in the RKL scheme with very small grid spacings (#323)
- Fix a bug that prevented Idefix from running with Sycl backend (required on Intel GPUs) (#331)
- Fix an error that led to incorrect electrical current regularisation around the polar axis in non-Ideal MHD (#333)
- Improve div(B) checks with a dimensionless implementation, avoiding too large divB errors in grids with large stretch factors (#334)

### Added

- Time-Implicit drag for multiple dust species, preventing small time steps for strongly coupled dust grains (#321)
- Collisionless heat flux added to the Braginskii module (#317)
- New global `idfx::DumpArray` debugging function to dump any Idefix array into a numpy array that can read from python (#318)
- Automatic benchmark plots in the documentation (#319)
- More CI tests of grid coarsening (#329)
- Dump outputs based on wallclock time (#335)


## [2.2.00] 2025-01-17
### Changed

Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ set (CMAKE_CXX_STANDARD 17)

set(Idefix_VERSION_MAJOR 2)
set(Idefix_VERSION_MINOR 2)
set(Idefix_VERSION_PATCH 00)
set(Idefix_VERSION_PATCH 01)

project (idefix VERSION 2.2.00)
project (idefix VERSION 2.2.01)
option(Idefix_MHD "enable MHD" OFF)
option(Idefix_MPI "enable Message Passing Interface parallelisation" OFF)
option(Idefix_HIGH_ORDER_FARGO "Force Fargo to use a PPM reconstruction scheme" OFF)
Expand Down
1 change: 1 addition & 0 deletions doc/python_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ exhale==0.3.7
m2r2==0.3.2
sphinx-copybutton==0.5.2
#sphinxcontrib-applehelp==1.0.7
matplotlib==3.10.0
162 changes: 162 additions & 0 deletions doc/source/bench.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
[
{
"date": "2025-03-04_12:57:12",
"gpumodel": "v100",
"idefix_commit": "2bc09a0d218459f278e2b28506a09e4591b103ae",
"bench_commit": "37161676db15115c38fed3f35c94fa447cbac7bd",
"results": [
{
"nbgpu": 1,
"cell_updates": 1.193720E+8
},
{
"nbgpu": 2,
"cell_updates": 1.178864E+8
},
{
"nbgpu": 4,
"cell_updates": 1.155336E+8
},
{
"nbgpu": 8,
"cell_updates": 1.014338E+8
},
{
"nbgpu": 16,
"cell_updates": 9.855007E+7
},
{
"nbgpu": 32,
"cell_updates": 9.012061E+7
},
{
"nbgpu": 64,
"cell_updates": 8.538461E+7
},
{
"nbgpu": 128,
"cell_updates": 8.531021E+7
}
]
},
{
"date": "2025-03-04_13:07:10",
"gpumodel": "a100",
"idefix_commit": "2bc09a0d218459f278e2b28506a09e4591b103ae",
"bench_commit": "b536949200e50fac68d8a46d5db38fc8e3f02da5",
"results": [
{
"nbgpu": 1,
"cell_updates": 2.044728E+8
},
{
"nbgpu": 2,
"cell_updates": 2.003563E+8
},
{
"nbgpu": 4,
"cell_updates": 1.963512E+8
},
{
"nbgpu": 8,
"cell_updates": 1.933039E+8
},
{
"nbgpu": 16,
"cell_updates": 9.759154E+7
},
{
"nbgpu": 32,
"cell_updates": 6.369645E+7
},
{
"nbgpu": 64,
"cell_updates": 4.629474E+7
},
{
"nbgpu": 128,
"cell_updates": 4.580281E+7
}
]
},
{
"date": "2025-03-04_13:16:01",
"gpumodel": "h100",
"idefix_commit": "2bc09a0d218459f278e2b28506a09e4591b103ae",
"bench_commit": "b536949200e50fac68d8a46d5db38fc8e3f02da5",
"results": [
{
"nbgpu": 1,
"cell_updates": 3.079643E+8
},
{
"nbgpu": 2,
"cell_updates": 3.012300E+8
},
{
"nbgpu": 4,
"cell_updates": 2.944091E+8
},
{
"nbgpu": 8,
"cell_updates": 2.837224E+8
},
{
"nbgpu": 16,
"cell_updates": 2.827778E+8
},
{
"nbgpu": 32,
"cell_updates": 2.822657E+8
},
{
"nbgpu": 64,
"cell_updates": 2.767820E+8
},
{
"nbgpu": 128,
"cell_updates": 2.767322E+8
}
]
},
{
"date": "2025-03-06_11:21:56",
"gpumodel": "mi250x",
"idefix_commit": "2bc09a0d218459f278e2b28506a09e4591b103ae",
"bench_commit": "868be0a87c6fcda665cbb62db7020aeff70dc62d",
"results": [
{
"nbgpu": 1,
"cell_updates": 1.436580E+8
},
{
"nbgpu": 2,
"cell_updates": 1.372499E+8
},
{
"nbgpu": 4,
"cell_updates": 1.344528E+8
},
{
"nbgpu": 8,
"cell_updates": 1.293602E+8
},
{
"nbgpu": 16,
"cell_updates": 1.260359E+8
},
{
"nbgpu": 32,
"cell_updates": 1.204980E+8
},
{
"nbgpu": 64,
"cell_updates": 1.163099E+8
},
{
"nbgpu": 128,
"cell_updates": 1.192343E+8
}
]
}
]
1 change: 1 addition & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
extensions = [
"sphinx_rtd_theme",
'sphinx_git',
'matplotlib.sphinxext.plot_directive',
"breathe",
"exhale",
"m2r2",
Expand Down
3 changes: 3 additions & 0 deletions doc/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ I want to test a modification to *Idefix* source code specific to my problem wit

I want to use a lookup table from a CSV file in my idefix_loop. How could I proceed?
Use the ``LookupTable`` class (see :ref:`LookupTableClass`)

I want to compute a cumulative sum (e.g a column density) on the fly. How could I proceed?
Use the ``Column`` class (see :class:`::Column`)
7 changes: 5 additions & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ Jonah Mauxion
Clément Robert
gitlab integration, linter

Jean Kempf & François Rincon
anisotropic diffusion
Jean Kempf, Victor Reville, François Rincon
anisotropic diffusion and collisionless thermal conduction

Marc Coiffier
Continuous integration, automatic benchmarking

========================
About this documentation
Expand Down
64 changes: 58 additions & 6 deletions doc/source/modules/braginskii.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Braginskii module
===================

Equations solved and methods
---------------------------
----------------------------

The ``Braginskii`` module implements the anisotropic heat and momentum fluxes specific
to weakly collisional, magnetised plasma like the intracluster medium
Expand Down Expand Up @@ -37,7 +37,7 @@ though adapted to vector quantities.
cell interface by a simple arithmetic average
(Eq. (6)-(7) from Sharma & Hammett 2007).
However in the same paper, the authors showed that this implementation can lead to
unphysical heat flux from high to low temperature regions.
unphysical heat flux from low to high temperature regions.
So we implemented slope limiters for the computation of these transverse heat fluxes,
as described in Eq. (17) from Sharma & Hammett (2007).
Only the van Leer and the Monotonized Central (MC) limiters are available
Expand Down Expand Up @@ -72,18 +72,68 @@ of the Braginskii heat flux and viscosity.

.. _braginskiiParameterSection:


Saturation with collisionless heat flux
---------------------------------------

The ``Braginskii`` module can include a collisionless saturation of the Braginskii heat flux, typically due to supra-thermal electrons.
The heat flux is then computed as follows:

:math:`q = \alpha (q_B + q_\perp) + (1-\alpha)\beta*p*v`,

where :math:`\alpha \in [0,1]` controls the transition between the Braginskii heat flux and the collisionless heat flux
and :math:`\beta` controls the amplitude of the collisionless heat flux (typically :math:`\beta \in [1,4]`, see Hollweg 1976).

.. note::
As a result, even with :math:`\kappa_\perp = 0`, the heat flux is no longer necessarilly strictly aligned with the magnetic field.
.. note::
The collisionless heat flux is a hyperbolic term and the diffusion coefficient is set proportional to :math:`\alpha`.
.. note::
If selected, slope limiters are also used in the collisionless flux, where an upwind scheme has been implemented for stability.
.. note::
This saturation has been thought to be used mostly using the userdef function that takes four userdef arrays as input.

Main parameters of the module
-----------------------------

The ``Braginskii`` module can be enabled adding one or two lines in the ``[Hydro]`` section
starting with the keyword
`bragTDiffusion` or/and *bragViscosity*. The following table summarises the different options
starting with the keyword `bragTDiffusion` or/and *bragViscosity*. The following tables summarise the different options
associated to the activation of the Braginskii module:

+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| Column | Entry name | Parameter type | Comment |
+========+=======================+=========================+=======================================================================================+
| 0 | bragModule | string | | Activates Braginskii diffusion. Can be ``bragTDiffusion`` or ``bragViscosity``. |
| 0 | bragTDiffusion | string | | Activates Braginskii thermal diffusion. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 1 | integration | string | | Specifies the type of scheme to be used to integrate the parabolic term. |
| | | | | Can be ``rkl`` or ``explicit``. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 2 | slope limiter | string | | Choose the type of limiter to be used to compute anisotropic transverse flux terms. |
| | | | | Can be ``mc``, ``vanleer`` or ``nolimiter``. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 3 | saturation mode | string | | Include or not collisionless saturation. Can be ``nosat`` or ``wcless``. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 4 | diffusivity type | string | | Specifies the type of diffusivity wanted. Can be ``constant`` or ``userdef``. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 5 | parallel diffusivity | real | | Mandatory if the diffusivity type is ``constant``. Not needed otherwise. |
| | | | | Value of the parallel diffusivity. Should be a real number. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 6 | normal diffusivity | real | | When bragModule ``bragTDiffusion`` and diffusivity type ``constant``, |
| | | | | value of the normal diffusivity. Should be a real number. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 7 | alpha collisionless | real | | If the diffusivity type is ``constant`` and saturation is ``wcless``. |
| | | | | Set to 1 if not provided. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 8 | beta collisionless | real | | If the diffusivity type is ``constant`` and saturation is ``wcless``. |
| | | | | Set to 0 if not provided. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+

for the *bragViscosity*:

+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| Column | Entry name | Parameter type | Comment |
+========+=======================+=========================+=======================================================================================+
| 0 | bragViscosity | string | | Activates Braginskii viscosity. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 1 | integration | string | | Specifies the type of scheme to be used to integrate the parabolic term. |
| | | | | Can be ``rkl`` or ``explicit``. |
Expand All @@ -101,7 +151,7 @@ associated to the activation of the Braginskii module:
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+

Numerical checks
---------------
----------------

In Cartesian geometry, the ``Braginskii`` module has been tested with many setups
and in all configurations of magnetic polarisation:
Expand All @@ -119,3 +169,5 @@ The same goes for the anisotropic heat flux in Cylindrical/Polar geometry while
the anisotropic viscosity has *never* been tested in this geometry.
In spherical geometry, both ``Braginskii`` operators have been partially validated
(diffusion along the polar axis has not been directly tested).

The collisionless saturation has been tested in 1D and 2D spherical geometry.
Loading