ARTEMIS
Public Member Functions | Protected Attributes | Private Attributes | List of all members
ComputeDiagFunctor Class Referenceabstract

Functor to compute a diagnostic and store the result in existing MultiFab. More...

#include <ComputeDiagFunctor.H>

Inheritance diagram for ComputeDiagFunctor:
BackTransformFunctor CellCenterFunctor DivBFunctor DivEFunctor PartPerCellFunctor PartPerGridFunctor ParticleReductionFunctor RhoFunctor

Public Member Functions

 ComputeDiagFunctor (int ncomp, amrex::IntVect crse_ratio)
 
virtual ~ComputeDiagFunctor ()=default
 
virtual void operator() (amrex::MultiFab &mf_dst, int dcomp, const int i_buffer=0) const =0
 
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 ()
 

Protected Attributes

amrex::IntVect m_crse_ratio
 

Private Attributes

int m_ncomp
 

Detailed Description

Functor to compute a diagnostic and store the result in existing MultiFab.

Constructor & Destructor Documentation

◆ ComputeDiagFunctor()

ComputeDiagFunctor::ComputeDiagFunctor ( int  ncomp,
amrex::IntVect  crse_ratio 
)
inline

◆ ~ComputeDiagFunctor()

virtual ComputeDiagFunctor::~ComputeDiagFunctor ( )
virtualdefault

Member Function Documentation

◆ InitData()

virtual void ComputeDiagFunctor::InitData ( )
inlinevirtual

Reimplemented in BackTransformFunctor.

◆ nComp()

int ComputeDiagFunctor::nComp ( ) const
inline

Number of component from the input multifab to write to the output multifab

◆ operator()()

virtual void ComputeDiagFunctor::operator() ( amrex::MultiFab mf_dst,
int  dcomp,
const int  i_buffer = 0 
) const
pure virtual

Compute a field and store the result in mf_dst

Parameters
[out]mf_dstoutput MultiFab where the result is written
[in]dcompfirst component of mf_dst in which the result is written to the output diagnostic MultiFab, mf_dst.
[in]i_bufferindex of a back-transformed snapshot

Implemented in CellCenterFunctor, BackTransformFunctor, RhoFunctor, PartPerGridFunctor, PartPerCellFunctor, ParticleReductionFunctor, DivEFunctor, and DivBFunctor.

◆ PrepareFunctorData()

virtual void ComputeDiagFunctor::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 
)
inlinevirtual

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.

Parameters
[in]i_bufferindex of the back-transform snapshot
[in]z_slice_in_domainif the z-slice at current_z_boost is within the boosted-frame and lab-frame domain. The fields are sliced and back-transformed only if this value is true.
[in]current_z_boostcurrent z coordinate in the boosted-frame
[in]buffer_boxBox with index-space in lab-frame for the ith buffer
[in]k_index_zlabk-index in the lab-frame corresponding to the current z co-ordinate in the lab-frame for the ith buffer.
[in]max_box_sizemaximum box size for the multifab to generate box arrays
[in]snapshot_fullif the current snapshot, with index, i_buffer, is full (1) or not (0). If it is full, then Lorentz-transform is not performed by setting m_perform_backtransform to 0;

Reimplemented in BackTransformFunctor.

Member Data Documentation

◆ m_crse_ratio

amrex::IntVect ComputeDiagFunctor::m_crse_ratio
protected

Coarsening ratio used to interpolate fields from simulation MultiFabs to output MultiFab.

◆ m_ncomp

int ComputeDiagFunctor::m_ncomp
private

Number of components of mf_dst that this functor updates.


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