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/Resampling/Resampling.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/Resampling/Resampling.cpp')
-rw-r--r-- | Source/Particles/Resampling/Resampling.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Particles/Resampling/Resampling.cpp b/Source/Particles/Resampling/Resampling.cpp index 65332d191..b5c2d8b4f 100644 --- a/Source/Particles/Resampling/Resampling.cpp +++ b/Source/Particles/Resampling/Resampling.cpp @@ -7,18 +7,20 @@ #include "Resampling.H" #include "LevelingThinning.H" -Resampling::Resampling () +Resampling::Resampling (const std::string species_name) { - amrex::ParmParse pp("resampling_algorithm"); + amrex::ParmParse pp(species_name); std::string resampling_algorithm_string = "leveling_thinning"; // default resampling algorithm - pp.query("type", resampling_algorithm_string); + pp.query("resampling_algorithm", resampling_algorithm_string); if (resampling_algorithm_string.compare("leveling_thinning") == 0) { - m_resampling_algorithm = std::make_unique<LevelingThinning>(); + m_resampling_algorithm = std::make_unique<LevelingThinning>(species_name); } else { amrex::Abort("Unknown resampling algorithm."); } + + m_resampling_trigger = ResamplingTrigger(species_name); } bool Resampling::triggered (const int timestep, const amrex::Real global_numparts) const |