11 #ifndef _MULTIBLOCKCOORDSYS_H_ 12 #define _MULTIBLOCKCOORDSYS_H_ 23 #include "NamespaceHeader.H" 69 int a_bufferSize)
const;
79 int a_nSrc)
const = 0;
116 int a_blockNum)
const;
130 int a_numGhost)
const;
241 int a_srcBlock)
const;
247 int a_dstBlock)
const;
288 int a_blockDst)
const 426 #include "NamespaceFooter.H" virtual int whichBlock(const Box &a_box) const
returns block number in which a_box is contained in the global index space
virtual Tuple< VectorTransformation, SpaceDim > vectorBlockTransformationGrad(int a_nDst, const IntVect &a_ivSrc, int a_nSrc) const
return gradient of vector transformation from one block to another at a cell
virtual void blockRemapping(RealVect &a_xi_valid, int &a_n_valid, const RealVect &a_xiSrc, int a_nSrc) const =0
block mapping conversion function
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
bool m_useScriptN
Whether scriptN is used in calculating N.
Definition: MultiBlockCoordSys.H:404
virtual ProblemDomain blockDomainOfBox(const Box &a_baseBox) const
return ProblemDomain of block containing a box
Vector< BaseFab< int > *> m_validNum
Definition: MultiBlockCoordSys.H:391
virtual ~MultiBlockCoordSysFactory()
Definition: MultiBlockCoordSys.H:418
virtual VectorTransformation vectorBlockTransformationCenter(int a_nDst, const IntVect &a_ivSrc, int a_nSrc) const
return vector transformation from one block to another at center of a cell.
bool m_gotCoordSysVect
Do we have m_coordSysVect?
Definition: MultiBlockCoordSys.H:357
bool gotCoordSysVect() const
Definition: MultiBlockCoordSys.H:328
MultiBlockCoordSysFactory()
Definition: MultiBlockCoordSys.H:414
Vector< BaseFab< IndicesTransformation > *> m_validTransformations
Definition: MultiBlockCoordSys.H:399
void setAllBoundaries(BlockBoundary::btype a_btype)
bool gotMappingBlocks() const
Definition: MultiBlockCoordSys.H:323
virtual void keepInDomain(Box &a_bx, int a_blockNum) const
modify a_bx so that it lies entirely within the physical domain
const Vector< Box > & mappingBlocks() const
const access to the mapping blocks
Definition: MultiBlockCoordSys.H:263
void validBlocksCells(Vector< int > &a_validBlocks, Vector< IntVect > &a_validCells, int a_origBlock, const IntVect &a_origCell)
Return list of valid blocks and cells corresponding to a_cell in a_block.
virtual Vector< RealVect > displacements(const Vector< RealVect > &a_dstCoords, const Vector< int > &a_dstBlocks, const RealVect &a_srcCoords, int a_srcBlock) const
return displacements
void setBoundaryFromFaces(int a_srcBlock, int a_srcFaceID, int a_dstBlock, int a_dstFaceID, IntVect a_sign=IntVect::Unit)
const BaseFab< IndicesTransformation > & validTransformations(int a_block) const
const access to m_validTransformations[a_block]
Definition: MultiBlockCoordSys.H:283
btype
Definition: BlockBoundary.H:136
bool gotBoundaries() const
Definition: MultiBlockCoordSys.H:313
void initializeBlockTransformations()
Need to have m_boundaries for this.
int realDim() const
Definition: MultiBlockCoordSys.H:303
virtual const NewCoordSys * getCoordSys(const Box &a_box) const
Definition: MultiBlockCoordSys.H:259
const BaseFab< int > & validNum(int a_block) const
const access to m_validNum[a_block]
Definition: MultiBlockCoordSys.H:275
Structure for passing component ranges in code.
Definition: Interval.H:23
static const IntVect Unit
Definition: IntVect.H:663
bool m_gotMappingBlocks
Do we have m_mappingBlocks?
Definition: MultiBlockCoordSys.H:363
double Real
Definition: REAL.H:33
RealVect dxVect() const
Definition: MultiBlockCoordSys.H:308
Vector< NewCoordSys * > m_coordSysVect
Vector of NewCoordSys – one for each mapping block.
Definition: MultiBlockCoordSys.H:360
Ordered Tuples for Types T.
Definition: Tuple.H:30
bool gotBlockTransformations() const
Definition: MultiBlockCoordSys.H:318
Vector< Vector< IndicesTransformation > > m_allBlockTransformations
[blockSrc][blockDst] gives transformation from blockSrc to blockDst
Definition: MultiBlockCoordSys.H:386
const BaseFab< int > & validBlocks(int a_block) const
const access to m_validBlocks[a_block]
Definition: MultiBlockCoordSys.H:279
int numBlocks() const
number of blocks
Definition: MultiBlockCoordSys.H:267
size_t size() const
Definition: Vector.H:192
virtual RealVect blockRemappingGeneral(int a_nDst, const RealVect &a_xiSrc, int a_nSrc) const
general block mapping conversion function
Vector< Box > m_mappingBlocks
Associated regions in index space over which each mapping is valid.
Definition: MultiBlockCoordSys.H:366
const Vector< Tuple< BlockBoundary, 2 *SpaceDim > > & boundaries() const
const access to the block boundaries
Definition: MultiBlockCoordSys.H:271
virtual const NewCoordSys * getCoordSys(int a_n) const
Return the mapping which corresponds to the block with the given index.
Definition: MultiBlockCoordSys.H:250
virtual interface class encapsulating multi-block mapping API
Definition: MultiBlockCoordSys.H:34
virtual VectorTransformation vectorBlockTransformation(int a_nDst, const RealVect &a_xiSrc, int a_nSrc) const
return vector transformation from one block to another at a point.
virtual ~MultiBlockCoordSys()
destructor (should this delete the members of coordSysVect?
void permute(Vector< int > &a_vec, int a_start, int a_length, Vector< Vector< int > > &a_allPathsDir, const Vector< int > &a_changedDirs)
virtual void separateVolFlux(LevelData< FluxBox > &a_flux) const
Have separate volume flux on each block. Normally does nothing, but cubed-sphere coordinate system ne...
RealVect m_dxVect
The grid spacing, must be the same across all mapping blocks.
Definition: MultiBlockCoordSys.H:373
virtual void vectorBlockAvgTransformation(BaseFab< VectorAvgTransformation > &a_vtAvgFab, int a_nDst, const Box &a_srcBox, int a_nSrc, Interval a_fixedDims=Interval()) const
virtual int whichBlockOverlap(const Box &a_box) const
returns block number that overlaps a_box in the global index space
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
virtual ProblemDomain problemDomain(const Box &a_baseBox, int a_numGhost) const
return ProblemDomain within block, with box and ghost cells
virtual VectorTransformation vectorBlockTransformationAvg(int a_nDst, const IntVect &a_ivSrc, int a_nSrc) const
return average vector transformation from one block to another at a cell
virtual Real distance(const RealVect &a_srcCoords, int a_srcBlock, const RealVect &a_dstCoords, int a_dstBlock) const
return distance between two points
virtual int whichBlockBuffered(const IntVect &a_iv, int a_bufferSize) const
returns block number in which a_iv is contained within buffer of a_bufferSize
int m_realDim
Number of dimensions in real space; default SpaceDim.
Definition: MultiBlockCoordSys.H:376
const IndicesTransformation & blockTransformation(int a_blockSrc, int a_blockDst) const
const access to m_allBlockTransformations[blockSrc][blockDst]
Definition: MultiBlockCoordSys.H:287
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
pure-virtual base class defining factory interface for MultiBlockCoordSys
Definition: MultiBlockCoordSys.H:409
bool useScriptN() const
Definition: MultiBlockCoordSys.H:333
Vector< BaseFab< int > *> m_validBlocks
Definition: MultiBlockCoordSys.H:395
Vector< Tuple< BlockBoundary, 2 *SpaceDim > > m_boundaries
Description of each boundary face of each block; set these in derived class and then set m_gotBoundar...
Definition: MultiBlockCoordSys.H:379
MultiBlockCoordSys()
default constructor
virtual IntVect cellAvoidingBoundaries(const IntVect &a_cell, int a_blockNum, int a_radius) const
return a cell that is far enough away from external boundaries
bool m_gotBlockTransformations
Definition: MultiBlockCoordSys.H:383
Virtual base class encapsulating mapped-grid coordinate systems.
Definition: NewCoordSys.H:30
bool m_gotBoundaries
Definition: MultiBlockCoordSys.H:370