Block-Structured AMR Software Framework
amrex::FabSet Class Reference

A FabSet is a group of FArrayBox's. The grouping is designed specifically to represent regions along the boundary of Box's, and are used to implement boundary conditions to discretized partial differential equations. More...

#include <AMReX_FabSet.H>

Public Member Functions

 FabSet () noexcept
 The default constructor – you must later call define(). More...
 
 FabSet (const BoxArray &grids, const DistributionMapping &dmap, int ncomp)
 Construct a FabSet of specified number of components on the grids. More...
 
 ~FabSet ()=default
 
 FabSet (FabSet &&rhs) noexcept=default
 
 FabSet (const FabSet &rhs)=delete
 
FabSetoperator= (const FabSet &rhs)=delete
 
FabSetoperator= (FabSet &&rhs)=delete
 
void define (const BoxArray &grids, const DistributionMapping &dmap, int ncomp)
 Define a FabSet constructed via default constructor. More...
 
FArrayBox const & operator[] (const MFIter &mfi) const noexcept
 
FArrayBoxoperator[] (const MFIter &mfi) noexcept
 
FArrayBox const & operator[] (int i) const noexcept
 
FArrayBoxoperator[] (int i) noexcept
 
Array4< Real const > array (const MFIter &mfi) const noexcept
 
Array4< Real > array (const MFIter &mfi) noexcept
 
Array4< Real const > array (int i) const noexcept
 
Array4< Real > array (int i) noexcept
 
Array4< Real const > const_array (const MFIter &mfi) const noexcept
 
Array4< Real const > const_array (int i) const noexcept
 
MultiArray4< Real const > arrays () const noexcept
 
MultiArray4< Real > arrays () noexcept
 
MultiArray4< Real const > const_arrays () const noexcept
 
Box fabbox (int K) const noexcept
 
int size () const noexcept
 
const BoxArrayboxArray () const noexcept
 
const DistributionMappingDistributionMap () const noexcept
 
MultiFabmultiFab () noexcept
 
MultiFab const & multiFab () const noexcept
 
int nComp () const noexcept
 
void clear ()
 
FabSetcopyFrom (const FabSet &src, int scomp, int dcomp, int ncomp)
 
FabSetcopyFrom (const MultiFab &src, int ngrow, int scomp, int dcomp, int ncomp, const Periodicity &period=Periodicity::NonPeriodic())
 
FabSetplusFrom (const FabSet &src, int scomp, int dcomp, int ncomp)
 
FabSetplusFrom (const MultiFab &src, int ngrow, int scomp, int dcomp, int ncomp, const Periodicity &period=Periodicity::NonPeriodic())
 
void copyTo (MultiFab &dest, int ngrow, int scomp, int dcomp, int ncomp, const Periodicity &period=Periodicity::NonPeriodic()) const
 
void plusTo (MultiFab &dest, int ngrow, int scomp, int dcomp, int ncomp, const Periodicity &period=Periodicity::NonPeriodic()) const
 
void setVal (Real val)
 
void setVal (Real val, int comp, int num_comp)
 Linear combination: this := a*this + b*src (FabSets must be commensurate). More...
 
FabSetlinComb (Real a, Real b, const FabSet &src, int scomp, int dcomp, int ncomp)
 Linear combination: this := a*mfa + b*mfb. More...
 
FabSetlinComb (Real a, const MultiFab &mfa, int a_comp, Real b, const MultiFab &mfb, int b_comp, int dcomp, int ncomp, int ngrow)
 
void write (const std::string &name) const
 Write (used for writing to checkpoint) More...
 
void read (const std::string &name)
 Read (used for reading from checkpoint) More...
 

Static Public Member Functions

static void Copy (FabSet &dst, const FabSet &src)
 

Private Attributes

MultiFab m_mf
 

Friends

class FabSetIter
 
class FluxRegister
 

Detailed Description

A FabSet is a group of FArrayBox's. The grouping is designed specifically to represent regions along the boundary of Box's, and are used to implement boundary conditions to discretized partial differential equations.

A FabSet is an array of pointers to FABs. The standard FAB operators, however, have been modified to be more useful for maintaining boundary conditions for partial differential equations discretized on boxes. Under normal circumstances, a FAB will be created for each face of a box. For a group of boxes, a FabSet will be the group of FABs at a particular orientation (ie. the lo-i side of each grid in a list).

Since a FabSet FAB will likely be used to bound a grid box, FArrayBox::resize() operations are disallowed. Also, to preserve flexibility in applicable boundary scenarios, intersecting FABs in the FabSet are not guaranteed to contain identical data–thus copy operations from a FabSet to any FAB-like structure may be order-dependent.

FabSets are used primarily as a data storage mechanism, and are manipulated by more sophisticated control classes.

Constructor & Destructor Documentation

◆ FabSet() [1/4]

amrex::FabSet::FabSet ( )
noexcept

The default constructor – you must later call define().

◆ FabSet() [2/4]

amrex::FabSet::FabSet ( const BoxArray grids,
const DistributionMapping dmap,
int  ncomp 
)

Construct a FabSet of specified number of components on the grids.

◆ ~FabSet()

amrex::FabSet::~FabSet ( )
default

◆ FabSet() [3/4]

amrex::FabSet::FabSet ( FabSet &&  rhs)
defaultnoexcept

◆ FabSet() [4/4]

amrex::FabSet::FabSet ( const FabSet rhs)
delete

Member Function Documentation

◆ array() [1/4]

Array4<Real const> amrex::FabSet::array ( const MFIter mfi) const
inlinenoexcept

◆ array() [2/4]

Array4<Real > amrex::FabSet::array ( const MFIter mfi)
inlinenoexcept

◆ array() [3/4]

Array4<Real const> amrex::FabSet::array ( int  i) const
inlinenoexcept

◆ array() [4/4]

Array4<Real > amrex::FabSet::array ( int  i)
inlinenoexcept

◆ arrays() [1/2]

MultiArray4<Real const> amrex::FabSet::arrays ( ) const
inlinenoexcept

◆ arrays() [2/2]

MultiArray4<Real > amrex::FabSet::arrays ( )
inlinenoexcept

◆ boxArray()

const BoxArray& amrex::FabSet::boxArray ( ) const
inlinenoexcept

◆ clear()

void amrex::FabSet::clear ( )
inline

◆ const_array() [1/2]

Array4<Real const> amrex::FabSet::const_array ( const MFIter mfi) const
inlinenoexcept

◆ const_array() [2/2]

Array4<Real const> amrex::FabSet::const_array ( int  i) const
inlinenoexcept

◆ const_arrays()

MultiArray4<Real const> amrex::FabSet::const_arrays ( ) const
inlinenoexcept

◆ Copy()

void amrex::FabSet::Copy ( FabSet dst,
const FabSet src 
)
static

◆ copyFrom() [1/2]

FabSet & amrex::FabSet::copyFrom ( const FabSet src,
int  scomp,
int  dcomp,
int  ncomp 
)

◆ copyFrom() [2/2]

FabSet & amrex::FabSet::copyFrom ( const MultiFab src,
int  ngrow,
int  scomp,
int  dcomp,
int  ncomp,
const Periodicity period = Periodicity::NonPeriodic() 
)

◆ copyTo()

void amrex::FabSet::copyTo ( MultiFab dest,
int  ngrow,
int  scomp,
int  dcomp,
int  ncomp,
const Periodicity period = Periodicity::NonPeriodic() 
) const

◆ define()

void amrex::FabSet::define ( const BoxArray grids,
const DistributionMapping dmap,
int  ncomp 
)

Define a FabSet constructed via default constructor.

◆ DistributionMap()

const DistributionMapping& amrex::FabSet::DistributionMap ( ) const
inlinenoexcept

◆ fabbox()

Box amrex::FabSet::fabbox ( int  K) const
inlinenoexcept

◆ linComb() [1/2]

FabSet & amrex::FabSet::linComb ( Real  a,
const MultiFab mfa,
int  a_comp,
Real  b,
const MultiFab mfb,
int  b_comp,
int  dcomp,
int  ncomp,
int  ngrow 
)

◆ linComb() [2/2]

FabSet & amrex::FabSet::linComb ( Real  a,
Real  b,
const FabSet src,
int  scomp,
int  dcomp,
int  ncomp 
)

Linear combination: this := a*mfa + b*mfb.

◆ multiFab() [1/2]

MultiFab const& amrex::FabSet::multiFab ( ) const
inlinenoexcept

◆ multiFab() [2/2]

MultiFab& amrex::FabSet::multiFab ( )
inlinenoexcept

◆ nComp()

int amrex::FabSet::nComp ( ) const
inlinenoexcept

◆ operator=() [1/2]

FabSet& amrex::FabSet::operator= ( const FabSet rhs)
delete

◆ operator=() [2/2]

FabSet& amrex::FabSet::operator= ( FabSet &&  rhs)
delete

◆ operator[]() [1/4]

FArrayBox const& amrex::FabSet::operator[] ( const MFIter mfi) const
inlinenoexcept

◆ operator[]() [2/4]

FArrayBox& amrex::FabSet::operator[] ( const MFIter mfi)
inlinenoexcept

◆ operator[]() [3/4]

FArrayBox const& amrex::FabSet::operator[] ( int  i) const
inlinenoexcept

◆ operator[]() [4/4]

FArrayBox& amrex::FabSet::operator[] ( int  i)
inlinenoexcept

◆ plusFrom() [1/2]

FabSet & amrex::FabSet::plusFrom ( const FabSet src,
int  scomp,
int  dcomp,
int  ncomp 
)

◆ plusFrom() [2/2]

FabSet & amrex::FabSet::plusFrom ( const MultiFab src,
int  ngrow,
int  scomp,
int  dcomp,
int  ncomp,
const Periodicity period = Periodicity::NonPeriodic() 
)

◆ plusTo()

void amrex::FabSet::plusTo ( MultiFab dest,
int  ngrow,
int  scomp,
int  dcomp,
int  ncomp,
const Periodicity period = Periodicity::NonPeriodic() 
) const

◆ read()

void amrex::FabSet::read ( const std::string &  name)

Read (used for reading from checkpoint)

Local copy function

◆ setVal() [1/2]

void amrex::FabSet::setVal ( Real  val)

◆ setVal() [2/2]

void amrex::FabSet::setVal ( Real  val,
int  comp,
int  num_comp 
)

Linear combination: this := a*this + b*src (FabSets must be commensurate).

◆ size()

int amrex::FabSet::size ( ) const
inlinenoexcept

◆ write()

void amrex::FabSet::write ( const std::string &  name) const

Write (used for writing to checkpoint)

Friends And Related Function Documentation

◆ FabSetIter

friend class FabSetIter
friend

◆ FluxRegister

friend class FluxRegister
friend

Member Data Documentation

◆ m_mf

MultiFab amrex::FabSet::m_mf
private

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