WarpX
ParticleReductionFunctor.H
Go to the documentation of this file.
1 #ifndef WARPX_PARTICLEREDUCTIONFUNCTOR_H_
2 #define WARPX_PARTICLEREDUCTIONFUNCTOR_H_
3 
4 #include "ComputeDiagFunctor.H"
5 
6 #include <AMReX_Parser.H>
7 #include <AMReX_BaseFwd.H>
8 
9 #include <memory>
10 #include <string>
11 
15 class
17 {
18 public:
33  ParticleReductionFunctor(const amrex::MultiFab * mf_src, int lev,
34  amrex::IntVect crse_ratio, std::string fn_str,
35  int ispec, bool do_average,
36  bool do_filter, std::string filter_str,
37  int ncomp=1);
38 
45  void operator()(amrex::MultiFab& mf_dst, int dcomp, int /*i_buffer=0*/) const override;
46 private:
47  int const m_lev;
48  int const m_ispec;
49  bool const m_do_average;
50  bool const m_do_filter;
52  std::unique_ptr<amrex::Parser> m_map_fn_parser;
54  std::unique_ptr<amrex::Parser> m_filter_fn_parser;
59 };
60 
61 #endif // WARPX_PARTICLEREDUCTIONFUNCTOR_H_
Functor to compute a diagnostic and store the result in existing MultiFab.
Definition: ComputeDiagFunctor.H:18
Functor to calculate per-cell averages of particle properties.
Definition: ParticleReductionFunctor.H:17
amrex::ParserExecutor< 6 > m_map_fn
Definition: ParticleReductionFunctor.H:56
amrex::ParserExecutor< 6 > m_filter_fn
Definition: ParticleReductionFunctor.H:58
bool const m_do_filter
Definition: ParticleReductionFunctor.H:50
std::unique_ptr< amrex::Parser > m_filter_fn_parser
Definition: ParticleReductionFunctor.H:54
int const m_ispec
Definition: ParticleReductionFunctor.H:48
bool const m_do_average
Definition: ParticleReductionFunctor.H:49
std::unique_ptr< amrex::Parser > m_map_fn_parser
Definition: ParticleReductionFunctor.H:52
int const m_lev
Definition: ParticleReductionFunctor.H:47