Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
318 commits
Select commit Hold shift + click to select a range
a2ea14a
srpic engine modularized
haykh Jan 29, 2026
56cf9a6
minor renaming
haykh Jan 30, 2026
4c2dcab
nix upd + O3 flag added + gui option rm
haykh Jan 30, 2026
eb5ec66
tests now can be compiled with pgen
haykh Jan 30, 2026
6a123e2
prtldim trait for metrics
haykh Jan 31, 2026
e207373
support for 2D arrays in setup input
haykh Jan 31, 2026
2775a88
GR with no init_flds in pgen support
haykh Jan 31, 2026
754873f
rm unnecessary add_subdirectory in benchmark cmake
haykh Jan 31, 2026
4e1fa89
compton emission kernel
haykh Feb 5, 2026
0d43dd8
Merge branch 'dev/emission' of github.com:entity-toolkit/entity into …
haykh Feb 9, 2026
9fb060e
fixed fields now accepts time
haykh Feb 5, 2026
93f4002
CPUTEST
haykh Feb 5, 2026
9430ce5
rm unnecessary printf
haykh Feb 5, 2026
1d34ab9
Merge branch 'dev/fixfields' of github.com:entity-toolkit/entity into…
haykh Feb 9, 2026
8b0cc5c
compton emission routine
haykh Feb 11, 2026
acd6504
Merge branch 'dev/emission' into dev/fixfields
haykh Feb 11, 2026
bda9732
compton emission tested
haykh Feb 12, 2026
06fd6c4
synchrotron drag + fix mass dependence
haykh Feb 13, 2026
53fe419
Merge branch 'dev/fixfields' of github.com:entity-toolkit/entity into…
haykh Feb 13, 2026
9ed0c8c
rm strongfieldqed emission type for now
haykh Feb 17, 2026
016b309
Merge pull request #174 from entity-toolkit/dev/emission
haykh Feb 17, 2026
fc13991
rm plog from submodules -> move to explicit include (same for toml11)
haykh Feb 17, 2026
2ec9e35
mpi unit tests now include all other tests + fixed some MPI tests
haykh Feb 19, 2026
576dcd7
new particle_sort interval parameter (global & per species) + refacto…
haykh Feb 19, 2026
4de11eb
particle spatial sorting implemented + unit test
haykh Feb 24, 2026
87cfb91
switched to "no grad" condition for Dr at the axis
alisagk Feb 25, 2026
72ca76f
Merge pull request #182 from entity-toolkit/dev/axis_BC_GR
alisagk Feb 25, 2026
f64a8ee
stdc++fs only links with non-appleclang compilers CPUTEST
haykh Feb 25, 2026
c0295e4
ignore tombi
haykh Mar 2, 2026
2efe9db
mpi unit tests now include all other tests + fixed some MPI tests
haykh Feb 19, 2026
9092454
new particle_sort interval parameter (global & per species) + refacto…
haykh Feb 19, 2026
54f9698
particle spatial sorting implemented + unit test
haykh Feb 24, 2026
796a2cd
Merge branch 'dev/prtlsort' of github.com:entity-toolkit/entity into …
haykh Mar 2, 2026
5b658a2
per species clearing interval support
haykh Mar 3, 2026
c00031d
Merge pull request #181 from entity-toolkit/dev/prtlsort
haykh Mar 3, 2026
44d3940
removed dublicate computation of FldsID::V
alisagk Mar 3, 2026
e39f5e7
fixes bugs in tensor calculation:
alisagk Mar 3, 2026
3259d96
removed unnecessary commets
alisagk Mar 3, 2026
708c32a
fixed m^2 and simplified calculation
alisagk Mar 3, 2026
219afd5
in-prep for extfields
haykh Mar 4, 2026
76e4bf1
CPUTEST
haykh Mar 4, 2026
451bc62
added rusty dependencies
haykh Mar 5, 2026
05956ec
sort error on nvcc fixed
haykh Mar 5, 2026
79d83ba
sr pusher refactor
haykh Mar 5, 2026
82b1477
external fields support
haykh Mar 5, 2026
930fb85
dependencies.py for perlmutter
haykh Mar 6, 2026
9034acb
added option to output stats at higher precision
LudwigBoess Mar 6, 2026
38a42f8
use fixed `io_precision` for single and double precision
LudwigBoess Mar 9, 2026
d4453fd
Merge branch '1.4.0rc' into dev/stats_precision
LudwigBoess Mar 9, 2026
5603df3
Merge pull request #184 from entity-toolkit/dev/stats_precision
haykh Mar 10, 2026
83f80be
simplified bulk3vel and Tmunu computation
haykh Mar 10, 2026
6fde5d6
Merge pull request #185 from entity-toolkit/dev/momentum-output
alisagk Mar 12, 2026
d9268aa
formatting
haykh Mar 16, 2026
21e7eee
custom emission policy (pgen-defined) + unit test
haykh Mar 16, 2026
58ff9ba
examples for custom_emission
haykh Mar 17, 2026
e9dbf48
media for examples/custom_emission pgen
haykh Mar 17, 2026
44ef5d8
Update README with custom emission example link
haykh Mar 17, 2026
1157d1c
minor
haykh Mar 17, 2026
a06a360
Merge branch 'dev/emission' of github.com:entity-toolkit/entity into …
haykh Mar 17, 2026
3319505
actions
haykh Mar 17, 2026
1109724
minor warnings removed
haykh Mar 17, 2026
362689e
rm circular traits
haykh Mar 17, 2026
c0ad9fe
minor warnings
haykh Mar 17, 2026
c79d4e5
Merge pull request #188 from entity-toolkit/dev/emission
haykh Mar 17, 2026
8bfa9d6
lumi dependenciespy
haykh Mar 18, 2026
945b696
Direct field interpolation with arbitrary shape function for GR
LudwigBoess Mar 18, 2026
601ba8d
applied formatting
LudwigBoess Mar 18, 2026
83aa4f9
external fields support
haykh Mar 5, 2026
97d5753
Merge branch 'dev/extfields' of github.com:entity-toolkit/entity into…
haykh Mar 18, 2026
fc01e8d
new extfields + example usage
haykh Mar 19, 2026
9b3533b
Update README.md with an illustrative image
haykh Mar 19, 2026
8a563ee
unittests fixed
haykh Mar 19, 2026
66ec6a4
Merge pull request #183 from entity-toolkit/dev/extfields
haykh Mar 19, 2026
1534f75
external_fields.py renamed
haykh Mar 19, 2026
c120e16
custom energy dist example
haykh Mar 19, 2026
6cd87e0
Add image to README for custom energy distribution
haykh Mar 19, 2026
57f706a
added option to define custom particle BCs in pgen
LudwigBoess Mar 21, 2026
4a5bca1
Merge branch '1.4.0rc' into dev/custom_particle_bcs
LudwigBoess Mar 21, 2026
0d82644
readme upd
haykh Mar 23, 2026
1c0cca3
Add new contributors to README.md
haykh Mar 23, 2026
60ab4f2
upd dependencies
haykh Mar 23, 2026
59030d5
removed 1D and 3D versions
LudwigBoess Mar 23, 2026
4c500f8
match_fix_field_boundaries example
haykh Mar 24, 2026
3294a57
movie name changed
haykh Mar 24, 2026
69bbf52
match_fix_field_boundaries compiled in cpuarch test
haykh Mar 24, 2026
8cfa572
Update README.md with example resource links
haykh Mar 24, 2026
1d59b42
custom spatial dist example
haykh Mar 24, 2026
92eb357
custom spatial dist plotter
haykh Mar 24, 2026
111c046
Update README with custom spatial distribution link
haykh Mar 24, 2026
e7a5d35
atm example
haykh Mar 24, 2026
9abb9af
atmosphere example
haykh Mar 24, 2026
d0fc7ba
Add image for atmosphere example in README
haykh Mar 24, 2026
2701229
minor comments + unnecessary includes
haykh Mar 24, 2026
2e45b5c
Merge branch '1.4.0rc' of github.com:entity-toolkit/entity into 1.4.0rc
haykh Mar 24, 2026
2162d55
replenish injectors
haykh Mar 24, 2026
f15c1c1
Update README with links for replenish injector demo
haykh Mar 24, 2026
2d7cec3
replenish injector in cpuarch test
haykh Mar 24, 2026
e5a9970
Merge branch '1.4.0rc' into dev/custom_particle_bcs
LudwigBoess Mar 25, 2026
4b331db
tile-based-sort
haykh Mar 26, 2026
1a85aa7
global injector works with tracking + moved uniform injector counter …
haykh Mar 29, 2026
ec282e3
tracking reported in .info file
haykh Mar 29, 2026
1473c50
Merge branch '1.4.0rc' into dev/custom_particle_bcs
LudwigBoess Mar 30, 2026
b8be4ea
dependencies upd for rusty + mpi include in reporter
haykh Mar 31, 2026
64641af
rewrite to custom particle update
LudwigBoess Mar 31, 2026
2e36735
A-phi works correctly with MPI on frontier
Mar 31, 2026
077f908
remove redundant class default value
LudwigBoess Mar 31, 2026
211fa86
example for `CustomParticleUpdate`
LudwigBoess Mar 31, 2026
27761e1
removed remaining is_custom_in if clauses
LudwigBoess Mar 31, 2026
dedae54
bugfixes in example
LudwigBoess Mar 31, 2026
cba3e35
piston archetypes and pgen added
Apr 1, 2026
041684d
Merge branch 'dev/custom_particle_bcs' into custom_particleupdate
a-sullivan Apr 1, 2026
0dcda66
tile-based-sort
haykh Mar 26, 2026
66e719a
piston_shock.toml added
Apr 1, 2026
3c3bf4e
piston_shock.toml added
Apr 1, 2026
b3d1278
Merge branch 'dev/qed' of github.com:entity-toolkit/entity into dev/qed
haykh Apr 1, 2026
634f799
minor (header to macro)
haykh Apr 1, 2026
02e51da
new test for particle tiling
haykh Apr 1, 2026
f9ebc0c
test for tiling & tile-based sorting
haykh Apr 1, 2026
e2e659a
suppress unused namespace alias
haykh Apr 2, 2026
ec36dd2
Merge pull request #192 from a-sullivan/custom_particleupdate
LudwigBoess Apr 3, 2026
e9c927b
first attempt at moving window
LudwigBoess Apr 3, 2026
a6e4894
minor
haykh Apr 3, 2026
529c822
component-wise vector transform in gr metrics
haykh Apr 3, 2026
b2d4280
conditional fieldsetter kernel
haykh Apr 3, 2026
968243d
Merge branch '1.4.0rc' of github.com:entity-toolkit/entity into 1.4.0rc
haykh Apr 3, 2026
dd8845f
minor namespacing issue on AMD fixed
haykh Apr 3, 2026
0712287
tutorial pgen (WIP)
haykh Apr 6, 2026
40ef914
Merge branch '1.4.0rc' into dev/gr_field_interpolation
LudwigBoess Apr 6, 2026
e17e061
Merge pull request #189 from entity-toolkit/dev/gr_field_interpolation
LudwigBoess Apr 6, 2026
35d261f
revert to previous version
LudwigBoess Apr 6, 2026
a0dcff3
applied clang-format
LudwigBoess Apr 6, 2026
400b8ef
limiting ExtentToRange
Apr 6, 2026
5ff0867
0 --> ZERO
Apr 6, 2026
1e2cc71
Merge pull request #194 from entity-toolkit/dev/ExtentToRange-frontier
alisagk Apr 6, 2026
c08982f
ifdef for gpu aware mpi on
Apr 6, 2026
1013069
correct mass assignment
LudwigBoess Apr 6, 2026
0078b50
added missing undefs of macros
LudwigBoess Apr 6, 2026
1abec06
update tests to match new pusher definition
LudwigBoess Apr 7, 2026
394b708
added test for CustomParticleUpdate
LudwigBoess Apr 7, 2026
83b3426
Merge branch '1.4.0rc' into dev/custom_particle_bcs
LudwigBoess Apr 7, 2026
b11f24f
Merge pull request #190 from entity-toolkit/dev/custom_particle_bcs
LudwigBoess Apr 7, 2026
76680fe
moving window almost finished
LudwigBoess Apr 8, 2026
799c6bd
Merge branch '1.4.0rc' into dev/moving_window
LudwigBoess Apr 8, 2026
1413b4c
use globally defined piston position and velocity to avoid duplicate …
LudwigBoess Apr 8, 2026
366366d
bugfix in constructor
LudwigBoess Apr 8, 2026
c01953d
added unit conversion for piston_velocity and injection of new plasma
LudwigBoess Apr 8, 2026
3b20f5d
empty
haykh Apr 9, 2026
931ec61
updated description in header
LudwigBoess Apr 9, 2026
9665184
communicate particles after shift
LudwigBoess Apr 10, 2026
d052294
Fixed ckpt writing that leads to duplicate particle idx.
Apr 15, 2026
b764c91
rm benchmark mode
haykh Apr 16, 2026
bfa7a63
better enums
haykh Apr 16, 2026
1b3bd43
metric traits moved to global
haykh Apr 16, 2026
7948394
metric traits separated, concept now goes into class template directly
haykh Apr 16, 2026
22a6ab1
metric class in template now explicitly takes the concept
haykh Apr 17, 2026
f272426
some archetype class-traits now become concepts
haykh Apr 17, 2026
654436f
fixing piston implementation in piston_shock
Apr 20, 2026
d72d552
fixed bug where not all mpi ranks were updating the domain
Apr 20, 2026
4de520f
moved communication to window function and simplified pgen
LudwigBoess Apr 20, 2026
36ed7cc
multi-pgen compilation
haykh Apr 20, 2026
93a6f9b
fieldsetter traits
haykh Apr 20, 2026
ac41dd8
unnecessary bloat rm
haykh Apr 20, 2026
52f8255
added premerge to github actions
haykh Apr 20, 2026
c050466
emission policy traits
haykh Apr 21, 2026
9d76db3
extfields policy traits
haykh Apr 21, 2026
a299c98
emission moved to archetypes
haykh Apr 21, 2026
f899938
pgen traits moved to global
haykh Apr 21, 2026
52b46a9
always shift window by N_GHOSTS
LudwigBoess Apr 21, 2026
d3b2641
applied formatting
LudwigBoess Apr 21, 2026
45c6650
removed redundant field initialization
LudwigBoess Apr 21, 2026
dfd0fa8
removed redundant variables
LudwigBoess Apr 21, 2026
2d8b3bc
rollback to old enum types (FUCK NVCC!!!!)
haykh Apr 21, 2026
f2cc369
new pusher policy maker works! (still WIP)
haykh Apr 21, 2026
de9b3aa
new pusher! (piston not done yet)
haykh Apr 22, 2026
49387c4
moved unit tests to separate directory + removed unused conda/docker …
haykh Apr 22, 2026
292467a
tests refactored + added extra trait tests
haykh Apr 22, 2026
e54af8e
minor test refactor
haykh Apr 22, 2026
10c919e
agent md
haykh Apr 22, 2026
ccaeb4b
piston reincorporated
haykh Apr 22, 2026
a55de49
Merge branch 'dev/custom_prtl_update' into dev/moving_window
LudwigBoess Apr 22, 2026
acad863
updated moving window to match new class definitions
LudwigBoess Apr 22, 2026
c8fa563
moved check for piston crossing inside of piston
LudwigBoess Apr 22, 2026
2838547
Merge pull request #199 from xwgong01/fix/tracking_ckpt
haykh Apr 22, 2026
f179762
cleanup of tests
haykh Apr 22, 2026
b1c37a4
header descriptions updated
haykh Apr 22, 2026
d5f7aeb
renamed `PistonUpdate` to `Piston`
LudwigBoess Apr 22, 2026
1f51356
example for piston
LudwigBoess Apr 22, 2026
1b1385a
modified gr pusher to same as sr (contexts)
haykh Apr 22, 2026
6502bb6
moving window example
LudwigBoess Apr 22, 2026
546bdf8
removed piston_shock pgen
LudwigBoess Apr 22, 2026
0c80c4b
grpic with new refactor
haykh Apr 22, 2026
9444a65
parameters are now handled via std::optional for safety
haykh Apr 23, 2026
06fe94c
clang-tidy recommendations
haykh Apr 23, 2026
952a0a5
clang-tidy script + settings
haykh Apr 23, 2026
6173f0e
precompiled headers to speed up compilation
haykh Apr 23, 2026
cf0a203
header metas for new GR
haykh Apr 23, 2026
6e68d35
tidy sh clean up
haykh Apr 23, 2026
349363c
upd COC
haykh Apr 23, 2026
0a6f038
updated tidy sh capabilities
haykh Apr 23, 2026
d210ea5
implemented clang-tidy recommendations (round 1)
haykh Apr 23, 2026
f4c16e8
clang-tidy for pgens
haykh Apr 23, 2026
754cf7f
clang-tidy recommendations (round 2)
haykh Apr 23, 2026
54cc0df
finalized clang tidy flags
haykh Apr 23, 2026
394e78a
verify flag for tidy.sh for CI
haykh Apr 23, 2026
a5dae12
minor
haykh Apr 23, 2026
4737f73
clang-tidy with MPI
haykh Apr 23, 2026
c1b832b
formatting
haykh Apr 23, 2026
debba0b
run final tests (RUNTESTS)
haykh Apr 24, 2026
3dd5214
RUNTESTS + COMPILEPGENS
haykh Apr 24, 2026
ec63a55
COMPILEPGENS
haykh Apr 24, 2026
1596161
COMPILEPGENS
haykh Apr 24, 2026
d4cb064
COMPILEPGENS now without format check
haykh Apr 24, 2026
6334434
rm clang-tidy from ci
haykh Apr 24, 2026
3fe1dbf
rm unnecessary complexity of energy_dist
haykh Apr 24, 2026
0c225e4
rm unnecessary complexity of spatial_dist
haykh Apr 24, 2026
fb72328
pgen inheritance removed
haykh Apr 25, 2026
eebd915
oops (forgot to update emitted species counters after emission)
haykh Apr 25, 2026
466dcac
automatically run & plot example pgens
haykh Apr 25, 2026
6e61a96
RUNPGENS
haykh Apr 25, 2026
218e8c2
Merge branch 'dev/custom_prtl_update' into dev/moving_window
haykh Apr 25, 2026
c788022
fixed & simplified piston & replenish injectors
haykh Apr 25, 2026
4517d93
fixed moving window pgen
haykh Apr 25, 2026
e3356bb
moving window now updates metric
haykh Apr 26, 2026
cfda16d
minor
haykh Apr 26, 2026
bed0625
changing size domain compatible with restart
haykh Apr 26, 2026
1f552ac
upd claude md
haykh Apr 26, 2026
c27b833
media in examples
haykh Apr 26, 2026
c73ba41
Fix typos and improve README examples
haykh Apr 26, 2026
2049576
piston shock pgen rm
haykh Apr 26, 2026
0c7c517
Merge pull request #198 from entity-toolkit/dev/custom_prtl_update
haykh Apr 26, 2026
5e2e660
bugfix in piston
LudwigBoess Apr 27, 2026
0b376ad
rm target_precompile_headers as they cause issues on some systems
haykh Apr 27, 2026
2c623a0
changed nix-shell title to show config
haykh Apr 27, 2026
be6c5bb
Merge branch '1.4.0rc' into dev/moving_window
LudwigBoess Apr 27, 2026
5bdba11
RUNPGENS + RUNTESTS
haykh Apr 27, 2026
3e7e66c
merge 1.4.0rc back
haykh Apr 27, 2026
f07d789
Merge pull request #196 from entity-toolkit/dev/moving_window
LudwigBoess Apr 27, 2026
c970aa8
Merge branch '1.4.0rc' into dev/qed
haykh Apr 27, 2026
9f3c823
2bodyint
haykh May 4, 2026
026b94d
bug in sorting
haykh May 4, 2026
670c16e
pusherarrays -> particlearrays + fixes in tests
haykh May 4, 2026
e61f35e
Merge pull request #195 from entity-toolkit/dev/Aphi-mpi
alisagk May 4, 2026
2aa65ca
consistent integer sizing across the code
haykh May 4, 2026
6ecfef1
rm 2body
haykh May 4, 2026
8cdad8a
npart_t 64->32 bit
haykh May 4, 2026
5ed8c04
Merge pull request #201 from entity-toolkit/dev/consistent_int
haykh May 4, 2026
d8f2927
examples/tutorials moved to separate directories
haykh May 5, 2026
f3ec92c
refactored cmake for pgens
haykh May 6, 2026
89dbc20
added option to compile pgens without running in tests.sh
haykh May 6, 2026
a06fb79
formatting
haykh May 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ IncludeCategories:
Priority: 2
- Regex: '^"utils\/.*.h"'
Priority: 2
- Regex: '^"traits\/.*.h"'
Priority: 2
- Regex: '^"metrics\/.*\.h"'
Priority: 3
- Regex: '^"framework\/.*\.h"'
Expand All @@ -108,6 +110,10 @@ IncludeCategories:
Priority: 4
- Regex: '^"checkpoint\/.*\.h"'
Priority: 4
- Regex: '^"kernels\/.*\.hpp"'
Priority: 4
- Regex: '^"kernels\/.*\.h"'
Priority: 4
- Regex: '^"output\/.*\.h"'
Priority: 4
- Regex: '^"archetypes\/.*\.h"'
Expand Down
36 changes: 36 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Checks: >
-*,
bugprone-*,
performance-*,
clang-analyzer-*,
clang-diagnostic-*,
misc-include-cleaner,
misc-const-correctness,
misc-unused-parameters,
misc-unused-using-decls,
cppcoreguidelines-pro-type-member-init,
cppcoreguidelines-slicing,
cppcoreguidelines-virtual-class-destructor,
cppcoreguidelines-prefer-member-initializer,
modernize-use-nullptr,
modernize-use-override,
modernize-use-default-member-init,
modernize-use-emplace,
modernize-loop-convert,
modernize-make-unique,
modernize-make-shared,
modernize-use-using,
readability-container-size-empty,
readability-redundant-*,
readability-simplify-boolean-expr,
readability-misleading-indentation,
readability-inconsistent-declaration-parameter-name,
-misc-const-correctness,
-bugprone-easily-swappable-parameters,
-bugprone-unchecked-optional-access
WarningsAsErrors: "*"
HeaderFilterRegex: "src/.*"
FormatStyle: file
SystemHeaders: false
CheckOptions:
misc-include-cleaner.IgnoreHeaders: 'adios2\.h;adios2/.*;Kokkos_.*\.hpp'
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
70 changes: 70 additions & 0 deletions .github/workflows/pgens-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Premerge compilation on CPUs for all pgens

on:
push:
pull_request:
types: [ready_for_review]

jobs:
check-commit:
runs-on: ubuntu-24.04
outputs:
run_tests: ${{ steps.check_message.outputs.run_tests }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check commit message
id: check_message
run: |
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.action }}" == "ready_for_review" ]]; then
echo "run_tests=true" >> "$GITHUB_OUTPUT"
exit 0
fi
if git log -1 --pretty=%B | grep -q "RUNPGENS"; then
echo "run_tests=true" >> "$GITHUB_OUTPUT"
else
echo "run_tests=false" >> "$GITHUB_OUTPUT"
fi
pgens:
needs: check-commit
if: needs.check-commit.outputs.run_tests == 'true'
name: PGENS (mpi=${{ matrix.mpi }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
mpi: [ON, OFF]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install GCC 14 and build tools
run: |
sudo apt-get update
sudo apt-get install -y gcc-14 g++-14 gfortran-14 build-essential wget libevent-dev libhwloc-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 50
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-14 50
gcc --version
g++ --version
- name: Install CMake (3.x)
run: |
sudo apt-get install -y cmake
cmake --version
- name: Install OpenMPI 5
run: |
if [ "${{ matrix.mpi }}" = "ON" ]; then
sudo apt-get install -y libopenmpi-dev openmpi-bin
mpirun --version
fi
- name: Compile all pgens
run: |
if [ "${{ matrix.mpi }}" = "ON" ]; then
export CC=mpicc
export CXX=mpicxx
else
export CC=gcc-14
export CXX=g++-14
fi
./dev/scripts/tests.sh --build build --with_pgens --flags "-D mpi=${{ matrix.mpi }} -D output=OFF"
58 changes: 15 additions & 43 deletions .github/workflows/cpuarch.yml → .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: CPU Compilation/Unit Tests
name: Premerge tests on CPUs with different configurations

on:
push:
pull_request:
types: [ready_for_review]

jobs:
check-commit:
Expand All @@ -14,15 +16,19 @@ jobs:
- name: Check commit message
id: check_message
run: |
if git log -1 --pretty=%B | grep -q "CPUTEST"; then
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.action }}" == "ready_for_review" ]]; then
echo "run_tests=true" >> "$GITHUB_OUTPUT"
exit 0
fi
if git log -1 --pretty=%B | grep -q "RUNTESTS"; then
echo "run_tests=true" >> "$GITHUB_OUTPUT"
else
echo "run_tests=false" >> "$GITHUB_OUTPUT"
fi
tests:
needs: check-commit
if: needs.check-commit.outputs.run_tests == 'true'
name: UNIT_TESTS (precision=${{ matrix.precision }}, mpi=${{ matrix.mpi }}, output=${{ matrix.output }})
name: UNIT_TESTS with (precision=${{ matrix.precision }}, mpi=${{ matrix.mpi }}, output=${{ matrix.output }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
Expand Down Expand Up @@ -57,9 +63,11 @@ jobs:
cmake --version
- name: Install OpenMPI 5
run: |
sudo apt-get install -y libopenmpi-dev openmpi-bin
mpirun --version
- name: Configure
if [ "${{ matrix.mpi }}" = "ON" ]; then
sudo apt-get install -y libopenmpi-dev openmpi-bin
mpirun --version
fi
- name: Compile and run all tests
run: |
if [ "${{ matrix.mpi }}" = "ON" ]; then
export CC=mpicc
Expand All @@ -68,40 +76,4 @@ jobs:
export CC=gcc-14
export CXX=g++-14
fi
cmake -B build -D TESTS=ON -D precision=${{ matrix.precision }} -D mpi=${{ matrix.mpi }} -D output=${{ matrix.output }}
- name: Compile
run: cmake --build build -j "$(nproc)"
- name: Run tests
run: ctest --test-dir build --output-on-failure
pgens:
needs: check-commit
if: needs.check-commit.outputs.run_tests == 'true'
name: PGENS (pgen=${{ matrix.pgen }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
pgen: [streaming, turbulence, reconnection, shock, magnetosphere, accretion, wald]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install GCC 14 and build tools
run: |
sudo apt-get update
sudo apt-get install -y gcc-14 g++-14 gfortran-14 build-essential wget libevent-dev libhwloc-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 50
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-14 50
gcc --version
g++ --version
- name: Install CMake (3.x)
run: |
sudo apt-get install -y cmake
cmake --version
- name: Configure
run: |
cmake -B build -D pgen=${{ matrix.pgen }} -D output=OFF
- name: Compile
run: cmake --build build -j "$(nproc)"
./dev/scripts/tests.sh --build build --with_tests --flags "-D precision=${{ matrix.precision }} -D mpi=${{ matrix.mpi }} -D output=${{ matrix.output }}"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ temp*/
logs/
*.log
*.bak
temp*
tmp*

# Trash files
.trash/
Expand All @@ -40,6 +42,7 @@ venv/
*.mov
*.mp4
!pgens/**/*.png
!pgens/**/*.mp4

# Accidental files
*.xc
Expand All @@ -59,3 +62,6 @@ tags
action-token
*.vim
ignore-*
tombi/
tidy/
.claude
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "extern/plog"]
path = extern/plog
url = https://github.com/SergiusTheBest/plog.git
[submodule "extern/adios2"]
path = extern/adios2
url = https://github.com/ornladios/ADIOS2.git
Expand Down
122 changes: 122 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

This is an astrophysical particle-in-cell plasma simulation code which works in arbitrary curvilinear coordinates and supports multiple simulation engines. It is built using the Kokkos performance portability library with C++20. It is parallelized with MPI, and uses the ADIOS2 library for outputting and checkpointing the simulation data.

## Repository Structure

```
entity
├── cmake # additional cmake files
│ ├── adios2Config.cmake # default configurations for in-tree build of adios2
│ ├── config.cmake # compile-time configuration options
│ ├── defaults.cmake # default values for configurations
│ ├── dependencies.cmake # functions to fetch and build the dependencies
│ ├── kokkosConfig.cmake # default configurations for in-tree build of Kokkos
│ ├── report.cmake # configuration repoting
│ ├── styling.cmake # styling functions
│ └── tests.cmake # root cmake for tests
├── dev # developer-specific tools
│ ├── nix # nix-shells
│ ├── runners # dockerfiles for github runners on different architectures
│ ├── scripts # developer-specific scripts
│ ├── Dockerfile.common # parent docker environment for development
│ ├── Dockerfile.cuda # cuda docker environment
│ ├── Dockerfile.rocm # rocm docker environment
│ ├── welcome.cuda
│ └── welcome.rocm
├── extern # git submodules
│ ├── Kokkos
│ ├── adios2
│ └── entity-pgens
├── include # included header-only third-party libraries
│ ├── plog
│ └── toml11
├── minimal # set of minimalist programs for testing MPI/Kokkos/adios2
├── pgens # problem generators
├── src # main code containing all separate submodules
│ ├── archetypes # archetypes which can be used by the user in problem generators
│ ├── engines # simulation engines
│ ├── framework # main structures, classes and containers
│ ├── global # global definitions and utilities
│ ├── kernels # core kernels (defined as functors)
│ ├── metrics # various metric classes
│ ├── output # functions related to output
│ ├── CMakeLists.txt
│ └── entity.cpp # main entry-point
├── tests # unit tests for all submodules
├── .clang-format # code formatting guidelines for clang-format
├── .clang-tidy # configurations for the clang-tidy
├── .gitattributes
├── .gitignore
├── .gitmodules
├── .taplo.toml # formatting guidelines for toml files
├── CITATION
├── CLAUDE.md
├── CMakeLists.txt # root cmake file
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── dependencies.py # deployment scripts on various machines
└── input.example.toml # most complete toml file with all possible input options
```

## Testing

The code is tested using the `./dev/scripts/tests.sh` script which compiles and runs all the unit tests using `ctest`:

```sh
./dev/scripts/tests.sh --build build_dir --flags "-D mpi=ON" --with_tests
```

All the unit tests are inside the `tests/` directory each within the respective subdirectory; e.g., tests for `src/kernels` are in `tests/kernels`. When testing, build the tests both with and without MPI and, ideally, with and without GPU (when available).

You can also compile all the problem generators:

```sh
./dev/scripts/tests.sh --build build_dir --flags "-D mpi=ON" --with_pgens
```

## Code guidelines

* Format of the code is enforced using `clang-format` and `cmake-format`. You can run the formatting on all files with `./dev/scripts/format.sh`.

* Best practices are also enforced using `clang-tidy`; to generate recommendations for all the files, run `./dev/scripts/tidy.sh --build build_dir` where `build_dir` is the directory where the code was built, or for specific files: `./dev/scripts/tidy.sh --build build_dir --files "(file1|file2).cpp"` or only for the changed files: `./dev/scripts/tidy.sh --build build_dir --changed`. The recommendations will be in the `tidy/` directory.

* Use `const` and `auto` declarations where possible.

* For real-valued literals, use `ONE`, `ZERO`, `HALF` etc. instead of `1.0`, `0.0`, `0.5` to ensure the compiler will not need to cast. If the value is not defined as a macro, use `static_cast<real_t>(123.4)`.

* Use {} in declarations to signify a null (placeholder) value for the given variable:
```cpp
auto a { -1 }; // <- value of `a` *will* be changed later (-1 is a placeholder)
auto b = -1; // <- value of `b` is known at the time of declaration (but *may* change later)
const auto b = -1; // <- value of `b` is not expected to change later
```

* Each header file has to have a description at the top, consisting of the following fields:

* `@file` [required] the name of the file (as it should be included in other files)
* `@brief` [required] brief description of what the file contains
* `@implements` list of class/function/macros implementations
* structs/classes in this section have no prefix (templates are marked with <>)
* functions are marked with their return type, e.g. -> void
* type aliases have a prefix type
* enums or enum-like objects are marked with enum
* macros have a prefix macro
* all of the above are also marked with their respective namespaces (if any): namespace::
* `@cpp`: list of cpp files that implement the header
* `@namespaces`: list of namespaces defined in the file
* `@macros`: list of macros that the file depends on
* `@note` any additional notes (stack as many as necessary)

* `#ifdef`/`#define` macros should be avoided. Use C++20 concept and `if constexpr ()` expressions to specialize functions and classes instead (ideally, specialize them explicitly). `#ifdef`-s are only acceptable in platform/library-specific parts of the code (e.g., `MPI_ENABLED`, `GPU_ENABLED`, `DEBUG`, etc.), or for major shortcuts.

* Header files should start with `#ifndef` ... `#define` ... and end with `#endif`; do not use `#pragma` guards. The name of the macro should be the same as the name of the file in uppercase, with underscores instead of dots and slashes. For example, for `global/utils/formatting.h`, the macro should be `GLOBAL_UTILS_FORMATTING_H`.

* There is no difference between `.h` and `.hpp` files as both indicate C++ header files. As a consistency convention, we use `.h` for common headers which may be included from multiple `.cpp` files (e.g., metrics), while `.hpp` are very specific headers for only a single (or a couple of) .cpp file (e.g. kernels).

* Do assertions on parameters and quantities whenever possible. Outside the kernels, use `raise::Error(message, HERE)` and `raise::ErrorIf(condition, message, HERE)` to throw exceptions. Inside the kernels, use `raise::KernelError(HERE, message, **args)`. To enable compile-time errors, use `static_assert(condition, message)`. The `HERE` keyword is macro that includes the filename and line number in the error message.
Loading
Loading