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  int species_index = -1,
31  bool convertRZmodes2cartesian = true,
32  int ncomp = 1);
33 
40  void operator() ( amrex::MultiFab& mf_dst, int dcomp, int /*i_buffer=0*/ ) const override;
41 
42 private:
43 
44  // Level on which source MultiFab mf_src is defined in RZ geometry
45  int const m_lev;
46 
47  // Species index to dump rho per species
48  const int m_species_index;
49 
50  // Whether to average all modes into one component in RZ geometry
52 };
53 
54 #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
const int m_species_index
Definition: RhoFunctor.H:48
RhoFunctor(int lev, amrex::IntVect crse_ratio, int species_index=-1, bool convertRZmodes2cartesian=true, int ncomp=1)
Constructor.
Definition: RhoFunctor.cpp:21
bool m_convertRZmodes2cartesian
Definition: RhoFunctor.H:51
void operator()(amrex::MultiFab &mf_dst, int dcomp, int) const override
Compute rho directly into mf_dst.
Definition: RhoFunctor.cpp:33
int const m_lev
Definition: RhoFunctor.H:45