13 #ifndef _BLOCKBASEREGISTER_H_ 14 #define _BLOCKBASEREGISTER_H_ 23 #include "NamespaceHeader.H" 53 const int& a_ghost = 0 );
68 const int& a_ghost = 0 );
93 void store(
const T& a_data,
154 virtual void setName(
const std::string& a_name)
195 const int& a_blockBdryIndex )
const;
204 const int& a_blockBdryIndex )
const;
361 #include "NamespaceFooter.H" 365 #endif // include guard int m_ghost
Definition: BlockBaseRegister.H:331
void buildSrcRegisterLayout()
Build all box layouts for the source boxes.
Definition: BlockBaseRegisterImplem.H:666
IntVect m_ghostVect
Definition: BlockBaseRegister.H:337
bool isDefined() const
Returns true if class has been defined, false otherwise.
Definition: BlockBaseRegister.H:71
int getBlockID(const DataIndex &a_dataIndex) const
Returns the integer index of the block in which the box corresponding to the DataIndex resides...
Definition: BlockBaseRegisterImplem.H:404
std::map< int, int > BlockBdryIndexMap
Definition: BlockBaseRegister.H:339
#define CH_SPACEDIM
Definition: SPACE.H:51
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
void copyToDstRegister()
Local copy of data from exterior source registers to exterior full register.
Definition: BlockBaseRegisterImplem.H:889
DisjointBoxLayout m_srcRegisterLayout[2 *CH_SPACEDIM]
Definition: BlockBaseRegister.H:351
bool m_isDefined
Definition: BlockBaseRegister.H:333
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...
Definition: BlockBaseRegisterImplem.H:422
LevelData< T > m_register[2 *CH_SPACEDIM]
Definition: BlockBaseRegister.H:346
int m_verbosity
Definition: BlockBaseRegister.H:332
Class to implement a single data register a mapped multiblock domain block boundary.
Definition: BlockBaseRegister.H:27
LevelData< T > m_excRegister[2 *CH_SPACEDIM]
Definition: BlockBaseRegister.H:349
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.
Definition: BlockBaseRegisterImplem.H:599
void defineDataLayouts(const int a_ncomp)
Define each of the three internally used data layouts.
Definition: BlockBaseRegisterImplem.H:78
BlockBaseRegister()
Empty constructor.
Definition: BlockBaseRegister.H:39
LayoutData< DataIndex > m_grdToDstMap[2 *CH_SPACEDIM]
Definition: BlockBaseRegister.H:356
bool m_hasData
Definition: BlockBaseRegister.H:334
Definition: BlockBaseRegister.H:228
void clearDataLayouts()
Undefine each of the three internally used data layouts.
Definition: BlockBaseRegisterImplem.H:97
void buildExchangeRegisterLayout()
Build all disjoint box layouts for the data exchange.
Definition: BlockBaseRegisterImplem.H:697
void store(const T &a_data, const DataIndex &a_dataIndex, int a_dir, Side::LoHiSide a_side)
Store data on block-boundary faces.
Definition: BlockBaseRegisterImplem.H:110
Definition: BlockBaseRegister.H:226
void zeroRegister(const int a_n_comp=-1)
Definition: BlockBaseRegisterImplem.H:278
DisjointBoxLayout m_grids
Definition: BlockBaseRegister.H:328
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)
Definition: BlockBaseRegisterImplem.H:724
virtual ~BlockBaseRegister()
virtual destructor
Definition: BlockBaseRegisterImplem.H:39
Vector< BlockBdryIndexMap > m_blockBdryIndexMap
Definition: BlockBaseRegister.H:340
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...
Definition: BlockBaseRegisterImplem.H:487
std::string m_name
Definition: BlockBaseRegister.H:336
void print(const LevelData< T > a_register[2 *CH_SPACEDIM]) const
Print the specified register.
Definition: BlockBaseRegisterImplem.H:993
new code
Definition: BoxLayoutData.H:170
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.
Definition: BlockBaseRegisterImplem.H:558
Data on a BoxLayout.
Definition: BoxLayoutData.H:97
bool hasStorage() const
Definition: BlockBaseRegister.H:326
DisjointBoxLayout m_excRegisterLayout[2 *CH_SPACEDIM]
Definition: BlockBaseRegister.H:348
Definition: BlockBaseRegister.H:227
ProblemDomain m_domain
Definition: BlockBaseRegister.H:329
LayoutData< DataIndex > m_dstToExcMap[2 *CH_SPACEDIM]
Definition: BlockBaseRegister.H:357
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
LoHiSide
Definition: LoHiSide.H:27
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.
Definition: BlockBaseRegisterImplem.H:315
virtual interface class encapsulating multi-block mapping API
Definition: MultiBlockCoordSys.H:34
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...
Definition: BlockBaseRegisterImplem.H:453
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.
Definition: BlockBaseRegisterImplem.H:344
bool m_hasDefinedDataLayouts
Definition: BlockBaseRegister.H:335
IndicesTransformation getTransformation(const int &a_block, const int &a_blockBdryIndex) const
Returns the index transformation box corresponding to the Blockboundary specified by the block intege...
Definition: BlockBaseRegisterImplem.H:441
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
DisjointBoxLayout m_registerLayout[2 *CH_SPACEDIM]
Definition: BlockBaseRegister.H:345
Definition: DataIndex.H:114
void buildRegisterLayout()
Build all box layouts for the data register.
Definition: BlockBaseRegisterImplem.H:637
void copyToSrcRegister()
Copy, including parallel exchange, of data from interior exchange registers to exterior source regist...
Definition: BlockBaseRegisterImplem.H:842
void printRegisters() const
Print all registers to pout().
Definition: BlockBaseRegisterImplem.H:1031
void increment(const T &a_flux, const DataIndex &a_dataIndex, int a_dir, Side::LoHiSide a_side)
Increment data on block-boundary faces.
Definition: BlockBaseRegisterImplem.H:179
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 ...
Definition: BlockBaseRegisterImplem.H:520
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
void exchange()
Exchange data to fill exterior register regions.
Definition: BlockBaseRegisterImplem.H:247
void define(const MultiBlockCoordSys *a_mblock, const DisjointBoxLayout &a_grids, const int &a_ghost=0)
Define function that matches constructor.
Definition: BlockBaseRegisterImplem.H:46
UseType
Builds an array of vectors of boxes, one for each direction-side combination, that corresponds to eit...
Definition: BlockBaseRegister.H:223
virtual void setVerbose(int a_verbose)
Set verbosity.
Definition: BlockBaseRegister.H:80
LevelData< T > m_srcRegister[2 *CH_SPACEDIM]
Definition: BlockBaseRegister.H:352
Definition: BlockBaseRegister.H:225
const Box & getBlockBox(const int &a_block) const
Returns the box corresponding to the block specified by the block integer index.
Definition: BlockBaseRegisterImplem.H:413
LayoutData< DataIndex > m_dstToSrcMap[2 *CH_SPACEDIM]
Definition: BlockBaseRegister.H:358
MultiBlockCoordSys * m_coordsys
Definition: BlockBaseRegister.H:330
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...
Definition: BlockBaseRegisterImplem.H:816
Definition: BlockBaseRegister.H:229
virtual void setName(const std::string &a_name)
Set the name of the register.
Definition: BlockBaseRegister.H:154
bool hasData() const
Returns true if data has been stored in the register, false otherwise.
Definition: BlockBaseRegister.H:172