Block-Structured AMR Software Framework
amrex::FabSetT< MF > Class Template 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 Types

using value_type = typename FabDataType< MF >::value_type
 
using FAB = typename FabDataType< MF >::fab_type
 

Public Member Functions

 FabSetT () noexcept=default
 The default constructor – you must later call define(). More...
 
 FabSetT (const BoxArray &grids, const DistributionMapping &dmap, int ncomp)
 Construct a FabSetT<MF> of specified number of components on the grids. More...
 
 ~FabSetT ()=default
 
 FabSetT (FabSetT< MF > &&rhs) noexcept=default
 
 FabSetT (const FabSetT< MF > &rhs)=delete
 
FabSetT< MF > & operator= (const FabSetT< MF > &rhs)=delete
 
FabSetT< MF > & operator= (FabSetT< MF > &&rhs)=delete
 
void define (const BoxArray &grids, const DistributionMapping &dmap, int ncomp)
 Define a FabSetT<MF> constructed via default constructor. More...
 
FAB const & operator[] (const MFIter &mfi) const noexcept
 
FABoperator[] (const MFIter &mfi) noexcept
 
FAB const & operator[] (int i) const noexcept
 
FABoperator[] (int i) noexcept
 
Array4< value_type const > array (const MFIter &mfi) const noexcept
 
Array4< value_typearray (const MFIter &mfi) noexcept
 
Array4< value_type const > array (int i) const noexcept
 
Array4< value_typearray (int i) noexcept
 
Array4< value_type const > const_array (const MFIter &mfi) const noexcept
 
Array4< value_type const > const_array (int i) const noexcept
 
MultiArray4< value_type const > arrays () const noexcept
 
MultiArray4< value_typearrays () noexcept
 
MultiArray4< value_type const > const_arrays () const noexcept
 
Box fabbox (int K) const noexcept
 
int size () const noexcept
 
const BoxArrayboxArray () const noexcept
 
const DistributionMappingDistributionMap () const noexcept
 
MF & multiFab () noexcept
 
MF const & multiFab () const noexcept
 
int nComp () const noexcept
 
void clear ()
 
FabSetT< MF > & copyFrom (const FabSetT< MF > &src, int scomp, int dcomp, int ncomp)
 
FabSetT< MF > & copyFrom (const MF &src, int ngrow, int scomp, int dcomp, int ncomp, const Periodicity &period=Periodicity::NonPeriodic())
 
FabSetT< MF > & plusFrom (const FabSetT< MF > &src, int scomp, int dcomp, int ncomp)
 
FabSetT< MF > & plusFrom (const MF &src, int ngrow, int scomp, int dcomp, int ncomp, const Periodicity &period=Periodicity::NonPeriodic())
 
void copyTo (MF &dest, int ngrow, int scomp, int dcomp, int ncomp, const Periodicity &period=Periodicity::NonPeriodic()) const
 
void plusTo (MF &dest, int ngrow, int scomp, int dcomp, int ncomp, const Periodicity &period=Periodicity::NonPeriodic()) const
 
void setVal (value_type val)
 
void setVal (value_type val, int comp, int num_comp)
 Linear combination: this := a*this + b*src (FabSetT<MF>s must be commensurate). More...
 
FabSetT< MF > & linComb (value_type a, value_type b, const FabSetT< MF > &src, int scomp, int dcomp, int ncomp)
 Linear combination: this := a*mfa + b*mfb. More...
 
FabSetT< MF > & linComb (value_type a, const MF &mfa, int a_comp, value_type b, const MF &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 (FabSetT< MF > &dst, const FabSetT< MF > &src)
 

Private Attributes

MF m_mf
 

Friends

class FabSetIter
 
class FluxRegister
 

Detailed Description

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

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.

Member Typedef Documentation

◆ FAB

template<typename MF >
using amrex::FabSetT< MF >::FAB = typename FabDataType<MF>::fab_type

◆ value_type

template<typename MF >
using amrex::FabSetT< MF >::value_type = typename FabDataType<MF>::value_type

Constructor & Destructor Documentation

◆ FabSetT() [1/4]

template<typename MF >
amrex::FabSetT< MF >::FabSetT ( )
defaultnoexcept

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

◆ FabSetT() [2/4]

template<typename MF >
amrex::FabSetT< MF >::FabSetT ( const BoxArray grids,
const DistributionMapping dmap,
int  ncomp 
)

Construct a FabSetT<MF> of specified number of components on the grids.

◆ ~FabSetT()

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

◆ FabSetT() [3/4]

template<typename MF >
amrex::FabSetT< MF >::FabSetT ( FabSetT< MF > &&  rhs)
defaultnoexcept

◆ FabSetT() [4/4]

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

Member Function Documentation

◆ array() [1/4]

template<typename MF >
Array4<value_type const> amrex::FabSetT< MF >::array ( const MFIter mfi) const
inlinenoexcept

◆ array() [2/4]

template<typename MF >
Array4<value_type > amrex::FabSetT< MF >::array ( const MFIter mfi)
inlinenoexcept

◆ array() [3/4]

template<typename MF >
Array4<value_type const> amrex::FabSetT< MF >::array ( int  i) const
inlinenoexcept

◆ array() [4/4]

template<typename MF >
Array4<value_type > amrex::FabSetT< MF >::array ( int  i)
inlinenoexcept

◆ arrays() [1/2]

template<typename MF >
MultiArray4<value_type const> amrex::FabSetT< MF >::arrays ( ) const
inlinenoexcept

◆ arrays() [2/2]

template<typename MF >
MultiArray4<value_type > amrex::FabSetT< MF >::arrays ( )
inlinenoexcept

◆ boxArray()

template<typename MF >
const BoxArray& amrex::FabSetT< MF >::boxArray ( ) const
inlinenoexcept

◆ clear()

template<typename MF >
void amrex::FabSetT< MF >::clear ( )
inline

◆ const_array() [1/2]

template<typename MF >
Array4<value_type const> amrex::FabSetT< MF >::const_array ( const MFIter mfi) const
inlinenoexcept

◆ const_array() [2/2]

template<typename MF >
Array4<value_type const> amrex::FabSetT< MF >::const_array ( int  i) const
inlinenoexcept

◆ const_arrays()

template<typename MF >
MultiArray4<value_type const> amrex::FabSetT< MF >::const_arrays ( ) const
inlinenoexcept

◆ Copy()

template<typename MF >
void amrex::FabSetT< MF >::Copy ( FabSetT< MF > &  dst,
const FabSetT< MF > &  src 
)
static

◆ copyFrom() [1/2]

template<typename MF >
FabSetT< MF > & amrex::FabSetT< MF >::copyFrom ( const FabSetT< MF > &  src,
int  scomp,
int  dcomp,
int  ncomp 
)

◆ copyFrom() [2/2]

template<typename MF >
FabSetT< MF > & amrex::FabSetT< MF >::copyFrom ( const MF &  src,
int  ngrow,
int  scomp,
int  dcomp,
int  ncomp,
const Periodicity period = Periodicity::NonPeriodic() 
)

◆ copyTo()

template<typename MF >
void amrex::FabSetT< MF >::copyTo ( MF &  dest,
int  ngrow,
int  scomp,
int  dcomp,
int  ncomp,
const Periodicity period = Periodicity::NonPeriodic() 
) const

◆ define()

template<typename MF >
void amrex::FabSetT< MF >::define ( const BoxArray grids,
const DistributionMapping dmap,
int  ncomp 
)

Define a FabSetT<MF> constructed via default constructor.

◆ DistributionMap()

template<typename MF >
const DistributionMapping& amrex::FabSetT< MF >::DistributionMap ( ) const
inlinenoexcept

◆ fabbox()

template<typename MF >
Box amrex::FabSetT< MF >::fabbox ( int  K) const
inlinenoexcept

◆ linComb() [1/2]

template<typename MF >
FabSetT< MF > & amrex::FabSetT< MF >::linComb ( value_type  a,
const MF &  mfa,
int  a_comp,
value_type  b,
const MF &  mfb,
int  b_comp,
int  dcomp,
int  ncomp,
int  ngrow 
)

◆ linComb() [2/2]

template<typename MF >
FabSetT< MF > & amrex::FabSetT< MF >::linComb ( value_type  a,
value_type  b,
const FabSetT< MF > &  src,
int  scomp,
int  dcomp,
int  ncomp 
)

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

◆ multiFab() [1/2]

template<typename MF >
MF const& amrex::FabSetT< MF >::multiFab ( ) const
inlinenoexcept

◆ multiFab() [2/2]

template<typename MF >
MF& amrex::FabSetT< MF >::multiFab ( )
inlinenoexcept

◆ nComp()

template<typename MF >
int amrex::FabSetT< MF >::nComp ( ) const
inlinenoexcept

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator[]() [1/4]

template<typename MF >
FAB const& amrex::FabSetT< MF >::operator[] ( const MFIter mfi) const
inlinenoexcept

◆ operator[]() [2/4]

template<typename MF >
FAB& amrex::FabSetT< MF >::operator[] ( const MFIter mfi)
inlinenoexcept

◆ operator[]() [3/4]

template<typename MF >
FAB const& amrex::FabSetT< MF >::operator[] ( int  i) const
inlinenoexcept

◆ operator[]() [4/4]

template<typename MF >
FAB& amrex::FabSetT< MF >::operator[] ( int  i)
inlinenoexcept

◆ plusFrom() [1/2]

template<typename MF >
FabSetT< MF > & amrex::FabSetT< MF >::plusFrom ( const FabSetT< MF > &  src,
int  scomp,
int  dcomp,
int  ncomp 
)

◆ plusFrom() [2/2]

template<typename MF >
FabSetT< MF > & amrex::FabSetT< MF >::plusFrom ( const MF &  src,
int  ngrow,
int  scomp,
int  dcomp,
int  ncomp,
const Periodicity period = Periodicity::NonPeriodic() 
)

◆ plusTo()

template<typename MF >
void amrex::FabSetT< MF >::plusTo ( MF &  dest,
int  ngrow,
int  scomp,
int  dcomp,
int  ncomp,
const Periodicity period = Periodicity::NonPeriodic() 
) const

◆ read()

template<typename MF >
void amrex::FabSetT< MF >::read ( const std::string &  name)

Read (used for reading from checkpoint)

Local copy function

◆ setVal() [1/2]

template<typename MF >
void amrex::FabSetT< MF >::setVal ( value_type  val)

◆ setVal() [2/2]

template<typename MF >
void amrex::FabSetT< MF >::setVal ( value_type  val,
int  comp,
int  num_comp 
)

Linear combination: this := a*this + b*src (FabSetT<MF>s must be commensurate).

◆ size()

template<typename MF >
int amrex::FabSetT< MF >::size ( ) const
inlinenoexcept

◆ write()

template<typename MF >
void amrex::FabSetT< MF >::write ( const std::string &  name) const

Write (used for writing to checkpoint)

Friends And Related Function Documentation

◆ FabSetIter

template<typename MF >
friend class FabSetIter
friend

◆ FluxRegister

template<typename MF >
friend class FluxRegister
friend

Member Data Documentation

◆ m_mf

template<typename MF >
MF amrex::FabSetT< MF >::m_mf
private

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