ARTEMIS
Public Member Functions | Private Attributes | List of all members
LevelingThinning Class Reference

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>

Inheritance diagram for LevelingThinning:
ResamplingAlgorithm

Public Member Functions

 LevelingThinning ()=default
 Default constructor of the LevelingThinning class. More...
 
 LevelingThinning (const std::string species_name)
 Constructor of the LevelingThinning class. More...
 
void operator() (WarpXParIter &pti, const int lev, WarpXParticleContainer *const pc) const override final
 A method that performs leveling thinning for the considered species. More...
 
- Public Member Functions inherited from ResamplingAlgorithm
virtual ~ResamplingAlgorithm ()=default
 Virtual destructor of the abstract ResamplingAlgorithm class. More...
 

Private Attributes

amrex::Real m_target_ratio = amrex::Real(1.5)
 
int m_min_ppc = 1
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ LevelingThinning() [1/2]

LevelingThinning::LevelingThinning ( )
default

Default constructor of the LevelingThinning class.

◆ LevelingThinning() [2/2]

LevelingThinning::LevelingThinning ( const std::string  species_name)

Constructor of the LevelingThinning class.

Parameters
[in]species_namethe name of the resampled species

Member Function Documentation

◆ operator()()

void LevelingThinning::operator() ( WarpXParIter pti,
const int  lev,
WarpXParticleContainer *const  pc 
) const
finaloverridevirtual

A method that performs leveling thinning for the considered species.

Parameters
[in]ptiWarpX particle iterator of the particles to resample.
[in]levthe index of the refinement level.
[in]pca pointer to the particle container.

Implements ResamplingAlgorithm.

Member Data Documentation

◆ 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: