This class is used to determine if resampling should be done at a given timestep for a given species. Specifically resampling is performed if the current timestep is included in the IntervalsParser m_resampling_intervals or if the average number of particles per cell of the considered species exceeds the threshold m_max_avg_ppc.
More...
#include <ResamplingTrigger.H>
|
| | ResamplingTrigger ()=default |
| | Default constructor of the ResamplingTrigger class.
|
| |
| | ResamplingTrigger (const std::string &species_name) |
| | Constructor of the ResamplingTrigger class. Reads the resampling trigger parameters from the input file.
|
| |
| bool | triggered (int timestep, amrex::Real global_numparts) const |
| | A method that returns true if resampling should be done for the considered species at the considered timestep.
|
| |
| void | initialize_global_numcells () const |
| | A method that initializes the member m_global_numcells. It is only called once (the first time triggered() is called) and is needed because warpx.boxArray(lev) is not yet initialized when the constructor of this class is called.
|
| |
This class is used to determine if resampling should be done at a given timestep for a given species. Specifically resampling is performed if the current timestep is included in the IntervalsParser m_resampling_intervals or if the average number of particles per cell of the considered species exceeds the threshold m_max_avg_ppc.
◆ ResamplingTrigger() [1/2]
| ResamplingTrigger::ResamplingTrigger |
( |
| ) |
|
|
default |
◆ ResamplingTrigger() [2/2]
| ResamplingTrigger::ResamplingTrigger |
( |
const std::string & | species_name | ) |
|
Constructor of the ResamplingTrigger class. Reads the resampling trigger parameters from the input file.
◆ initialize_global_numcells()
| void ResamplingTrigger::initialize_global_numcells |
( |
| ) |
const |
A method that initializes the member m_global_numcells. It is only called once (the first time triggered() is called) and is needed because warpx.boxArray(lev) is not yet initialized when the constructor of this class is called.
◆ triggered()
| bool ResamplingTrigger::triggered |
( |
int | timestep, |
|
|
amrex::Real | global_numparts ) const |
A method that returns true if resampling should be done for the considered species at the considered timestep.
- Parameters
-
| [in] | timestep | the current timestep |
| [in] | global_numparts | the total number of particles of the considered species |
◆ m_global_numcells
| amrex::Real ResamplingTrigger::m_global_numcells = amrex::Real(0.0) |
|
mutableprivate |
◆ m_initialized
| bool ResamplingTrigger::m_initialized = false |
|
mutableprivate |
◆ m_max_avg_ppc
| amrex::Real ResamplingTrigger::m_max_avg_ppc = std::numeric_limits<amrex::Real>::max() |
|
private |
◆ m_resampling_intervals
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/warpx/checkouts/6270/Source/Particles/Resampling/ResamplingTrigger.H
- /home/docs/checkouts/readthedocs.org/user_builds/warpx/checkouts/6270/Source/Particles/Resampling/ResamplingTrigger.cpp