11 #ifndef _MULTIBLOCKUTIL_H_ 12 #define _MULTIBLOCKUTIL_H_ 20 #include "NamespaceHeader.H" 59 int a_bufferSize)
const;
68 int a_baseBlock)
const;
106 int a_baseBlockNum)
const;
112 int a_baseBlockNum)
const;
144 int a_ghostBlockNum)
const;
153 int a_ghostBlockNum)
const;
163 int a_ghostBlockNum)
const;
177 const Box& a_baseBox,
179 int a_baseBlockNum)
const;
206 int a_baseBlock)
const;
247 const RealVect& a_commonMappedBasePoint,
250 int a_commonBlockNum,
256 const RealVect& a_commonMappedBasePoint,
259 int a_commonBlockNum,
268 const RealVect& a_validMappedCenter,
277 const RealVect& a_validMappedCenter,
279 int a_ghostBlockNum)
const;
287 const RealVect& a_validMappedCenter,
289 int a_ghostBlockNum)
const;
346 #include "NamespaceFooter.H" 348 #endif // include guard Vector< int > m_interpDimsVect
dimensions that will be interpolated, which is all dimensions that are not in m_fixedDims. Default is 0:SpaceDim-1.
Definition: MultiBlockUtil.H:335
void growIVS(IntVectSet &a_ivs, int a_bufferSize) const
add IntVects to an IntVectSet in all directions, even across block boundaries.
const IndicesTransformation & blockTransform(int a_srcBlock, int a_dstBlock, const IntVect &a_offset) const
the transformation from block a_dstBlock to a_srcBlock, taking offset a_offset from a_dstBlock ...
void copyStencilsFromBlock(IVSFAB< MBStencil > &a_stencilsFab, const IntVectSet &a_ghostCellsIVS, const IVSFAB< MBStencil > &a_blockStencilsFab) const
copy from a_blockStencilsFab to a_stencilsFab on a_ghostCellsIVS, where the cells in the stencil of a...
void getCollapsedLayout(BoxLayout &a_layoutCollapsed, const BoxLayout &a_layoutFull)
Class to describe a single element of a multi-block interpolation stencil.
Definition: MBStencilElement.H:20
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
IntVectSet extraBlockGhosts(const Box &a_baseBox, int a_ghostLayer, int a_baseBlockNum) const
Vector< IntVect > m_convBaseCells
Definition: MultiBlockUtil.H:342
IntVect m_interpUnit
1 in interpolated dimensions, 0 in fixed dimensions
Definition: MultiBlockUtil.H:338
Vector< int > m_fixedDimsVect
dimensions that are fixed. Default is empty.
Definition: MultiBlockUtil.H:329
void getFixedOffLayout(BoxLayout &a_layoutFixedOff, const BoxLayout &a_layoutFull)
A not-necessarily-disjoint collective of boxes.
Definition: BoxLayout.H:145
Class to describe a multi-block interpolation stencil.
Definition: MBVectorStencil.H:21
Vector< Tuple< BlockBoundary, 2 *SpaceDim > > m_boundaries
all block boundaries; from m_coordSysPtr
Definition: MultiBlockUtil.H:312
void vertexStencilElementAliases(Vector< MBStencilElement > &a_aliases, const MBStencilElement &a_base) const
int m_nblocks
Number of mapping blocks.
Definition: MultiBlockUtil.H:309
MultiBlockCoordSys * m_coordSysPtr
contains coordinate system
Definition: MultiBlockUtil.H:303
bool validCellShift(IntVect &a_shiftedCell, int &a_shiftedBlock, const IntVect &a_origCell, int a_origBlock, int a_dir, int a_shift) const
return shifted cell
void validCellsFromVertices(Vector< IntVect > &a_cellIndices, Vector< int > &a_cellBlocks, const Vector< IntVect > &a_vertexIndices, const Vector< int > &a_vertexBlocks) const
return the set of all valid cells adjacent to a given set of vertices
void commonVertexCells(Vector< IntVect > &a_neighborCells, Vector< int > &a_neighborBlocks, const IntVect &a_baseCell, int a_baseBlock) const
return list of all cells that share a vertex with a given cell
void displacementPowers(Vector< Real > &a_powers, const IntVect &a_cell, const RealVect &a_commonMappedBasePoint, Real a_avgDistance, int a_thisBlockNum, int a_commonBlockNum, const Vector< IntVect > &a_exponents) const
return <((Xvec() - Xvec(a_commonMappedBasePoint))/a_avgDistance)^pvec>_(a_cell), for all pvec ...
Interval m_fixedDims
dimensions that are fixed. Default is empty.
Definition: MultiBlockUtil.H:326
int m_convSize
these are used in the the (2*SpaceDim+1)-point 4th-order convolution stencil
Definition: MultiBlockUtil.H:341
void getVectorWeights(IVSFAB< MBVectorStencil > &a_vectorstencilsFab, const Vector< BaseFab< VectorTransformation > * > &a_vectorStencilTransformations, const IndexType &a_type, const IntVectSet &a_ghostCellsIVS, const IVSFAB< IntVect > &a_validIndices, const IVSFAB< int > &a_validBlock, const IVSFAB< RealVect > &a_validMappedCenter, const Vector< IntVect > &a_exponents, int a_ghostBlockNum) const
void getVectorStencilCells(IVSFAB< MBVectorStencil > &a_vectorstencils, const IVSFAB< MBStencil > &a_stencils, const IntVectSet &a_ghostCellsIVS) const
bool m_isDefined
is defined?
Definition: MultiBlockUtil.H:300
void displacementPowersTransformed(Vector< Real > &a_powers, const BaseFab< VectorTransformation > &a_vectorStencilTransformations, const IntVect &a_cell, const RealVect &a_commonMappedBasePoint, Real a_avgDistance, int a_thisBlockNum, int a_commonBlockNum, int a_ghostBlockNum, const Vector< IntVect > &a_exponents) const
void vertexAliases(Vector< IntVect > &a_aliasVertices, Vector< int > &a_aliasBlocks, const IntVect &a_baseVertex, int a_baseBlock) const
return list of all aliases of a vertex
MultiBlockUtil()
default constructor
void getStencilCells(IVSFAB< MBStencil > &a_stencils, Vector< Box > &a_minBox, const IntVectSet &a_ghostCellsIVS, const IVSFAB< IntVect > &a_validIndices, const IVSFAB< int > &a_validBlock, const IVSFAB< RealVect > &a_validMappedCenter, int a_order, int a_radius) const
find the stencil cells and source blocks for all cells in a_ghostCellsIVS, and also the minimum Box c...
Structure for passing component ranges in code.
Definition: Interval.H:23
void getVectorTransformations(Vector< BaseFab< VectorTransformation > * > &a_vectorTransformations, const IVSFAB< MBVectorStencil > &a_vectorstencilsFab, const IndexType &a_type, const IntVectSet &a_ghostCellsIVS, int a_ghostBlockNum) const
double Real
Definition: REAL.H:33
bool allGridsHaveFixedPt(const BoxLayout &a_layout)
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
void getValid(IVSFAB< IntVect > &a_validIndices, IVSFAB< int > &a_validBlock, IVSFAB< RealVect > &a_validMappedCenter, const IntVectSet &a_ghostCellsIVS, int a_baseBlockNum) const
return index, block, and center in mapped coordinates of valid cell containing each ghost cell ...
virtual interface class encapsulating multi-block mapping API
Definition: MultiBlockCoordSys.H:34
virtual ~MultiBlockUtil()
destructor
Vector< Real > m_convWeight
Definition: MultiBlockUtil.H:343
virtual void define(const MultiBlockCoordSys *a_coordSysPtr, Interval a_fixedDims=Interval(), Vector< int > a_fixedPt=Vector< int >())
IntVect whichOffset(int a_block, const IntVect &a_cell) const
the offset in [-1:1]^D of cell a_cell from the box of block a_block.
The class MultiBlockUtil contains some functions used by MultiBlockLevelGeom, MultiBlockLevelExchange...
Definition: MultiBlockUtil.H:23
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
void validStencilElementsFromVertices(Vector< MBStencilElement > &a_stencilElements, const Vector< MBStencilElement > &a_vertices) const
Box m_offsetAllBox
Definition: MultiBlockUtil.H:314
void commonVertexStencilElements(Vector< MBStencilElement > &a_neighbors, const MBStencilElement &a_base) const
BaseFab< Vector< IndicesTransformation > *> m_transformsAll
transformations from destination blocks to source blocks. Has m_nblocks components and lives on m_off...
Definition: MultiBlockUtil.H:323
Box boxFixed(const Box &a_bx)
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Cell-Based or Node-Based Indices.
Definition: Box.H:45
void order2grad(LevelData< FArrayBox > &a_gradData, const LevelData< FArrayBox > &a_data)
returns a_gradData = gradient(a_data) on valid cells, taking 1-sided differences next to block bounda...
Vector< int > m_fixedPt
coordinates in dimensions of m_fixedDims. Default is empty.
Definition: MultiBlockUtil.H:332
Class to describe a multi-block interpolation stencil.
Definition: MBStencil.H:21
const Vector< IndicesTransformation > & transformsSrcOff(int a_srcBlock, const IntVect &a_offset) const
transformations to block a_srcBlock, taking offset a_offset from all destination blocks ...
void getWeights(IVSFAB< MBStencil > &a_stencilsFab, const IndexType &a_type, const IntVectSet &a_ghostCellsIVS, const IVSFAB< IntVect > &a_validIndices, const IVSFAB< int > &a_validBlock, const IVSFAB< RealVect > &a_validMappedCenter, const Vector< IntVect > &a_exponents, int a_ghostBlockNum) const
void copyVectorStencilsFromBlock(IVSFAB< MBVectorStencil > &a_vectorstencilsFab, const IntVectSet &a_ghostCellsIVS, const IVSFAB< MBVectorStencil > &a_blockVectorStencilsFab) const
Vector< Box > m_mappingBlocks
all mapping blocks, from m_coordSysPtr
Definition: MultiBlockUtil.H:306