diff options
author | 2020-09-25 10:27:28 +0200 | |
---|---|---|
committer | 2020-09-25 10:27:28 +0200 | |
commit | fc898a05abd9fc2cba6f087e865415379174bab9 (patch) | |
tree | db6dd209d3a10a894badfd657bca64b62e10d4d2 /Source/Particles/PhysicalParticleContainer.cpp | |
parent | 6f0fbb9a685717070ffbf363d96a81343890526c (diff) | |
download | WarpX-fc898a05abd9fc2cba6f087e865415379174bab9.tar.gz WarpX-fc898a05abd9fc2cba6f087e865415379174bab9.tar.zst WarpX-fc898a05abd9fc2cba6f087e865415379174bab9.zip |
Add CI test and documentation for leveling thinning algorithm (#1327)
* First working version of tests
* Add comments to test
* Add test in WarpX-test.ini and initial checksum json file
* Add resampling to input parameters doc
* Uncomment lines about checksum in analysis script + Fix minor typos
* Add momentum in plotfiles (for checksum) + Fix minor typoes
* Remove particle_theta from checksum json file
* Remove rho from checksum json file
* Fix syntax error in checksum json file
* Add benchmark values
* Update Docs/source/running_cpp/parameters.rst
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
* Have one Resampling object per species
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index b71ff2920..0f0ac96f5 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -123,6 +123,7 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp pp.query("do_field_ionization", do_field_ionization); pp.query("do_resampling", do_resampling); + if (do_resampling) m_resampler = Resampling(species_name); //check if Radiation Reaction is enabled and do consistency checks pp.query("do_classical_radiation_reaction", do_classical_radiation_reaction); @@ -1996,18 +1997,18 @@ PhysicalParticleContainer::getIonizationFunc (const WarpXParIter& pti, ion_atomic_number); } -void PhysicalParticleContainer::resample (const Resampling& resampler, const int timestep) +void PhysicalParticleContainer::resample (const int timestep) { const amrex::Real global_numparts = TotalNumberOfParticles(); - if (resampler.triggered(timestep, global_numparts)) + if (m_resampler.triggered(timestep, global_numparts)) { amrex::Print() << "Resampling " << species_name << ".\n"; for (int lev = 0; lev <= maxLevel(); lev++) { for (WarpXParIter pti(*this, lev); pti.isValid(); ++pti) { - resampler(pti, lev, this); + m_resampler(pti, lev, this); } } } |