This class implements the leveling thinning algorithm as defined in Muraviev, A., et al. arXiv:2006.08593 (2020). The main steps of the algorithm are the following: for every cell we calculate a level weight, defined by the average weight of the species particles in that cell multiplied by the target ratio. Then, particles with a weight lower than the level weight are either removed, with a probability 1 - particle_weight/level_weight, or have their weight set to the level weight.
More...
#include <LevelingThinning.H>
This class implements the leveling thinning algorithm as defined in Muraviev, A., et al. arXiv:2006.08593 (2020). The main steps of the algorithm are the following: for every cell we calculate a level weight, defined by the average weight of the species particles in that cell multiplied by the target ratio. Then, particles with a weight lower than the level weight are either removed, with a probability 1 - particle_weight/level_weight, or have their weight set to the level weight.
◆ LevelingThinning() [1/2]
LevelingThinning::LevelingThinning |
( |
| ) |
|
|
default |
◆ LevelingThinning() [2/2]
LevelingThinning::LevelingThinning |
( |
const std::string & |
species_name | ) |
|
Constructor of the LevelingThinning class.
- Parameters
-
[in] | species_name | the name of the resampled species |
◆ BackwardCompatibility()
void LevelingThinning::BackwardCompatibility |
( |
const std::string & |
species_name | ) |
|
This function queries deprecated input parameters and aborts the run if one of them is specified.
◆ operator()()
A method that performs leveling thinning for the considered species.
- Parameters
-
[in] | pti | WarpX particle iterator of the particles to resample. |
[in] | lev | the index of the refinement level. |
[in] | pc | a pointer to the particle container. |
Implements ResamplingAlgorithm.
◆ m_min_ppc
int LevelingThinning::m_min_ppc = 1 |
|
private |
◆ m_target_ratio
amrex::Real LevelingThinning::m_target_ratio = amrex::Real(1.5) |
|
private |
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/warpx/checkouts/latest/Source/Particles/Resampling/LevelingThinning.H
- /home/docs/checkouts/readthedocs.org/user_builds/warpx/checkouts/latest/Source/Particles/Resampling/LevelingThinning.cpp