WarpX
RhoFunctor.H
Go to the documentation of this file.
1 #ifndef WARPX_RHOFUNCTOR_H_
2 #define WARPX_RHOFUNCTOR_H_
3 
4 #include "ComputeDiagFunctor.H"
5 
6 #include <AMReX_BaseFwd.H>
7 
11 class RhoFunctor final : public ComputeDiagFunctor
12 {
13 
14 public:
15 
28  RhoFunctor (int lev,
29  amrex::IntVect crse_ratio,
30  bool apply_rz_psatd_filter = false,
31  int species_index = -1,
32  bool convertRZmodes2cartesian = true,
33  int ncomp = 1);
34 
41  void operator() ( amrex::MultiFab& mf_dst, int dcomp, int /*i_buffer=0*/ ) const override;
42 
43 private:
44 
45  // Level on which source MultiFab mf_src is defined in RZ geometry
46  int const m_lev;
47 
48  // Whether to apply k-space filtering of charge density in the diagnostics output in RZ PSATD
50 
51  // Species index to dump rho per species
52  const int m_species_index;
53 
54  // Whether to average all modes into one component in RZ geometry
56 };
57 
58 #endif // WARPX_RHOFUNCTOR_H_
Functor to compute a diagnostic and store the result in existing MultiFab.
Definition: ComputeDiagFunctor.H:17
Functor to compute charge density rho into mf_out.
Definition: RhoFunctor.H:12
bool m_apply_rz_psatd_filter
Definition: RhoFunctor.H:49
RhoFunctor(int lev, amrex::IntVect crse_ratio, bool apply_rz_psatd_filter=false, int species_index=-1, bool convertRZmodes2cartesian=true, int ncomp=1)
Constructor.
Definition: RhoFunctor.cpp:21
const int m_species_index
Definition: RhoFunctor.H:52
bool m_convertRZmodes2cartesian
Definition: RhoFunctor.H:55
void operator()(amrex::MultiFab &mf_dst, int dcomp, int) const override
Compute rho directly into mf_dst.
Definition: RhoFunctor.cpp:35
int const m_lev
Definition: RhoFunctor.H:46