WarpX
Public Member Functions | Private Attributes | List of all members
CellCenterFunctor Class Referencefinal

Functor to cell-center MF and store result in mf_out. More...

#include <CellCenterFunctor.H>

Inheritance diagram for CellCenterFunctor:
ComputeDiagFunctor

Public Member Functions

 CellCenterFunctor (const amrex::MultiFab *mf_src, int lev, amrex::IntVect crse_ratio, bool convertRZmodes2cartesian=true, int ncomp=1)
 
void operator() (amrex::MultiFab &mf_dst, int dcomp, int) const override
 Cell-center m_mf_src and write the result in mf_dst. More...
 
- Public Member Functions inherited from ComputeDiagFunctor
 ComputeDiagFunctor (int ncomp, amrex::IntVect crse_ratio)
 
virtual ~ComputeDiagFunctor ()=default
 
 ComputeDiagFunctor (const ComputeDiagFunctor &)=default
 
ComputeDiagFunctoroperator= (const ComputeDiagFunctor &)=default
 
 ComputeDiagFunctor (ComputeDiagFunctor &&)=default
 
ComputeDiagFunctoroperator= (ComputeDiagFunctor &&)=default
 
int nComp () const
 
virtual void PrepareFunctorData (int i_buffer, bool z_slice_in_domain, amrex::Real current_z_boost, amrex::Box buffer_box, const int k_index_zlab, const int snapshot_full)
 Prepare data required to process fields in the operator() Note that this function has parameters that are specific to back-transformed diagnostics, that are unused for regular diagnostics. More...
 
virtual void InitData ()
 
void InterpolateMFForDiag (amrex::MultiFab &mf_dst, const amrex::MultiFab &mf_src, int dcomp, const amrex::DistributionMapping &dm, bool convertRZmodes2cartesian) const
 

Private Attributes

amrex::MultiFab const *const m_mf_src = nullptr
 
int m_lev
 
bool m_convertRZmodes2cartesian
 

Additional Inherited Members

- Protected Attributes inherited from ComputeDiagFunctor
amrex::IntVect m_crse_ratio
 

Detailed Description

Functor to cell-center MF and store result in mf_out.

Constructor & Destructor Documentation

◆ CellCenterFunctor()

CellCenterFunctor::CellCenterFunctor ( const amrex::MultiFab mf_src,
int  lev,
amrex::IntVect  crse_ratio,
bool  convertRZmodes2cartesian = true,
int  ncomp = 1 
)

Constructor.

Parameters
[in]mf_srcsource multifab.
[in]levlevel of multifab. Used for averaging in rz.
[in]crse_ratiofor interpolating field values from the simulation MultiFab, src_mf, to the output diagnostic MultiFab, mf_dst.
[in]convertRZmodes2cartesian(in cylindrical) whether to sum all modes in mf_src before cell-centering into dst multifab.
[in]ncompNumber of component of mf_src to cell-center in dst multifab.

Member Function Documentation

◆ operator()()

void CellCenterFunctor::operator() ( amrex::MultiFab mf_dst,
int  dcomp,
int   
) const
overridevirtual

Cell-center m_mf_src and write the result in mf_dst.

In cylindrical geometry, by default this functor average all components of a MultiFab and writes into one single component.

Parameters
[out]mf_dstoutput MultiFab where the result is written
[in]dcompfirst component of mf_dst in which cell-centered data is stored

Implements ComputeDiagFunctor.

Member Data Documentation

◆ m_convertRZmodes2cartesian

bool CellCenterFunctor::m_convertRZmodes2cartesian
private

◆ m_lev

int CellCenterFunctor::m_lev
private

level on which mf_src is defined (used in cylindrical) (for cylindrical) whether to average all modes into 1 comp

◆ m_mf_src

amrex::MultiFab const* const CellCenterFunctor::m_mf_src = nullptr
private

pointer to source multifab (can be multi-component)


The documentation for this class was generated from the following files: