ARTEMIS
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 *const mf_src, const int lev, const amrex::IntVect crse_ratio, bool convertRZmodes2cartesian=true, int ncomp=1, int scomp=0)
 
virtual void operator() (amrex::MultiFab &mf_dst, int dcomp, const int) const override
 Cell-center m_mf_src and write the result in mf_dst. More...
 
int sComp () const
 return m_scomp m_scomp is the starting component of mf_src from which values are averaged/interpolated to mf_dst More...
 
- Public Member Functions inherited from ComputeDiagFunctor
 ComputeDiagFunctor (int ncomp, amrex::IntVect crse_ratio)
 
virtual ~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 max_box_size, 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 ()
 

Private Attributes

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

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 *const  mf_src,
const int  lev,
const amrex::IntVect  crse_ratio,
bool  convertRZmodes2cartesian = true,
int  ncomp = 1,
int  scomp = 0 
)

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.
[in]scompstarting component of mf_src from which values are averaged/interpolated to mf_dst

Member Function Documentation

◆ operator()()

void CellCenterFunctor::operator() ( amrex::MultiFab mf_dst,
int  dcomp,
const 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.

◆ sComp()

int CellCenterFunctor::sComp ( ) const
inline

return m_scomp m_scomp is the starting component of mf_src from which values are averaged/interpolated to mf_dst

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)

◆ m_scomp

int CellCenterFunctor::m_scomp
private

starting component of mf_src from which values are averaged/interpolated to mf_dst


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