Chombo + EB + MF
3.2
|
Class to implement a single data register a mapped multiblock domain block boundary. More...
#include <BlockBaseRegister.H>
Constructor, destructor, and defines. | |
enum | UseType { Invalid =-1, DST =0, SRC, EXC, NUM_USE_TYPES } |
Builds an array of vectors of boxes, one for each direction-side combination, that corresponds to either the full register, the src for external register regions, or the image of the src external regions. More... | |
typedef std::map< int, int > | BlockBdryIndexMap |
DisjointBoxLayout | m_grids |
ProblemDomain | m_domain |
MultiBlockCoordSys * | m_coordsys |
int | m_ghost |
int | m_verbosity |
bool | m_isDefined |
bool | m_hasData |
bool | m_hasDefinedDataLayouts |
std::string | m_name |
IntVect | m_ghostVect |
Vector< BlockBdryIndexMap > | m_blockBdryIndexMap |
DisjointBoxLayout | m_registerLayout [2 *CH_SPACEDIM] |
LevelData< T > | m_register [2 *CH_SPACEDIM] |
DisjointBoxLayout | m_excRegisterLayout [2 *CH_SPACEDIM] |
LevelData< T > | m_excRegister [2 *CH_SPACEDIM] |
DisjointBoxLayout | m_srcRegisterLayout [2 *CH_SPACEDIM] |
LevelData< T > | m_srcRegister [2 *CH_SPACEDIM] |
LayoutData< DataIndex > | m_grdToDstMap [2 *CH_SPACEDIM] |
LayoutData< DataIndex > | m_dstToExcMap [2 *CH_SPACEDIM] |
LayoutData< DataIndex > | m_dstToSrcMap [2 *CH_SPACEDIM] |
BlockBaseRegister () | |
Empty constructor. More... | |
BlockBaseRegister (const MultiBlockCoordSys *a_mblock, const DisjointBoxLayout &a_grids, const int &a_ghost=0) | |
Constructor. More... | |
virtual | ~BlockBaseRegister () |
virtual destructor More... | |
void | define (const MultiBlockCoordSys *a_mblock, const DisjointBoxLayout &a_grids, const int &a_ghost=0) |
Define function that matches constructor. More... | |
bool | isDefined () const |
Returns true if class has been defined, false otherwise. More... | |
virtual void | setVerbose (int a_verbose) |
Set verbosity. More... | |
void | store (const T &a_data, const DataIndex &a_dataIndex, int a_dir, Side::LoHiSide a_side) |
Store data on block-boundary faces. More... | |
void | increment (const T &a_flux, const DataIndex &a_dataIndex, int a_dir, Side::LoHiSide a_side) |
Increment data on block-boundary faces. More... | |
void | exchange () |
Exchange data to fill exterior register regions. More... | |
void | zeroRegister (const int a_n_comp=-1) |
bool | hasInterface (const DataIndex &a_dataIndex, int a_dir, Side::LoHiSide a_side) const |
Returns whether or not a box has a block-boundary interface on one of its faces. More... | |
void | fill (T &a_data, const DataIndex &a_dataIndex, int a_dir, Side::LoHiSide a_side, Side::LoHiSide a_sideData) const |
Return data on a block-boundary interface of a box, if hasInterface(a_dataIndex, a_dir, a_side) is true. More... | |
virtual void | setName (const std::string &a_name) |
Set the name of the register. More... | |
bool | isInterface (const int &a_block, const int &a_dir, const Side::LoHiSide &a_side) const |
Returns true if the block-boundary in this direction on this side is an interface between blocks, false otherwise. More... | |
bool | hasData () const |
Returns true if data has been stored in the register, false otherwise. More... | |
int | getBlockID (const DataIndex &a_dataIndex) const |
Returns the integer index of the block in which the box corresponding to the DataIndex resides. More... | |
const Box & | getBlockBox (const int &a_block) const |
Returns the box corresponding to the block specified by the block integer index. More... | |
const Box & | getNeighborBlockBox (const int &a_block, const int &a_blockBdryIndex) const |
Returns the box corresponding to the block opposite to the block specified by the block integer index through the block-boundary specified by the integer index. More... | |
IndicesTransformation | getTransformation (const int &a_block, const int &a_blockBdryIndex) const |
Returns the index transformation box corresponding to the Blockboundary specified by the block integer index and the block-boundary index. More... | |
int | getSrcBlockBdryIndex (const int &a_block, const int &a_dir, const Side::LoHiSide &a_side) |
Returns the index of the neighboring block opposite the block in the direction and side spceified. More... | |
void | buildBoxVectors (Vector< Box > a_boxes[2 *CH_SPACEDIM], Vector< int > a_boxProcMap[2 *CH_SPACEDIM], Vector< DataIndex > a_dataIndex[2 *CH_SPACEDIM], const UseType a_type) |
void | buildInverseBlockBdryIndexMap (Vector< int > a_map[2 *CH_SPACEDIM]) |
Builds a mapping from the block-boundary index of neighboring block to the local block-boundary index. More... | |
void | buildRegisterLayout () |
Build all box layouts for the data register. More... | |
void | buildSrcRegisterLayout () |
Build all box layouts for the source boxes. More... | |
void | buildExchangeRegisterLayout () |
Build all disjoint box layouts for the data exchange. More... | |
void | defineDataLayouts (const int a_ncomp) |
Define each of the three internally used data layouts. More... | |
void | clearDataLayouts () |
Undefine each of the three internally used data layouts. More... | |
void | createDstBoxLayout (DisjointBoxLayout &a_layout, LayoutData< DataIndex > &a_map, const Vector< Box > &a_boxes, const Vector< int > &a_procs, const Vector< DataIndex > &a_indices) |
Build a box layout for the data register given a vector of boxes with processor mappings and related DataIndices from the underlying disjoint box layout. More... | |
void | createSrcBoxLayout (DisjointBoxLayout &a_layout, LayoutData< DataIndex > a_dstToSrcMap[2 *CH_SPACEDIM], const Vector< Box > &a_boxes, const Vector< int > &a_procs, const Vector< DataIndex > &a_indices, const Vector< int > &a_dstBlockBdryIndices, const LayoutData< DataIndex > a_grdToDstMap[2 *CH_SPACEDIM]) |
Build the box layout and associated box mappings for the source boxes. More... | |
void | createExchangeBoxLayout (DisjointBoxLayout &a_layout, LayoutData< DataIndex > &a_dstToExcMap, const Vector< Box > &a_boxes, const Vector< int > &a_procs, const Vector< DataIndex > &a_indices, const LayoutData< DataIndex > &a_grdToDstMap) |
Build the box layout and associated box mappings for the data exchange. More... | |
void | copyToSrcRegister () |
Copy, including parallel exchange, of data from interior exchange registers to exterior source registers. More... | |
void | copyToDstRegister () |
Local copy of data from exterior source registers to exterior full register. More... | |
void | printRegisters () const |
Print all registers to pout(). More... | |
void | print (const LevelData< T > a_register[2 *CH_SPACEDIM]) const |
Print the specified register. More... | |
void | print (const BoxLayoutData< T > a_register[2 *CH_SPACEDIM]) const |
bool | hasStorage () const |
Class to implement a single data register a mapped multiblock domain block boundary.
|
protected |
|
protected |
Builds an array of vectors of boxes, one for each direction-side combination, that corresponds to either the full register, the src for external register regions, or the image of the src external regions.
– a_boxes: Array of vector of boxes. – a_boxProcMap: Array of vector of processor mappings. – a_dataIndex: Array of vector of DataIndices that relate each box to a box in the underlying DisjointBoxLayout. – a_type: Type of register box to build [DST, SRC, or EXC].
Enumerator | |
---|---|
Invalid | |
DST | |
SRC | |
EXC | |
NUM_USE_TYPES |
|
inline |
Empty constructor.
Referenced by BlockBaseRegister< FArrayBox >::BlockBaseRegister().
BlockBaseRegister< T >::BlockBaseRegister | ( | const MultiBlockCoordSys * | a_mblock, |
const DisjointBoxLayout & | a_grids, | ||
const int & | a_ghost = 0 |
||
) |
Constructor.
– a_mblock: Pointer to multiblock coordinate system. – a_grids: DisjointBoxLayout over which multiblock grid is defined. – a_ghost: Extension of register domain for auxiliary data.
a_grids | CELL-centered grids |
a_ghost | ghost width for state variables |
|
virtual |
virtual destructor
Referenced by BlockBaseRegister< FArrayBox >::BlockBaseRegister().
void BlockBaseRegister< T >::define | ( | const MultiBlockCoordSys * | a_mblock, |
const DisjointBoxLayout & | a_grids, | ||
const int & | a_ghost = 0 |
||
) |
Define function that matches constructor.
– a_mblock: Pointer to multiblock coordinate system. – a_grids: DisjointBoxLayout over which multiblock grid is defined. – a_ghost: Extension of register domain for auxiliary data.
a_grids | CELL-centered grids |
a_ghost | ghost width for state variables |
Referenced by BlockBaseRegister< FArrayBox >::BlockBaseRegister().
|
inline |
Returns true if class has been defined, false otherwise.
Referenced by BlockBaseRegister< FArrayBox >::exchange(), BlockBaseRegister< FArrayBox >::fill(), BlockBaseRegister< FArrayBox >::increment(), BlockBaseRegister< FArrayBox >::store(), and BlockBaseRegister< FArrayBox >::zeroRegister().
|
inlinevirtual |
Set verbosity.
Default is 0. Positive values output increasing amounts of information.
void BlockBaseRegister< T >::store | ( | const T & | a_data, |
const DataIndex & | a_dataIndex, | ||
int | a_dir, | ||
Side::LoHiSide | a_side | ||
) |
Store data on block-boundary faces.
– a_flux: Face-centered data to be stored. – a_dataIndex: Index of box where flux has been computed. – a_dir: Direction of the face. – a_side: Low or high side of the box where the block-boundary face lies.
Referenced by BlockBaseRegister< FArrayBox >::setVerbose().
void BlockBaseRegister< T >::increment | ( | const T & | a_flux, |
const DataIndex & | a_dataIndex, | ||
int | a_dir, | ||
Side::LoHiSide | a_side | ||
) |
Increment data on block-boundary faces.
– a_flux: Face-centered flux to be stored. – a_dataIndex: Index of box where flux has been computed. – a_dir: Direction of the face. – a_side: Low or high side of the box where the block-boundary face lies.
Referenced by BlockBaseRegister< FArrayBox >::setVerbose().
void BlockBaseRegister< T >::exchange | ( | void | ) |
Exchange data to fill exterior register regions.
Perform data manipulation so that both interior and exterior register data is current.
Referenced by BlockBaseRegister< FArrayBox >::setVerbose().
void BlockBaseRegister< T >::zeroRegister | ( | const int | a_n_comp = -1 | ) |
Sets the contents of the register to zero.
Referenced by BlockBaseRegister< FArrayBox >::setVerbose().
bool BlockBaseRegister< T >::hasInterface | ( | const DataIndex & | a_dataIndex, |
int | a_dir, | ||
Side::LoHiSide | a_side | ||
) | const |
Returns whether or not a box has a block-boundary interface on one of its faces.
– a_dataIndex: Index of box. – a_dir: Direction of the face of the box. – a_side: Low or high side of the box.
Referenced by BlockBaseRegister< FArrayBox >::buildBoxVectors(), BlockBaseRegister< FArrayBox >::buildInverseBlockBdryIndexMap(), BlockBaseRegister< FArrayBox >::copyToDstRegister(), BlockBaseRegister< FArrayBox >::fill(), BlockBaseRegister< FArrayBox >::increment(), BlockBaseRegister< FArrayBox >::setVerbose(), and BlockBaseRegister< FArrayBox >::store().
void BlockBaseRegister< T >::fill | ( | T & | a_data, |
const DataIndex & | a_dataIndex, | ||
int | a_dir, | ||
Side::LoHiSide | a_side, | ||
Side::LoHiSide | a_sideData | ||
) | const |
Return data on a block-boundary interface of a box, if hasInterface(a_dataIndex, a_dir, a_side) is true.
– a_data: Face-centered data returned. – a_dataIndex: Index of box. – a_dir: Direction of the face. – a_side: Low or high side of the box. – a_sideData: Low or high side of the block-boundary interface, from which data will be taken.
Referenced by BlockBaseRegister< FArrayBox >::setVerbose().
|
inlinevirtual |
Set the name of the register.
String identifier for this register, useful for debugging output. Default is UNDEFINED.
|
inlineprotected |
Returns true if the block-boundary in this direction on this side is an interface between blocks, false otherwise.
– a_block: Index of the block. – a_dir: Direction of the face. – a_side: Low or high side of the box.
Referenced by BlockBaseRegister< FArrayBox >::hasInterface(), and BlockBaseRegister< FArrayBox >::setName().
|
inlineprotected |
Returns true if data has been stored in the register, false otherwise.
Referenced by BlockBaseRegister< FArrayBox >::exchange(), and BlockBaseRegister< FArrayBox >::fill().
|
inlineprotected |
Returns the integer index of the block in which the box corresponding to the DataIndex resides.
– a_dataIndex: Index of box.
Referenced by BlockBaseRegister< FArrayBox >::copyToDstRegister(), BlockBaseRegister< FArrayBox >::hasData(), and BlockBaseRegister< FArrayBox >::hasInterface().
|
inlineprotected |
Returns the box corresponding to the block specified by the block integer index.
– a_block: Index of the block.
Referenced by BlockBaseRegister< FArrayBox >::getNeighborBlockBox(), BlockBaseRegister< FArrayBox >::getSrcBlockBdryIndex(), BlockBaseRegister< FArrayBox >::hasData(), and BlockBaseRegister< FArrayBox >::hasInterface().
|
inlineprotected |
Returns the box corresponding to the block opposite to the block specified by the block integer index through the block-boundary specified by the integer index.
– a_block: Index of the block. – a_block: Index of the block boundary.
Referenced by BlockBaseRegister< FArrayBox >::getSrcBlockBdryIndex(), and BlockBaseRegister< FArrayBox >::hasData().
|
inlineprotected |
Returns the index transformation box corresponding to the Blockboundary specified by the block integer index and the block-boundary index.
– a_block: Index of the block. – a_block: Index of the block boundary.
Referenced by BlockBaseRegister< FArrayBox >::buildBoxVectors(), BlockBaseRegister< FArrayBox >::copyToDstRegister(), BlockBaseRegister< FArrayBox >::getSrcBlockBdryIndex(), and BlockBaseRegister< FArrayBox >::hasData().
|
inlineprotected |
Returns the index of the neighboring block opposite the block in the direction and side spceified.
– a_block: Index of the block. – a_dir: Direction of the face. – a_side: Low or high side of the box.
Referenced by BlockBaseRegister< FArrayBox >::buildBoxVectors(), BlockBaseRegister< FArrayBox >::buildInverseBlockBdryIndexMap(), BlockBaseRegister< FArrayBox >::copyToDstRegister(), and BlockBaseRegister< FArrayBox >::hasData().
|
protected |
Builds a mapping from the block-boundary index of neighboring block to the local block-boundary index.
– a_map: Array of vector relating block-boundary indices.
Referenced by BlockBaseRegister< FArrayBox >::buildSrcRegisterLayout().
|
protected |
Build all box layouts for the data register.
Referenced by BlockBaseRegister< FArrayBox >::define().
|
protected |
Build all box layouts for the source boxes.
Referenced by BlockBaseRegister< FArrayBox >::define().
|
protected |
Build all disjoint box layouts for the data exchange.
Referenced by BlockBaseRegister< FArrayBox >::define().
|
protected |
Define each of the three internally used data layouts.
Referenced by BlockBaseRegister< FArrayBox >::increment(), BlockBaseRegister< FArrayBox >::store(), and BlockBaseRegister< FArrayBox >::zeroRegister().
|
protected |
Undefine each of the three internally used data layouts.
Referenced by BlockBaseRegister< FArrayBox >::zeroRegister().
|
inlineprotected |
Build a box layout for the data register given a vector of boxes with processor mappings and related DataIndices from the underlying disjoint box layout.
– a_layout: Resulting box layout. – a_map: Mapping between DataIndexes of the underlying disjoint box layout and DataIndexes of the resulting box layout. – a_boxes: Vector of boxes. – a_boxProcMap: Vector of processor mappings. – a_indices: Vector of DataIndices that relate each box to a box in the underlying DisjointBoxLayout.
Referenced by BlockBaseRegister< FArrayBox >::buildRegisterLayout().
|
inlineprotected |
Build the box layout and associated box mappings for the source boxes.
– a_layout: Resulting box layout. – a_dstToSrcMap: Array of mappings between DataIndexes of the destination box layout and DataIndexes of the resulting box layout. – a_boxes: Vector of boxes. – a_boxProcMap: Vector of processor mappings. – a_indices: Vector of DataIndices that relate each box to a box in the underlying DisjointBoxLayout. – a_dstBlockBdryIndices: Vector of DataIndices that relate each box to a block boundry of the destination block. – a_grdToDstMap: Array of vector of DataIndices that relate each in the underlying DisjointBoxLayout to a box in the destination register.
Referenced by BlockBaseRegister< FArrayBox >::buildSrcRegisterLayout().
|
inlineprotected |
Build the box layout and associated box mappings for the data exchange.
– a_layout: Resulting box layout. – a_dstToExcMap: Array of mappings between DataIndexes of the destination box layout and DataIndexes of the resulting box layout. – a_boxes: Vector of boxes. – a_boxProcMap: Vector of processor mappings. – a_indices: Vector of DataIndices that relate each box to a box in the underlying DisjointBoxLayout. – a_grdToDstMap: Array of vector of DataIndices that relate each in the underlying DisjointBoxLayout to a box in the destination register.
Referenced by BlockBaseRegister< FArrayBox >::buildExchangeRegisterLayout().
|
inlineprotected |
Copy, including parallel exchange, of data from interior exchange registers to exterior source registers.
Referenced by BlockBaseRegister< FArrayBox >::exchange().
|
inlineprotected |
Local copy of data from exterior source registers to exterior full register.
Referenced by BlockBaseRegister< FArrayBox >::exchange().
|
protected |
Print all registers to pout().
Referenced by BlockBaseRegister< FArrayBox >::exchange().
|
inlineprotected |
Print the specified register.
– a_register: Array of registers to print.
Referenced by BlockBaseRegister< FArrayBox >::copyToDstRegister(), and BlockBaseRegister< FArrayBox >::printRegisters().
|
inlineprotected |
|
inlineprotected |
|
protected |
Referenced by BlockBaseRegister< FArrayBox >::buildBoxVectors(), BlockBaseRegister< FArrayBox >::buildInverseBlockBdryIndexMap(), BlockBaseRegister< FArrayBox >::buildRegisterLayout(), BlockBaseRegister< FArrayBox >::copyToDstRegister(), BlockBaseRegister< FArrayBox >::define(), BlockBaseRegister< FArrayBox >::fill(), BlockBaseRegister< FArrayBox >::getBlockID(), BlockBaseRegister< FArrayBox >::hasInterface(), BlockBaseRegister< FArrayBox >::increment(), and BlockBaseRegister< FArrayBox >::store().
|
protected |
|
protected |
Referenced by BlockBaseRegister< FArrayBox >::buildBoxVectors(), BlockBaseRegister< FArrayBox >::buildInverseBlockBdryIndexMap(), BlockBaseRegister< FArrayBox >::define(), BlockBaseRegister< FArrayBox >::getBlockBox(), BlockBaseRegister< FArrayBox >::getBlockID(), BlockBaseRegister< FArrayBox >::getNeighborBlockBox(), BlockBaseRegister< FArrayBox >::getTransformation(), and BlockBaseRegister< FArrayBox >::isInterface().
|
protected |
Referenced by BlockBaseRegister< FArrayBox >::buildBoxVectors(), BlockBaseRegister< FArrayBox >::copyToSrcRegister(), BlockBaseRegister< FArrayBox >::define(), BlockBaseRegister< FArrayBox >::defineDataLayouts(), BlockBaseRegister< FArrayBox >::fill(), BlockBaseRegister< FArrayBox >::increment(), and BlockBaseRegister< FArrayBox >::store().
|
protected |
|
protected |
Referenced by BlockBaseRegister< FArrayBox >::define(), and BlockBaseRegister< FArrayBox >::isDefined().
|
protected |
Referenced by BlockBaseRegister< FArrayBox >::copyToDstRegister(), BlockBaseRegister< FArrayBox >::copyToSrcRegister(), BlockBaseRegister< FArrayBox >::hasData(), BlockBaseRegister< FArrayBox >::increment(), BlockBaseRegister< FArrayBox >::store(), and BlockBaseRegister< FArrayBox >::zeroRegister().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by BlockBaseRegister< FArrayBox >::clearDataLayouts(), BlockBaseRegister< FArrayBox >::copyToDstRegister(), BlockBaseRegister< FArrayBox >::defineDataLayouts(), BlockBaseRegister< FArrayBox >::fill(), BlockBaseRegister< FArrayBox >::increment(), BlockBaseRegister< FArrayBox >::printRegisters(), BlockBaseRegister< FArrayBox >::store(), and BlockBaseRegister< FArrayBox >::zeroRegister().
|
protected |
|
protected |
Referenced by BlockBaseRegister< FArrayBox >::clearDataLayouts(), BlockBaseRegister< FArrayBox >::copyToSrcRegister(), BlockBaseRegister< FArrayBox >::defineDataLayouts(), BlockBaseRegister< FArrayBox >::increment(), BlockBaseRegister< FArrayBox >::store(), and BlockBaseRegister< FArrayBox >::zeroRegister().
|
protected |
|
protected |
Referenced by BlockBaseRegister< FArrayBox >::clearDataLayouts(), BlockBaseRegister< FArrayBox >::copyToDstRegister(), BlockBaseRegister< FArrayBox >::copyToSrcRegister(), BlockBaseRegister< FArrayBox >::defineDataLayouts(), BlockBaseRegister< FArrayBox >::printRegisters(), and BlockBaseRegister< FArrayBox >::zeroRegister().
|
protected |
Referenced by BlockBaseRegister< FArrayBox >::buildExchangeRegisterLayout(), BlockBaseRegister< FArrayBox >::buildRegisterLayout(), BlockBaseRegister< FArrayBox >::buildSrcRegisterLayout(), BlockBaseRegister< FArrayBox >::copyToDstRegister(), BlockBaseRegister< FArrayBox >::fill(), BlockBaseRegister< FArrayBox >::increment(), and BlockBaseRegister< FArrayBox >::store().
|
protected |
|
protected |