WarpX
LevelingThinning.H
Go to the documentation of this file.
1 /* Copyright 2019-2020 Neil Zaim
2  *
3  * This file is part of WarpX.
4  *
5  * License: BSD-3-Clause-LBNL
6  */
7 #ifndef WARPX_LEVELING_THINNING_H_
8 #define WARPX_LEVELING_THINNING_H_
9 
10 #include "Resampling.H"
11 
13 
14 #include <AMReX_REAL.H>
15 
16 #include <string>
17 
27 public:
28 
32  LevelingThinning () = default;
33 
39  LevelingThinning (const std::string& species_name);
40 
45  void BackwardCompatibility (const std::string& species_name );
46 
54  void operator() (WarpXParIter& pti, int lev, WarpXParticleContainer* pc) const final;
55 
56 private:
57  amrex::Real m_target_ratio = amrex::Real(1.5);
58  int m_min_ppc = 1;
59 };
60 
61 
62 #endif //WARPX_LEVELING_THINNING_H_
This class implements the leveling thinning algorithm as defined in Muraviev, A., et al....
Definition: LevelingThinning.H:26
LevelingThinning()=default
Default constructor of the LevelingThinning class.
void operator()(WarpXParIter &pti, int lev, WarpXParticleContainer *pc) const final
A method that performs leveling thinning for the considered species.
Definition: LevelingThinning.cpp:67
int m_min_ppc
Definition: LevelingThinning.H:58
void BackwardCompatibility(const std::string &species_name)
Definition: LevelingThinning.cpp:56
amrex::Real m_target_ratio
Definition: LevelingThinning.H:57
Definition: WarpXParticleContainer.H:53
Definition: WarpXParticleContainer.H:111
An empty base class from which specific resampling algorithms are derived.
Definition: Resampling.H:23