Block-Structured AMR Software Framework
amrex::YAFluxRegisterT< MF > Class Template Reference

#include <AMReX_YAFluxRegister.H>

Inheritance diagram for amrex::YAFluxRegisterT< MF >:
amrex::EBFluxRegister

Public Types

enum  CellType : int { crse_cell = 0 , crse_fine_boundary_cell , fine_cell }
 
using T = typename MF::value_type
 
using FAB = typename MF::fab_type
 

Public Member Functions

 YAFluxRegisterT ()=default
 
 YAFluxRegisterT (const BoxArray &fba, const BoxArray &cba, const DistributionMapping &fdm, const DistributionMapping &cdm, const Geometry &fgeom, const Geometry &cgeom, const IntVect &ref_ratio, int fine_lev, int nvar)
 
void define (const BoxArray &fba, const BoxArray &cba, const DistributionMapping &fdm, const DistributionMapping &cdm, const Geometry &fgeom, const Geometry &cgeom, const IntVect &ref_ratio, int fine_lev, int nvar)
 
void reset ()
 
void CrseAdd (const MFIter &mfi, const std::array< FAB const *, AMREX_SPACEDIM > &flux, const Real *dx, Real dt, RunOn runon) noexcept
 
void CrseAdd (const MFIter &mfi, const std::array< FAB const *, AMREX_SPACEDIM > &flux, const Real *dx, Real dt, int srccomp, int destcomp, int numcomp, RunOn runon) noexcept
 
void FineAdd (const MFIter &mfi, const std::array< FAB const *, AMREX_SPACEDIM > &flux, const Real *dx, Real dt, RunOn runon) noexcept
 
void FineAdd (const MFIter &mfi, const std::array< FAB const *, AMREX_SPACEDIM > &a_flux, const Real *dx, Real dt, int srccomp, int destcomp, int numcomp, RunOn runon) noexcept
 
void Reflux (MF &state, int dc=0)
 
void Reflux (MF &state, int srccomp, int destcomp, int numcomp)
 
bool CrseHasWork (const MFIter &mfi) const noexcept
 
bool FineHasWork (const MFIter &mfi) const noexcept
 
MF & getFineData ()
 
MF & getCrseData ()
 
void setCrseVolume (MF const *cvol)
 

Protected Attributes

MF m_crse_data
 
iMultiFab m_crse_flag
 
Vector< intm_crse_fab_flag
 
MF m_cfpatch
 This is built on crse/fine patches. More...
 
MF m_cfp_mask
 
Vector< Vector< FAB * > > m_cfp_fab
 The size of this is (# of local fine grids (# of crse/fine patches for that grid)) More...
 
Vector< intm_cfp_localindex
 
Geometry m_fine_geom
 
Geometry m_crse_geom
 
IntVect m_ratio
 
int m_fine_level
 
int m_ncomp
 
MF const * m_cvol = nullptr
 

Detailed Description

template<typename MF>
class amrex::YAFluxRegisterT< MF >

YAFluxRegister is yet another Flux Register for refluxing.

At the beginning of a coarse step, reset() is called. In MFIter for the coarse level advance, CrseAdd is called with coarse flux. The flux is not scaled. In MFIter for the fine level advance, FineAdd is called. After the fine level finished its time steps, Reflux is called to update the coarse cells next to the coarse/fine boundary.

Member Typedef Documentation

◆ FAB

template<typename MF >
using amrex::YAFluxRegisterT< MF >::FAB = typename MF::fab_type

◆ T

template<typename MF >
using amrex::YAFluxRegisterT< MF >::T = typename MF::value_type

Member Enumeration Documentation

◆ CellType

template<typename MF >
enum amrex::YAFluxRegisterT::CellType : int
Enumerator
crse_cell 
crse_fine_boundary_cell 
fine_cell 

Constructor & Destructor Documentation

◆ YAFluxRegisterT() [1/2]

template<typename MF >
amrex::YAFluxRegisterT< MF >::YAFluxRegisterT ( )
default

◆ YAFluxRegisterT() [2/2]

template<typename MF >
amrex::YAFluxRegisterT< MF >::YAFluxRegisterT ( const BoxArray fba,
const BoxArray cba,
const DistributionMapping fdm,
const DistributionMapping cdm,
const Geometry fgeom,
const Geometry cgeom,
const IntVect ref_ratio,
int  fine_lev,
int  nvar 
)

Member Function Documentation

◆ CrseAdd() [1/2]

template<typename MF >
void amrex::YAFluxRegisterT< MF >::CrseAdd ( const MFIter mfi,
const std::array< FAB const *, AMREX_SPACEDIM > &  flux,
const Real *  dx,
Real  dt,
int  srccomp,
int  destcomp,
int  numcomp,
RunOn  runon 
)
noexcept

◆ CrseAdd() [2/2]

template<typename MF >
void amrex::YAFluxRegisterT< MF >::CrseAdd ( const MFIter mfi,
const std::array< FAB const *, AMREX_SPACEDIM > &  flux,
const Real *  dx,
Real  dt,
RunOn  runon 
)
noexcept

◆ CrseHasWork()

template<typename MF >
bool amrex::YAFluxRegisterT< MF >::CrseHasWork ( const MFIter mfi) const
inlinenoexcept

◆ define()

template<typename MF >
void amrex::YAFluxRegisterT< MF >::define ( const BoxArray fba,
const BoxArray cba,
const DistributionMapping fdm,
const DistributionMapping cdm,
const Geometry fgeom,
const Geometry cgeom,
const IntVect ref_ratio,
int  fine_lev,
int  nvar 
)

◆ FineAdd() [1/2]

template<typename MF >
void amrex::YAFluxRegisterT< MF >::FineAdd ( const MFIter mfi,
const std::array< FAB const *, AMREX_SPACEDIM > &  a_flux,
const Real *  dx,
Real  dt,
int  srccomp,
int  destcomp,
int  numcomp,
RunOn  runon 
)
noexcept

◆ FineAdd() [2/2]

template<typename MF >
void amrex::YAFluxRegisterT< MF >::FineAdd ( const MFIter mfi,
const std::array< FAB const *, AMREX_SPACEDIM > &  flux,
const Real *  dx,
Real  dt,
RunOn  runon 
)
noexcept

◆ FineHasWork()

template<typename MF >
bool amrex::YAFluxRegisterT< MF >::FineHasWork ( const MFIter mfi) const
inlinenoexcept

◆ getCrseData()

template<typename MF >
MF & amrex::YAFluxRegisterT< MF >::getCrseData

◆ getFineData()

template<typename MF >
MF & amrex::YAFluxRegisterT< MF >::getFineData

◆ Reflux() [1/2]

template<typename MF >
void amrex::YAFluxRegisterT< MF >::Reflux ( MF &  state,
int  dc = 0 
)

◆ Reflux() [2/2]

template<typename MF >
void amrex::YAFluxRegisterT< MF >::Reflux ( MF &  state,
int  srccomp,
int  destcomp,
int  numcomp 
)

◆ reset()

template<typename MF >
void amrex::YAFluxRegisterT< MF >::reset

◆ setCrseVolume()

template<typename MF >
void amrex::YAFluxRegisterT< MF >::setCrseVolume ( MF const *  cvol)
inline

For curvilinear coordinates only. In that case, the flux passed to YAFluxRegister is assumed to have been multiplied by area. Note that YAFluxRegister does NOT make a copy of the volume data. So the coarse volume MF must be alive during the life time of YAFluxRegister.

Member Data Documentation

◆ m_cfp_fab

template<typename MF >
Vector<Vector<FAB*> > amrex::YAFluxRegisterT< MF >::m_cfp_fab
protected

The size of this is (# of local fine grids (# of crse/fine patches for that grid))

◆ m_cfp_localindex

template<typename MF >
Vector<int> amrex::YAFluxRegisterT< MF >::m_cfp_localindex
protected

◆ m_cfp_mask

template<typename MF >
MF amrex::YAFluxRegisterT< MF >::m_cfp_mask
protected

◆ m_cfpatch

template<typename MF >
MF amrex::YAFluxRegisterT< MF >::m_cfpatch
protected

This is built on crse/fine patches.

◆ m_crse_data

template<typename MF >
MF amrex::YAFluxRegisterT< MF >::m_crse_data
protected

◆ m_crse_fab_flag

template<typename MF >
Vector<int> amrex::YAFluxRegisterT< MF >::m_crse_fab_flag
protected

◆ m_crse_flag

template<typename MF >
iMultiFab amrex::YAFluxRegisterT< MF >::m_crse_flag
protected

◆ m_crse_geom

template<typename MF >
Geometry amrex::YAFluxRegisterT< MF >::m_crse_geom
protected

◆ m_cvol

template<typename MF >
MF const* amrex::YAFluxRegisterT< MF >::m_cvol = nullptr
protected

◆ m_fine_geom

template<typename MF >
Geometry amrex::YAFluxRegisterT< MF >::m_fine_geom
protected

◆ m_fine_level

template<typename MF >
int amrex::YAFluxRegisterT< MF >::m_fine_level
protected

◆ m_ncomp

template<typename MF >
int amrex::YAFluxRegisterT< MF >::m_ncomp
protected

◆ m_ratio

template<typename MF >
IntVect amrex::YAFluxRegisterT< MF >::m_ratio
protected

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