Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
860b025
Implement particle production diagnostic for nuclear fusion collisions
dpgrote Jun 17, 2026
200d9da
Add Source/Particles/Collision/CollisionFuncBase.H
dpgrote Jun 17, 2026
1dba689
Add documentation
dpgrote Jun 17, 2026
36922e4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 17, 2026
82188e7
Turn on redistribute_on_remake so data is preserved after a load balance
dpgrote Jun 18, 2026
bebd4f1
Update CI test, fixing tolerance and updating test_3d_deuterium_triti…
dpgrote Jun 18, 2026
aea363d
Fix documentation for SingleNuclearFusionEvent
dpgrote Jun 18, 2026
3f6bc69
Add virtual destructor to CollisionFuncBase.H
dpgrote Jun 18, 2026
ae3eb3f
Fix handling of i_cell method argument
dpgrote Jun 18, 2026
01e17a1
Add default constructor and other things to CollisionFuncBase.H
dpgrote Jun 18, 2026
dc923bb
Implement checkpoint/restart
dpgrote Jun 22, 2026
07202ae
Fix comments
dpgrote Jun 22, 2026
94fc1ca
Fix comment
dpgrote Jun 22, 2026
87ecf05
Fix documentation
dpgrote Jun 22, 2026
ea85d48
Fix Python interface for MF registry
dpgrote Jun 22, 2026
5a2ec9c
Fix const
dpgrote Jun 22, 2026
3eefd25
Add default values in alloc_init python interface
dpgrote Jun 22, 2026
f5b2d0b
For completeness, allow writing of any vector MFs to diagnostics
dpgrote Jun 23, 2026
3c28739
Merge branch 'development' into add_fusion_particle_production_diagno…
dpgrote Jun 23, 2026
5e74d70
Add writing for RZ
dpgrote Jun 24, 2026
3e02d97
Implement diagnostic writing for any MultiFab vector component
dpgrote Jun 24, 2026
9747969
Small const fix
dpgrote Jun 24, 2026
6cefc1e
Add CI restart test
dpgrote Jun 24, 2026
bf9ed44
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 24, 2026
ffc3f1c
Merge branch 'development' into add_fusion_particle_production_diagno…
dpgrote Jul 2, 2026
38d8f57
Fix dependency in nuclear_fusion/CMakeLists.txt
dpgrote Jul 2, 2026
4e77182
Merge branch 'development' into add_fusion_particle_production_diagno…
dpgrote Jul 6, 2026
e8910c3
Fixes to CI test
dpgrote Jul 6, 2026
0c68248
Merge branch 'development' into add_fusion_particle_production_diagno…
dpgrote Jul 7, 2026
e307818
Update CI benchmark for test_3d_deuterium_tritium_fusion
dpgrote Jul 7, 2026
6c7bd15
Merge branch 'development' into add_fusion_particle_production_diagno…
dpgrote Jul 22, 2026
11a8698
Update test_3d_deuterium_tritium_fusion CI test
dpgrote Jul 23, 2026
34178ec
Refactor mass matrix application into ApplyMassMatrices (#7086)
RemiLehe Jul 22, 2026
65592c0
Add user-defined warpx.self_fields_num_sweeps for MLMG (#6907)
oshapoval Jul 23, 2026
e4ed6a1
Add checkpoint_restart flag to MultiFab registry (#7023)
dpgrote Jul 24, 2026
4b3bb02
Allow any MultiFab to be written to the diagnostics (#7025)
dpgrote Jul 24, 2026
45f3fa9
Revert test_3d_deuterium_tritium_fusion.json
dpgrote Jul 24, 2026
94ac9af
More fixes to benchmarks test_3d_deuterium_tritium_fusion and test_3d…
dpgrote Jul 24, 2026
13eac1a
Merge branch 'development' into add_fusion_particle_production_diagno…
dpgrote Jul 28, 2026
8ebef7b
Renamed CI test to inputs_test_3d_deuterium_tritium_fusion_rerun
dpgrote Jul 28, 2026
9b8059d
Merge branch 'development' into add_fusion_particle_production_diagno…
dpgrote Jul 29, 2026
ccb5b66
Update Docs/source/usage/parameters.rst
dpgrote Aug 26, 2026
5cbdaf0
Fix RZ/RCYLINDER DSMC ionization double velocity rotation and guard a…
roelof-groenewald Jul 29, 2026
17d7305
Revert fix for NVHPC dependency error in CUDA CI pipeline (#7108)
EZoni Jul 30, 2026
8b5d644
picmi: actually select the preconditioner passed to NewtonNonlinearSo…
clarkse-he Jul 31, 2026
ce0e316
Implement electron energy equation to the hybrid solver (#6982)
prkkumar-he Jul 31, 2026
a05c760
Docs: convert `GOVERNANCE.rst` to `GOVERNANCE.md` (#7115)
ax3l Jul 31, 2026
95acefa
Fix Janssen 2016 entry in refs.bib (#7116)
eebasso Jul 31, 2026
36bd5fe
RZ: conserve charge and current under binomial filtering (#7059)
clarkse-he Jul 31, 2026
41bd3a4
Bug: `amrex::For` if indices are not independent (#7100)
ax3l Jul 31, 2026
edc4496
Hybrid-PIC: fix sticky m_substeps ratchet under RKF45 (#7091)
tomzhu0225 Aug 1, 2026
0719282
Docs: replace arrow vector notation `\vec` with `\boldsymbol` (#7073)
RemiLehe Aug 3, 2026
647dec2
Background collisions: evaluate parsers at Cartesian coordinates (#7122)
RemiLehe Aug 3, 2026
8cbfccf
Python: Improved `Config` (#7110)
ax3l Aug 3, 2026
31ff56a
Bump github/codeql-action from 4 to 4.37.4 (#7125)
dependabot[bot] Aug 3, 2026
88656a2
[pre-commit.ci] pre-commit autoupdate (#7127)
pre-commit-ci[bot] Aug 3, 2026
3c53407
Config: Omit Versions (#7129)
ax3l Aug 4, 2026
c835a17
Release: WarpX 26.08 (#7119)
github-actions[bot] Aug 4, 2026
6f484b8
ImplicitPushPX: Self-Assert Components (#7117)
ax3l Aug 4, 2026
286df57
Replace `pml_edge_lengths` by `pml_eb_update_E` (#7076)
RemiLehe Aug 4, 2026
6bf755e
Dependencies: weekly update (#7123)
github-actions[bot] Aug 5, 2026
3598741
Add total luminosity to `DifferentialLuminosity` reduced diagnostics …
aeriforme Aug 7, 2026
c47fd1b
Reduce code duplication in hybrid-PIC Te calculation (#7140)
roelof-groenewald Aug 7, 2026
31f13ee
clang-tidy CI test: bump clang version from 19 to 20 (#7137)
lucafedeli88 Aug 7, 2026
5febc7d
Shape factors cleanup: remove superfluous parenthesis, avoid unneeded…
RemiLehe Aug 8, 2026
7595c99
Fix hybrid electron energy equation vacuum Te sink (#7128)
prkkumar-he Aug 8, 2026
da99db9
Python: Fix WarpX Singleton Lifetime and Leaking Statics (#7142)
ax3l Aug 10, 2026
18b1f61
Fix temperature deposition in cylindrical coordinates (#7113)
tomzhu0225 Aug 10, 2026
b8ced11
Bump github/codeql-action from 4.37.4 to 4.37.6 (#7148)
dependabot[bot] Aug 10, 2026
1ac9b99
Docs: Contributors can trigger GPU tests (#6949)
ax3l Aug 10, 2026
6680a01
Docs: Restore `governance` Anchor Lost in Markdown Conversion (#7150)
ax3l Aug 11, 2026
afac7d7
Particle initialization: add option to read `u_mean`/`u_std` from an …
oshapoval Aug 11, 2026
d8b5f8a
Restrict subcycling to explicit electromagnetic solvers (#7147)
RemiLehe Aug 11, 2026
e374ea6
QEDInternals: use designated initializers (C++20) to clarify the init…
lucafedeli88 Aug 11, 2026
202b02a
Update guidance for tests in AGENTS.md (#7157)
RemiLehe Aug 11, 2026
17bf853
Fix QDSMC radial volume weighting in RZ (#7130)
tomzhu0225 Aug 12, 2026
aa46063
Dependencies: weekly update (#7146)
github-actions[bot] Aug 12, 2026
5962f9a
Fix uninitialized guard cells of the EB update flags (`m_eb_update_E`…
clarkse-he Aug 13, 2026
a8a6e4f
Fix non-docs CI filter for nested markdown/rst files (#7159)
EZoni Aug 13, 2026
90be89b
Embedded-boundary thermal (diffuse) particle re-emission (#7008)
clarkse-he Aug 13, 2026
91a946d
use max directional value of |vp|/dx when limiting time step by parti…
JustinRayAngus Aug 13, 2026
ba3fce5
Store and use per-mesh-refinement-level EB IndexSpace (#7034)
WeiqunZhang Aug 13, 2026
65f06a7
BinaryCollision: stabilize TwoProductComputeProductMomenta in SINGLE …
EZoni Aug 13, 2026
09b0a6b
Docs: clarify LinearSolver/LinearFunction operator interface (#7163)
RemiLehe Aug 14, 2026
1f5dd8a
Add Macroscopic Property PICMI API (#7120)
pearlmam Aug 14, 2026
49ea04e
Implement alternative shuffling methods for collisions (#6692)
dpgrote Aug 15, 2026
04ae5c3
Fix staggered temperature moment normalization (#7162)
tomzhu0225 Aug 17, 2026
3939acb
Dependencies: weekly update (#7167)
github-actions[bot] Aug 17, 2026
3448a63
Bump github/codeql-action from 4.37.6 to 4.37.7 (#7169)
dependabot[bot] Aug 17, 2026
425b137
Clean up AddPlasmaFlux (#6908)
dpgrote Aug 17, 2026
5b497ab
Add Groenewald (2026) to science highlights (#7175)
roelof-groenewald Aug 19, 2026
5acbcb7
Python: Clear Input State in `warpx.finalize()` (#7143)
ax3l Aug 19, 2026
64fd9cb
Add Darwin solver (#6293)
roelof-groenewald Aug 20, 2026
12c50b8
PICMI: pass unrecognized field names through to the diagnostics (#7156)
n01r Aug 20, 2026
f24a858
ECT: use a named enumeration for the face info flags (#7172)
RemiLehe Aug 21, 2026
744b742
Add EOL to benchmark JSON files written by update_benchmarks_from_azu…
dpgrote Aug 21, 2026
0640089
Dependencies: weekly update (#7188)
github-actions[bot] Aug 24, 2026
eaa6f48
Darwin - use `galerkin` interpolation for ES part (#7082)
roelof-groenewald Aug 24, 2026
c0854b9
Bump github/codeql-action from 4.37.7 to 4.37.8 (#7190)
dependabot[bot] Aug 24, 2026
2628cf8
Mass matrices: remove a spurious 1/gamma in prefactor (#7189)
RemiLehe Aug 25, 2026
7499cab
Fix indexing relative to tiling
dpgrote Aug 25, 2026
2236712
Fix threading issue when setting m_particle_production
dpgrote Aug 26, 2026
8628687
Various fixes
dpgrote Aug 26, 2026
60938e3
Merge branch 'development' into add_fusion_particle_production_diagno…
dpgrote Aug 26, 2026
09a5b2c
Fix const
dpgrote Aug 26, 2026
0695eb1
Merge branch 'development' into add_fusion_particle_production_diagno…
dpgrote Aug 27, 2026
b23e375
Fix Examples/Tests/nuclear_fusion/CMakeLists.txt
dpgrote Aug 27, 2026
ebf0dd3
use atOffset to calculate indices
dpgrote Aug 28, 2026
332358e
Remove restart test - too complicated
dpgrote Aug 28, 2026
332f55f
Remove unneeded benchmark file
dpgrote Aug 28, 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
17 changes: 17 additions & 0 deletions Docs/source/usage/parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3064,6 +3064,23 @@ Details about the collision models can be found in the :ref:`theory section <mul
With ``forward``, the scattering angle is set to zero, i.e. the products are emitted in the same direction as the reactant (in the center of mass frame).
With ``backward``, the scattering angle is set to :math:`\pi`, i.e. the products are emitted in the opposite direction of the reactant (in the center of mass frame).

.. pp:param:: <collision_name>.create_products
:type: ``bool``
:default: ``1``
:optional:

Only for ``nuclearfusion``. When true, the product particles are created, otherwise not.

.. pp:param:: <collision_name>.save_particle_production
:type: ``bool``
:default: ``0``
:optional:

Only for ``nuclearfusion``.
When true, the integrated product particle density is saved in a MultiFab with the name ``<collision_name>_particle_production``.
The data can be written out by adding that name to the ``<diag_name>.fields_to_plot`` input parameter.
The option can be used in conjunction with ``<collision_name>.create_products`` to save only the product density and not create particles.

.. pp:param:: <collision_name>.background_density
:type: ``float``

Expand Down
22 changes: 22 additions & 0 deletions Examples/Tests/nuclear_fusion/analysis_two_product_fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@
reaction_type = "DT"
reactant_species = ["deuterium", "tritium"]
product_species = ["helium4", "neutron"]
collision_names = ["DTF1", "DTF2"]
ntests = 2
E_fusion = 17.58929696 * MeV_to_Joule
else:
# else, this is the D+D test
reaction_type = "DD"
reactant_species = ["deuterium", "hydrogen2"]
product_species = ["helium3", "neutron"]
collision_names = ["DDNHeF1"]
ntests = 1
E_fusion = 3.26891111e6 * MeV_to_Joule

Expand Down Expand Up @@ -399,6 +401,19 @@ def check_macroparticle_number(
atol=5.0 * std_macroparticle_number,
)

if "particle_production" in data:
w_sum = data[product_species[0] + "_w_end"].sum()
n_sum = data["particle_production"].sum()
tolerance = 0.02
print(
f"Check particle production diagnostic for collision {data['collision_name']}:"
)
print(f"from particles = {w_sum}")
print(f"from diagnostic = {n_sum}")
print(f"error = {np.abs(w_sum - n_sum) / w_sum}")
print(f"tolerance = {tolerance}")
assert is_close(w_sum, n_sum, rtol=tolerance)
Comment on lines +404 to +415

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a volume multiplication factor in the comparison between weights and density?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this test case, the cell volume is 1 so the factor is not needed.


## used in subsequent function
return expected_fusion_number

Expand Down Expand Up @@ -545,6 +560,13 @@ def main():
# General checks that are performed for all tests
generic_check(data)

product_production_name = f"{collision_names[i - 1]}_particle_production"
if ("boxlib", product_production_name) in ds_end.field_list:
data["collision_name"] = collision_names[i - 1]
data["particle_production"] = field_data_end[
"boxlib", product_production_name
].to_ndarray()

# Checks that are specific to test number i
eval("specific_check" + str(i) + "(data, dt)")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
####### GENERAL PARAMETERS ######
#################################
## With these parameters, each cell has a size of exactly 1 by 1 by 1
max_step = 1
# Run two steps. The first step to check the fusion collisions, the
# second step to provide a comparison for the rerun.
max_step = 2
amr.n_cell = 8 8 16
amr.max_grid_size = 8
amr.blocking_factor = 8
Expand Down Expand Up @@ -121,15 +123,24 @@ DTF1.species = deuterium_1 tritium_1
DTF1.product_species = helium4_1 neutron_1
DTF1.type = nuclearfusion
DTF1.event_multiplier = 1.e50
DTF1.create_products = 1
DTF1.save_particle_production = 1

DTF2.species = deuterium_2 tritium_2
DTF2.product_species = helium4_2 neutron_2
DTF2.type = nuclearfusion
DTF2.event_multiplier = 1.e15
DTF2.probability_target_value = 0.02
DTF2.create_products = 1
DTF2.save_particle_production = 1

# Diagnostics
diagnostics.diags_names = diag1
diagnostics.diags_names = diag1 checkpoint
diag1.intervals = 1
diag1.diag_type = Full
diag1.fields_to_plot = rho
diag1.fields_to_plot = rho DTF1_particle_production DTF2_particle_production

checkpoint.format = checkpoint
checkpoint.diag_type = Full
checkpoint.intervals = 1:1:1
checkpoint.dump_last_timestep = 0
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
{

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, the only changes in this file are adding the DTF1_particle_production and DTF2_particle_production benchmark values. Otherwise the changes below are there since the file has been alphabetized. The values are unchanged.

"lev=0": {
"rho": 0.0
},
"neutron_2": {
"particle_momentum_x": 1.5369063360838545e-15,
"particle_momentum_y": 1.5327717119671177e-15,
"particle_momentum_z": 1.5632203763888702e-15,
"particle_position_x": 136756.17264787608,
"particle_position_y": 136453.48037878488,
"particle_position_z": 290503.22456411575,
"particle_weight": 6.347081228434342e+18
},
"neutron_1": {
"particle_momentum_x": 1.7270063957926637e-15,
"particle_momentum_y": 1.7295255445271788e-15,
"particle_momentum_z": 1.7442619148907942e-15,
"particle_position_x": 151546.7150677448,
"particle_position_y": 151695.5086129642,
"particle_position_z": 323004.4593236664,
"particle_weight": 4.337788155202713e-28
"deuterium_1": {
"particle_momentum_x": 0.0,
"particle_momentum_y": 0.0,
"particle_momentum_z": 2.8872569136407634e-13,
"particle_position_x": 40958427.50992301,
"particle_position_y": 40959476.34450768,
"particle_position_z": 81921930.27522022,
"particle_weight": 1024.0000000000002
},
"deuterium_2": {
"particle_momentum_x": 0.0,
Expand All @@ -29,23 +17,14 @@
"particle_position_z": 8192362.405430986,
"particle_weight": 1.0240001137714307e+30
},
"tritium_1": {
"particle_momentum_x": 0.0,
"particle_momentum_y": 0.0,
"particle_momentum_z": 2.887256913640763e-13,
"particle_position_x": 40959200.11081588,
"particle_position_y": 40960650.407891415,
"particle_position_z": 81920772.7986121,
"particle_weight": 1024.0000000000002
},
"deuterium_1": {
"particle_momentum_x": 0.0,
"particle_momentum_y": 0.0,
"particle_momentum_z": 2.8872569136407634e-13,
"particle_position_x": 40958427.50992301,
"particle_position_y": 40959476.34450768,
"particle_position_z": 81921930.27522022,
"particle_weight": 1024.0000000000002
"helium4_1": {
"particle_momentum_x": 1.7270063957926637e-15,
"particle_momentum_y": 1.7295255445271788e-15,
"particle_momentum_z": 1.7442619148907942e-15,
"particle_position_x": 151546.7150677448,
"particle_position_y": 151695.5086129642,
"particle_position_z": 323004.4593236664,
"particle_weight": 4.337788155202713e-28
},
"helium4_2": {
"particle_momentum_x": 1.5369063360838545e-15,
Expand All @@ -56,7 +35,12 @@
"particle_position_z": 290503.22456411575,
"particle_weight": 6.347081228434342e+18
},
"helium4_1": {
"lev=0": {
"DTF1_particle_production": 4.415241048343040e-28,
"DTF2_particle_production": 6.295151973703336e+18,
"rho": 0.0
},
"neutron_1": {
"particle_momentum_x": 1.7270063957926637e-15,
"particle_momentum_y": 1.7295255445271788e-15,
"particle_momentum_z": 1.7442619148907942e-15,
Expand All @@ -65,6 +49,24 @@
"particle_position_z": 323004.4593236664,
"particle_weight": 4.337788155202713e-28
},
"neutron_2": {
"particle_momentum_x": 1.5369063360838545e-15,
"particle_momentum_y": 1.5327717119671177e-15,
"particle_momentum_z": 1.5632203763888702e-15,
"particle_position_x": 136756.17264787608,
"particle_position_y": 136453.48037878488,
"particle_position_z": 290503.22456411575,
"particle_weight": 6.347081228434342e+18
},
"tritium_1": {
"particle_momentum_x": 0.0,
"particle_momentum_y": 0.0,
"particle_momentum_z": 2.887256913640763e-13,
"particle_position_x": 40959200.11081588,
"particle_position_y": 40960650.407891415,
"particle_position_z": 81920772.7986121,
"particle_weight": 1024.0000000000002
},
"tritium_2": {
"particle_momentum_x": 0.0,
"particle_momentum_y": 0.0,
Expand All @@ -74,4 +76,4 @@
"particle_position_z": 819126.8984535292,
"particle_weight": 1.0239999999365294e+29
}
}
}
15 changes: 12 additions & 3 deletions Source/Particles/Collision/BinaryCollision/BinaryCollision.H
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ public:
BinaryCollision ( BinaryCollision&& ) = delete;
BinaryCollision& operator= ( BinaryCollision&& ) = delete;

void AllocData () override
{
m_binary_collision_functor.AllocData();
}

/** Perform the collisions
*
* @param cur_time Current time
Expand Down Expand Up @@ -296,7 +301,7 @@ public:

ABLASTR_PROFILE("BinaryCollision::doCollisionsWithinTile");

const auto& binary_collision_functor = m_binary_collision_functor.executor();
const auto& binary_collision_functor = m_binary_collision_functor.executor(lev, mfi);
const bool have_product_species = m_have_product_species;

// Store product species data in vectors
Expand Down Expand Up @@ -326,6 +331,8 @@ public:
global_debye_length_data = global_debye_length_fab.dataPtr();
}

const amrex::Box tilebox = mfi.tilebox();

amrex::Geometry const& geom_lev = WarpX::GetInstance().Geom(lev);
// dV is level-specific: cell volume at this refinement level (smaller on fine levels).
amrex::ParticleReal const dV = AMREX_D_TERM(geom_lev.CellSize(0), *geom_lev.CellSize(1), *geom_lev.CellSize(2));
Expand Down Expand Up @@ -652,6 +659,7 @@ public:

// Use a bisection algorithm to find the index of the cell in which this pair is located
const int i_cell = amrex::bisect( p_coll_offsets, 0, n_cells, ui_coll );
const amrex::IntVect global_index = tilebox.atOffset(i_cell);

// The particles from species1 that are in the cell `i_cell` are
// given by the `indices_1[cell_start_1:cell_stop_1]`
Expand Down Expand Up @@ -691,7 +699,7 @@ public:
soa_1, soa_1, get_position_1, get_position_1,
n1, n1, T1, T1, global_lamdb,
q1, q1, m1, m1, dt, dV*volume_factor(i_cell), coll_idx,
cell_start_pair, p_mask, p_pair_indices_1, p_pair_indices_2,
cell_start_pair, global_index, p_mask, p_pair_indices_1, p_pair_indices_2,
p_pair_reaction_weight, p_product_data, engine);
}
);
Expand Down Expand Up @@ -1238,6 +1246,7 @@ public:

// Use a bisection algorithm to find the index of the cell in which this pair is located
const int i_cell = amrex::bisect( p_coll_offsets, 0, n_cells, ui_coll );
const amrex::IntVect global_index = tilebox.atOffset(i_cell);

// The particles from species1 that are in the cell `i_cell` are
// given by the `indices_1[cell_start_1:cell_stop_1]`
Expand Down Expand Up @@ -1284,7 +1293,7 @@ public:
soa_1, soa_2, get_position_1, get_position_2,
n1, n2, T1, T2, global_lamdb,
q1, q2, m1, m2, dt, dV*volume_factor(i_cell), coll_idx,
cell_start_pair, p_mask, p_pair_indices_1, p_pair_indices_2,
cell_start_pair, global_index, p_mask, p_pair_indices_1, p_pair_indices_2,
p_pair_reaction_weight, p_product_data, engine);
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#ifndef WARPX_BREMSSTRAHLUNG_FUNC_H_
#define WARPX_BREMSSTRAHLUNG_FUNC_H_

#include "Particles/Collision/CollisionFuncBase.H"
#include "Particles/Collision/BinaryCollision/BinaryCollisionUtils.H"
#include "Particles/Pusher/GetAndSetPosition.H"
#include "Particles/MultiParticleContainer.H"
Expand All @@ -31,6 +32,7 @@
* effectively created in the particle creation functor.
*/
class BremsstrahlungFunc
: public CollisionFuncBase
{
// Define shortcuts for frequently-used type names
using ParticleType = WarpXParticleContainer::ParticleType;
Expand Down Expand Up @@ -92,7 +94,8 @@ public:
amrex::ParticleReal const /*q1*/, amrex::ParticleReal const /*q2*/,
amrex::ParticleReal const m1, amrex::ParticleReal const m2,
amrex::Real const dt, amrex::Real const /*dV*/, index_type coll_idx,
index_type const cell_start_pair, index_type* AMREX_RESTRICT p_mask,
index_type const cell_start_pair, amrex::IntVect const /*global_index*/,
index_type* AMREX_RESTRICT p_mask,
index_type* AMREX_RESTRICT p_pair_indices_1, index_type* AMREX_RESTRICT p_pair_indices_2,
amrex::ParticleReal* AMREX_RESTRICT p_pair_reaction_weight,
amrex::ParticleReal* AMREX_RESTRICT p_product_data,
Expand Down Expand Up @@ -406,7 +409,7 @@ public:

};

[[nodiscard]] Executor const& executor () const { return m_exe; }
[[nodiscard]] Executor const& executor (int const /*lev*/, amrex::MFIter const& /*mfi*/) const { return m_exe; }

[[nodiscard]] bool use_global_debye_length() const { return m_use_global_debye_length; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#ifndef WARPX_PAIRWISE_COULOMB_COLLISION_FUNC_H_
#define WARPX_PAIRWISE_COULOMB_COLLISION_FUNC_H_

#include "Particles/Collision/CollisionFuncBase.H"
#include "ElasticCollisionPerez.H"
#include "Particles/Pusher/GetAndSetPosition.H"
#include "Particles/WarpXParticleContainer.H"
Expand All @@ -24,6 +25,7 @@
* ElasticCollisionPerez. It also reads and contains the Coulomb logarithm.
*/
class PairWiseCoulombCollisionFunc
: public CollisionFuncBase
{
// Define shortcuts for frequently-used type names
using ParticleType = WarpXParticleContainer::ParticleType;
Expand Down Expand Up @@ -120,7 +122,8 @@ public:
amrex::ParticleReal const q1, amrex::ParticleReal const q2,
amrex::ParticleReal const m1, amrex::ParticleReal const m2,
amrex::Real const dt, amrex::Real const dV, index_type coll_idx,
index_type const /*cell_start_pair*/, index_type* /*p_mask*/,
index_type const /*cell_start_pair*/, amrex::IntVect const /*global_index*/,
index_type* /*p_mask*/,
index_type* /*p_pair_indices_1*/, index_type* /*p_pair_indices_2*/,
amrex::ParticleReal* /*p_pair_reaction_weight*/,
amrex::ParticleReal* /*p_product_data*/,
Expand All @@ -144,7 +147,7 @@ public:
bool m_isSameSpecies;
};

[[nodiscard]] Executor const& executor () const { return m_exe; }
[[nodiscard]] Executor const& executor (int const /*lev*/, amrex::MFIter const& /*mfi*/) const { return m_exe; }

[[nodiscard]] bool use_global_debye_length() const { return m_use_global_debye_length; }

Expand Down
7 changes: 5 additions & 2 deletions Source/Particles/Collision/BinaryCollision/DSMC/DSMCFunc.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "CollisionFilterFunc.H"

#include "Particles/Collision/CollisionFuncBase.H"
#include "Particles/Collision/BinaryCollision/BinaryCollisionUtils.H"
#include "Particles/Collision/BinaryCollision/ParticleShufflers.H"
#include "Particles/Collision/CollisionBase.H"
Expand All @@ -35,6 +36,7 @@
* used for binary Coulomb collisions and the nuclear fusion module.
*/
class DSMCFunc
: public CollisionFuncBase
{
// Define shortcuts for frequently-used type names
using ParticleType = WarpXParticleContainer::ParticleType;
Expand Down Expand Up @@ -103,7 +105,8 @@ public:
amrex::ParticleReal const /*q1*/, amrex::ParticleReal const /*q2*/,
amrex::ParticleReal const m1, amrex::ParticleReal const m2,
amrex::Real const dt, amrex::Real const dV, index_type coll_idx,
index_type const cell_start_pair, index_type* AMREX_RESTRICT p_mask,
index_type const cell_start_pair, amrex::IntVect const /*global_index*/,
index_type* AMREX_RESTRICT p_mask,
index_type* AMREX_RESTRICT p_pair_indices_1, index_type* AMREX_RESTRICT p_pair_indices_2,
amrex::ParticleReal* AMREX_RESTRICT p_pair_reaction_weight,
amrex::ParticleReal* /*p_product_data*/,
Expand Down Expand Up @@ -183,7 +186,7 @@ public:
ScatteringProcess::Executor* m_scattering_processes_data;
};

[[nodiscard]] Executor const& executor () const { return m_exe; }
[[nodiscard]] Executor const& executor (int const /*lev*/, amrex::MFIter const& /*mfi*/) const { return m_exe; }

bool use_global_debye_length() { return false; }

Expand Down
Loading
Loading