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

#include <AMReX_MLMGBndry.H>

Inheritance diagram for amrex::MLMGBndryT< MF >:
amrex::InterpBndryDataT< MF > amrex::BndryDataT< MF > amrex::BndryRegisterT< MF >

Public Types

using BCTuple = Array< BoundCond, 2 *BL_SPACEDIM >
 
using RealTuple = typename BndryDataT< MF >::RealTuple
 
- Public Types inherited from amrex::InterpBndryDataT< MF >
using value_type = typename MF::value_type
 
- Public Types inherited from amrex::BndryDataT< MF >
enum  MaskVal { covered = 0 , not_covered = 1 , outside_domain = 2 , NumMaskVals = 3 }
 mask values enumeration More...
 
using value_type = typename MF::value_type
 
using RealTuple = Array< value_type, 2 *AMREX_SPACEDIM >
 Some useful typedefs. More...
 
- Public Types inherited from amrex::BndryRegisterT< MF >
using value_type = typename MF::value_type
 

Public Member Functions

 MLMGBndryT (const BoxArray &_grids, const DistributionMapping &_dmap, int _ncomp, const Geometry &_geom)
 
 ~MLMGBndryT ()=default
 
 MLMGBndryT (MLMGBndryT< MF > &&rhs)=delete
 
 MLMGBndryT (const MLMGBndryT< MF > &rhs)=delete
 
MLMGBndryT< MF > & operator= (const MLMGBndryT< MF > &rhs)=delete
 
MLMGBndryT< MF > & operator= (MLMGBndryT< MF > &&rhs)=delete
 
void setLOBndryConds (const Vector< Array< LinOpBCType, AMREX_SPACEDIM > > &lo, const Vector< Array< LinOpBCType, AMREX_SPACEDIM > > &hi, int ratio, const RealVect &a_loc, LinOpBCType a_crse_fine_bc_type=LinOpBCType::Dirichlet)
 
void setLOBndryConds (const Vector< Array< LinOpBCType, AMREX_SPACEDIM > > &lo, const Vector< Array< LinOpBCType, AMREX_SPACEDIM > > &hi, IntVect const &ratio, const RealVect &a_loc, LinOpBCType a_crse_fine_bc_type=LinOpBCType::Dirichlet)
 
- Public Member Functions inherited from amrex::InterpBndryDataT< MF >
 InterpBndryDataT () noexcept=default
 default constructor More...
 
 InterpBndryDataT (const BoxArray &_grids, const DistributionMapping &_dmap, int _ncomp, const Geometry &geom)
 constructor for given BoxArray, etc More...
 
 ~InterpBndryDataT ()=default
 
 InterpBndryDataT (const InterpBndryDataT< MF > &rhs)=delete
 
 InterpBndryDataT (InterpBndryDataT< MF > &&rhs)=delete
 
InterpBndryDataT< MF > & operator= (const InterpBndryDataT< MF > &rhs)=delete
 
InterpBndryDataT< MF > & operator= (InterpBndryDataT< MF > &&rhs)=delete
 
void setPhysBndryValues (const MF &mf, int mf_start, int bnd_start, int num_comp)
 Set bndry values at physical boundaries. More...
 
void setBndryValues (BndryRegisterT< MF > const &crse, int c_start, const MF &fine, int f_start, int bnd_start, int num_comp, const IntVect &ratio, int max_order=IBD_max_order_DEF, int max_width=2)
 
void updateBndryValues (BndryRegisterT< MF > &crse, int c_start, int bnd_start, int num_comp, const IntVect &ratio, int max_order=IBD_max_order_DEF, int max_width=2)
 Update boundary values at coarse/fine boundaries. More...
 
void setHomogValues ()
 Set boundary values to zero. More...
 
- Public Member Functions inherited from amrex::BndryDataT< MF >
 BndryDataT () noexcept=default
 Default constructor. More...
 
 BndryDataT (const BoxArray &grids, const DistributionMapping &dmap, int ncomp, const Geometry &geom)
 constructor specifying number of components and box of physical domain (cell-centered) More...
 
 ~BndryDataT ()=default
 destructor More...
 
 BndryDataT (const BndryDataT< MF > &src)=delete
 
 BndryDataT (BndryDataT< MF > &&rhs)=delete
 
BndryDataT< MF > & operator= (const BndryDataT< MF > &src)=delete
 
BndryDataT< MF > & operator= (BndryDataT< MF > &&rhs)=delete
 
void define (const BoxArray &grids, const DistributionMapping &dmap, int ncomp, const Geometry &geom)
 allocate bndry fabs along given face More...
 
const MultiMaskbndryMasks (Orientation face) const noexcept
 
const FabSetT< MF > & bndryValues (Orientation face) const noexcept
 Return FabSet on given face. More...
 
const RealTuplebndryLocs (int igrid) const noexcept
 Return boundary location on given face for grids we own. It's an error if we don't own that grid. RealTuple is indexed with Orientation. More...
 
const RealTuplebndryLocs (const MFIter &mfi) const noexcept
 
const Vector< Vector< BoundCond > > & bndryConds (int igrid) const noexcept
 Return boundary type specifier on given face for grids we own. It's an error if we don't own that grid. More...
 
const Vector< Vector< BoundCond > > & bndryConds (const MFIter &mfi) const noexcept
 
int nComp () const noexcept
 return number of components for which this object is intended More...
 
const BoxgetDomain () const noexcept
 return domain used to define masks More...
 
const GeometrygetGeom () const noexcept
 return geometry used to define masks More...
 
void setValue (Orientation face, int n, Real val) noexcept
 set values of boundary Fab for given orientation on nth grid More...
 
void setBoundCond (Orientation face, int n, int comp, const BoundCond &bcn) noexcept
 set boundary type specifier for given orientation on nth grid More...
 
void setBoundCond (Orientation face, const MFIter &mfi, int comp, const BoundCond &bcn) noexcept
 
void setBoundLoc (Orientation face, int n, value_type val) noexcept
 set boundary location for given orientation on nth grid More...
 
void setBoundLoc (Orientation face, const MFIter &mfi, value_type val) noexcept
 
const FabSetT< MF > & operator[] (Orientation face) const noexcept
 implement public access to const BndryRegister::operator[] More...
 
FabSetT< MF > & operator[] (Orientation face) noexcept
 implement public access to BndryRegister::operator[] More...
 
- Public Member Functions inherited from amrex::BndryRegisterT< MF >
 BndryRegisterT () noexcept=default
 The default constructor. More...
 
 BndryRegisterT (const BoxArray &grids_, const DistributionMapping &dmap, int in_rad, int out_rad, int extent_rad, int ncomp)
 The constructor, given number of cells in/out, extent and number of components (assumes cell-centered boxes, and allocates cell-centered FABs) More...
 
 ~BndryRegisterT ()=default
 The destructor. More...
 
 BndryRegisterT (BndryRegisterT< MF > &&rhs) noexcept=default
 
 BndryRegisterT (const BndryRegisterT< MF > &src)=delete
 
BndryRegisterToperator= (const BndryRegisterT< MF > &src)=delete
 
BndryRegisterToperator= (BndryRegisterT< MF > &&rhs)=delete
 
void define (const BoxArray &grids_, const DistributionMapping &dmap, int in_rad, int out_rad, int extent_rad, int ncomp)
 
void define (Orientation face, IndexType typ, int in_rad, int out_rad, int extent_rad, int ncomp, const DistributionMapping &dm)
 Build FABs along given face, specifying the DistributionMapping. More...
 
void clear ()
 
const BoxArrayboxes () const noexcept
 Get box domain (as an array of boxes). More...
 
int size () const noexcept
 Return the number of grids in this domain. More...
 
const FabSetT< MF > & operator[] (Orientation face) const noexcept
 Return const set of FABs bounding the domain grid boxes on a given orientation. More...
 
FabSetT< MF > & operator[] (Orientation face) noexcept
 Return set of FABs bounding the domain grid boxes on a given orientation. More...
 
void setVal (value_type v)
 Set all boundary FABs to given value. More...
 
BndryRegisterT< MF > & operator+= (const BndryRegisterT< MF > &rhs)
 register += rhs More...
 
BndryRegisterT< MF > & plus (const BndryRegisterT< MF > &rhs)
 
BndryRegisterT< MF > & copyFrom (const MF &src, int nghost, int src_comp, int dest_comp, int num_comp, const Periodicity &period=Periodicity::NonPeriodic())
 Fill the boundary FABs on intersection with given MF. More...
 
BndryRegisterT< MF > & plusFrom (const MF &src, int nghost, int src_comp, int dest_comp, int num_comp, const Periodicity &period=Periodicity::NonPeriodic())
 Increment the boundary FABs on intersect with given MF. More...
 
BndryRegisterT< MF > & linComb (value_type a, const MF &mfa, int a_comp, value_type b, const MF &mfb, int b_comp, int dest_comp, int num_comp, int n_ghost=0)
 Linear combination: this := a*mfa + b*mfb on intersection of MFs with the boundary FABs. More...
 
void setBoxes (const BoxArray &grids)
 Set box domain, if not set previously. More...
 
const DistributionMappingDistributionMap () const noexcept
 Returns constant reference to associated DistributionMapping. More...
 
void write (const std::string &name, std::ostream &os) const
 Write (used for writing to checkpoint) More...
 
void read (const std::string &name, std::istream &is)
 Read (used for reading from checkpoint) More...
 

Static Public Member Functions

static void setBoxBC (RealTuple &bloc, BCTuple &bctag, const Box &bx, const Box &domain, const Array< LinOpBCType, AMREX_SPACEDIM > &lo, const Array< LinOpBCType, AMREX_SPACEDIM > &hi, const Real *dx, IntVect const &ratio, const RealVect &interior_bloc, const Array< Real, AMREX_SPACEDIM > &domain_bloc_lo, const Array< Real, AMREX_SPACEDIM > &domain_bloc_hi, const GpuArray< int, AMREX_SPACEDIM > &is_periodic, LinOpBCType a_crse_fine_bc_type)
 
- Static Public Member Functions inherited from amrex::BndryRegisterT< MF >
static void Copy (BndryRegisterT< MF > &dst, const BndryRegisterT< MF > &src)
 Local copy function. More...
 

Additional Inherited Members

- Static Public Attributes inherited from amrex::InterpBndryDataT< MF >
static constexpr int IBD_max_order_DEF = 3
 
- Protected Attributes inherited from amrex::BndryDataT< MF >
LayoutData< Vector< Vector< BoundCond > > > bcond
 Map of boundary condition type specifiers. The outer Array dimension is over Orientation. More...
 
LayoutData< RealTuplebcloc
 
Vector< MultiMaskmasks
 Boundary condition mask. More...
 
Geometry geom
 Domain used for mask definitions. More...
 
int m_ncomp {-1}
 
bool m_defined {false}
 
- Protected Attributes inherited from amrex::BndryRegisterT< MF >
FabSetT< MF > bndry [2 *AMREX_SPACEDIM]
 The data. More...
 
BoxArray grids
 

Member Typedef Documentation

◆ BCTuple

template<typename MF >
using amrex::MLMGBndryT< MF >::BCTuple = Array<BoundCond,2*BL_SPACEDIM>

◆ RealTuple

template<typename MF >
using amrex::MLMGBndryT< MF >::RealTuple = typename BndryDataT<MF>::RealTuple

Constructor & Destructor Documentation

◆ MLMGBndryT() [1/3]

template<typename MF >
amrex::MLMGBndryT< MF >::MLMGBndryT ( const BoxArray _grids,
const DistributionMapping _dmap,
int  _ncomp,
const Geometry _geom 
)

◆ ~MLMGBndryT()

template<typename MF >
amrex::MLMGBndryT< MF >::~MLMGBndryT ( )
default

◆ MLMGBndryT() [2/3]

template<typename MF >
amrex::MLMGBndryT< MF >::MLMGBndryT ( MLMGBndryT< MF > &&  rhs)
delete

◆ MLMGBndryT() [3/3]

template<typename MF >
amrex::MLMGBndryT< MF >::MLMGBndryT ( const MLMGBndryT< MF > &  rhs)
delete

Member Function Documentation

◆ operator=() [1/2]

template<typename MF >
MLMGBndryT<MF>& amrex::MLMGBndryT< MF >::operator= ( const MLMGBndryT< MF > &  rhs)
delete

◆ operator=() [2/2]

template<typename MF >
MLMGBndryT<MF>& amrex::MLMGBndryT< MF >::operator= ( MLMGBndryT< MF > &&  rhs)
delete

◆ setBoxBC()

template<typename MF >
void amrex::MLMGBndryT< MF >::setBoxBC ( RealTuple bloc,
BCTuple bctag,
const Box bx,
const Box domain,
const Array< LinOpBCType, AMREX_SPACEDIM > &  lo,
const Array< LinOpBCType, AMREX_SPACEDIM > &  hi,
const Real *  dx,
IntVect const &  ratio,
const RealVect interior_bloc,
const Array< Real, AMREX_SPACEDIM > &  domain_bloc_lo,
const Array< Real, AMREX_SPACEDIM > &  domain_bloc_hi,
const GpuArray< int, AMREX_SPACEDIM > &  is_periodic,
LinOpBCType  a_crse_fine_bc_type 
)
static

◆ setLOBndryConds() [1/2]

template<typename MF >
void amrex::MLMGBndryT< MF >::setLOBndryConds ( const Vector< Array< LinOpBCType, AMREX_SPACEDIM > > &  lo,
const Vector< Array< LinOpBCType, AMREX_SPACEDIM > > &  hi,
int  ratio,
const RealVect a_loc,
LinOpBCType  a_crse_fine_bc_type = LinOpBCType::Dirichlet 
)

◆ setLOBndryConds() [2/2]

template<typename MF >
void amrex::MLMGBndryT< MF >::setLOBndryConds ( const Vector< Array< LinOpBCType, AMREX_SPACEDIM > > &  lo,
const Vector< Array< LinOpBCType, AMREX_SPACEDIM > > &  hi,
IntVect const &  ratio,
const RealVect a_loc,
LinOpBCType  a_crse_fine_bc_type = LinOpBCType::Dirichlet 
)

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