A BndryRegister organizes FabSets bounding each grid in a BoxArray. A FabSet is maintained for each boundary orientation, as well as the BoxArray domain of definition. More...
#include <AMReX_BndryRegister.H>
Public Types | |
using | value_type = typename MF::value_type |
Public Member Functions | |
BndryRegisterT () noexcept=default | |
The default constructor. | |
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) | |
~BndryRegisterT ()=default | |
The destructor. | |
BndryRegisterT (BndryRegisterT< MF > &&rhs) noexcept=default | |
BndryRegisterT (const BndryRegisterT< MF > &src)=delete | |
BndryRegisterT & | operator= (const BndryRegisterT< MF > &src)=delete |
BndryRegisterT & | operator= (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. | |
void | clear () |
const BoxArray & | boxes () const noexcept |
Get box domain (as an array of boxes). | |
int | size () const noexcept |
Return the number of grids in this domain. | |
const FabSetT< MF > & | operator[] (Orientation face) const noexcept |
Return const set of FABs bounding the domain grid boxes on a given orientation. | |
FabSetT< MF > & | operator[] (Orientation face) noexcept |
Return set of FABs bounding the domain grid boxes on a given orientation. | |
void | setVal (value_type v) |
Set all boundary FABs to given value. | |
BndryRegisterT< MF > & | operator+= (const BndryRegisterT< MF > &rhs) |
register += rhs | |
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. | |
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. | |
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. | |
void | setBoxes (const BoxArray &grids) |
Set box domain, if not set previously. | |
const DistributionMapping & | DistributionMap () const noexcept |
Returns constant reference to associated DistributionMapping. | |
void | write (const std::string &name, std::ostream &os) const |
Write (used for writing to checkpoint) | |
void | read (const std::string &name, std::istream &is) |
Read (used for reading from checkpoint) | |
Static Public Member Functions | |
static void | Copy (BndryRegisterT< MF > &dst, const BndryRegisterT< MF > &src) |
Local copy function. | |
Protected Attributes | |
FabSetT< MF > | bndry [2 *AMREX_SPACEDIM] |
The data. | |
BoxArray | grids |
A BndryRegister organizes FabSets bounding each grid in a BoxArray. A FabSet is maintained for each boundary orientation, as well as the BoxArray domain of definition.
A BndryRegister object contains a list of FabSets bounding the grids in a BoxArray. The FabSet FABs are at the same refinement level as the grids they bound, and are accessed and modified via a variety of member functions.
Non-default instantiation allocates a set of FABs, grown into and out of the bounding surfaces of each box in the BoxArray. The width of the layer (in/out), as well as the "extent" of a bounding FABs (the number of nodes beyond the box boundaries, parallel to the grid surface) are determined by constructor argument. All boxes and FABs in this context are assumed to be cell-centered.
A small number of linear mathematical operations are provided for BndryRegisters, as well as overloaded [] operators for access based on grid boundary orientation. The BoxArray domain of definition is accessible, but not resettable,
using amrex::BndryRegisterT< MF >::value_type = typename MF::value_type |
|
defaultnoexcept |
The default constructor.
amrex::BndryRegisterT< MF >::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)
|
default |
The destructor.
|
defaultnoexcept |
|
delete |
|
inlinenoexcept |
Get box domain (as an array of boxes).
void amrex::BndryRegisterT< MF >::clear | ( | ) |
|
static |
Local copy function.
BndryRegisterT< MF > & amrex::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.
void amrex::BndryRegisterT< MF >::define | ( | const BoxArray & | grids_, |
const DistributionMapping & | dmap, | ||
int | in_rad, | ||
int | out_rad, | ||
int | extent_rad, | ||
int | ncomp | ||
) |
void amrex::BndryRegisterT< MF >::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.
|
inlinenoexcept |
Returns constant reference to associated DistributionMapping.
BndryRegisterT< MF > & amrex::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.
BndryRegisterT< MF > & amrex::BndryRegisterT< MF >::operator+= | ( | const BndryRegisterT< MF > & | rhs | ) |
register += rhs
|
delete |
|
delete |
|
inlinenoexcept |
Return const set of FABs bounding the domain grid boxes on a given orientation.
|
inlinenoexcept |
Return set of FABs bounding the domain grid boxes on a given orientation.
BndryRegisterT< MF > & amrex::BndryRegisterT< MF >::plus | ( | const BndryRegisterT< MF > & | rhs | ) |
BndryRegisterT< MF > & amrex::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.
void amrex::BndryRegisterT< MF >::read | ( | const std::string & | name, |
std::istream & | is | ||
) |
Read (used for reading from checkpoint)
void amrex::BndryRegisterT< MF >::setBoxes | ( | const BoxArray & | grids | ) |
Set box domain, if not set previously.
void amrex::BndryRegisterT< MF >::setVal | ( | value_type | v | ) |
Set all boundary FABs to given value.
|
inlinenoexcept |
Return the number of grids in this domain.
void amrex::BndryRegisterT< MF >::write | ( | const std::string & | name, |
std::ostream & | os | ||
) | const |
Write (used for writing to checkpoint)
|
protected |
The data.
|
protected |