ARTEMIS
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 
8 #include <AMReX_BaseFwd.H>
9 
10 #include <memory>
11 #include <string>
12 
16 class
18 {
19 public:
34  ParticleReductionFunctor(const amrex::MultiFab * const mf_src, const int lev,
35  const amrex::IntVect crse_ratio, const std::string fn_str,
36  const int ispec, const bool do_average,
37  const bool do_filter, const std::string filter_str,
38  const int ncomp=1);
39 
46  virtual void operator()(amrex::MultiFab& mf_dst, const int dcomp, const int /*i_buffer=0*/) const override;
47 private:
48  int const m_lev;
49  int const m_ispec;
50  bool const m_do_average;
51  bool const m_do_filter;
53  std::unique_ptr<amrex::Parser> m_map_fn_parser;
55  std::unique_ptr<amrex::Parser> m_filter_fn_parser;
60 };
61 
62 #endif // WARPX_PARTICLEREDUCTIONFUNCTOR_H_
Functor to compute a diagnostic and store the result in existing MultiFab.
Definition: ComputeDiagFunctor.H:15
Functor to calculate per-cell averages of particle properties.
Definition: ParticleReductionFunctor.H:18
amrex::ParserExecutor< 6 > m_map_fn
Definition: ParticleReductionFunctor.H:57
amrex::ParserExecutor< 6 > m_filter_fn
Definition: ParticleReductionFunctor.H:59
bool const m_do_filter
Definition: ParticleReductionFunctor.H:51
std::unique_ptr< amrex::Parser > m_filter_fn_parser
Definition: ParticleReductionFunctor.H:55
int const m_ispec
Definition: ParticleReductionFunctor.H:49
bool const m_do_average
Definition: ParticleReductionFunctor.H:50
std::unique_ptr< amrex::Parser > m_map_fn_parser
Definition: ParticleReductionFunctor.H:53
int const m_lev
Definition: ParticleReductionFunctor.H:48