2 #ifndef _PROTO_MB_LEVEL_MAP_ 3 #define _PROTO_MB_LEVEL_MAP_ 35 template<
typename MAP, MemType MEM = MEMTYPE_DEFAULT>
47 unsigned int a_focalBlock = 0);
53 unsigned int a_focalBlock = 0);
67 unsigned int a_focalBlock = 0);
72 unsigned int a_focalBlock = 0);
82 inline std::shared_ptr<MBLevelBoxData<double, DIM, MEM, PR_NODE>>
mapData() {
return m_X; }
93 inline std::shared_ptr<MBLevelBoxData<double, 1, MEM, PR_CELL>>
jacobianData() {
return m_J; }
112 unsigned int a_block)
const;
131 unsigned int a_block)
const;
145 unsigned int a_computeBlock,
146 unsigned int a_outBlock)
const;
157 unsigned int a_computeBlock,
158 unsigned int a_outBlock)
const;
170 unsigned int a_computeBlock,
171 unsigned int a_outBlock)
const;
244 inline std::optional<std::pair<MBIndex, Point>>
whichNeighborContains(
const MBIndex& localIndex,
const Point& localPoint,
bool checkLocalInteriorGhostCells =
true)
const;
250 mutable std::vector<std::shared_ptr<MAP>>
m_ops;
251 std::vector<Array<double, DIM>>
m_dx;
254 mutable std::shared_ptr<MBLevelBoxData<double, DIM, MEM, PR_NODE>>
m_X;
255 mutable std::shared_ptr<MBLevelBoxData<double, 1, MEM, PR_CELL>>
m_J;
259 #include "implem/Proto_MBLevelMapImplem.H" 261 #endif // end include guard const MBDisjointBoxLayout & layout() const
Get Layout.
Definition: Proto_MBLevelMap.H:262
Array< double, DIM > analyticCellCentered(const MBDataPoint &a_point) const
Compute Cell Centered Coordinates, analytic case.
Definition: Proto_MBLevelMap.H:243
Point convertPoint(Point srcPoint, BlockIndex srcBlock, BlockIndex dstBlock) const
Convert a Point from one block's index space to another by using forward / inverse mapping...
Definition: Proto_MBLevelMap.H:325
Multidimensional Rectangular Array.
Definition: Proto_BoxData.H:314
int BlockIndex
Defines what type is used for indexing block entities.
Definition: Proto_MBGraph.H:9
std::optional< std::pair< MBIndex, Point > > whichNeighborContains(const MBIndex &localIndex, const Point &localPoint, bool checkLocalInteriorGhostCells=true) const
Definition: Proto_MBLevelMap.H:338
Single Level Mapped Multiblock Map.
Definition: Proto_MBLevelBoxData.H:19
bool m_initialized
Definition: Proto_MBLevelMap.H:253
std::vector< Array< double, DIM > > m_dx
Mapped space grid spacing.
Definition: Proto_MBLevelMap.H:251
MBLevelBoxData< double, 1, MEM, PR_CELL > & jacobian()
Jacobian Access.
Definition: Proto_MBLevelMap.H:310
void apply(BoxData< double, DIM, MEM > &a_X, BoxData< double, 1, MEM > &a_J, unsigned int a_block) const
Compute Map.
Definition: Proto_MBLevelMap.H:91
std::shared_ptr< MBLevelBoxData< double, 1, MEM, PR_CELL > > m_J
Cached Jacobian values.
Definition: Proto_MBLevelMap.H:255
Multiblock Level Box Data.
Definition: Proto_MBLevelBoxData.H:17
void doApply(BoxData< double, DIM, MEM > &a_X, BoxData< double, 1, MEM > &a_J, unsigned int a_computeBlock, unsigned int a_outBlock) const
Compute Map With Rotation.
Definition: Proto_MBLevelMap.H:112
BoxData< double, DIM, MEM > cellCentered(const Box &a_box, unsigned int a_computeBlock, unsigned int a_outBlock) const
Compute Cell Centered Coordinates.
Definition: Proto_MBLevelMap.H:149
std::shared_ptr< MBLevelBoxData< double, DIM, MEM, PR_NODE > > m_X
Cached coodinate values.
Definition: Proto_MBLevelMap.H:254
An interval in DIM dimensional space.
Definition: Proto_Box.H:29
Array< double, DIM > mappedCoords(const Point &point, const BlockIndex &block) const
Definition: Proto_MBLevelMap.H:182
MBDisjointBoxLayout m_layout
Definition: Proto_MBLevelMap.H:252
const Array< double, DIM > dx(BlockIndex a_block) const
Get Mapped Grid Spacing.
Definition: Proto_MBLevelMap.H:265
MAP & op(BlockIndex a_block) const
Get Operator.
Definition: Proto_MBLevelMap.H:272
std::shared_ptr< MBLevelBoxData< double, DIM, MEM, PR_NODE > > mapData()
Definition: Proto_MBLevelMap.H:82
MBLevelMap()
Trivial Constructor.
Definition: Proto_MBLevelMap.H:41
unsigned int m_focalBlock
Definition: Proto_MBLevelMap.H:248
Definition: Proto_Array.H:17
Stencil< double > m_c2c
Definition: Proto_MBLevelMap.H:249
std::vector< std::shared_ptr< MAP > > m_ops
Map operators.
Definition: Proto_MBLevelMap.H:250
std::shared_ptr< MBLevelBoxData< double, 1, MEM, PR_CELL > > jacobianData()
Definition: Proto_MBLevelMap.H:93
A templated constant size array object similar to std::array, but with the ability to be used inside ...
Definition: Proto_Array.H:28
BoxData< double, DIM, MEM > X(const Box &a_box, const Array< double, DIM > &a_dx) const
Get Mapped Coordinate Values.
Definition: Proto_MBLevelMap.H:278
void initialize() const
Definition: Proto_MBLevelMap.H:64
Integer Valued Vector.
Definition: Proto_Point.H:24
Definition: Proto_MBDisjointBoxLayout.H:14
Array< Point, DIM+1 > m_ghost
Definition: Proto_MBLevelMap.H:247
MAP & operator[](BlockIndex block)
Definition: Proto_MBLevelMap.H:85
BoxData< double, DIM, MEM > cellAveraged(const Box &a_box, unsigned int a_computeBlock, unsigned int a_outBlock) const
Compute Cell Centered Coordinates.
Definition: Proto_MBLevelMap.H:135
MBLevelBoxData< double, DIM, MEM, PR_NODE > & map()
Access Cached Coordinate Values.
Definition: Proto_MBLevelMap.H:296
Definition: Proto_MBDataPoint.H:10
Array< Point, DIM+1 > ghost() const
Get Ghost Sizes.
Definition: Proto_MBLevelMap.H:222
void define(const MBDisjointBoxLayout &a_layout, const Array< Point, DIM+1 > &a_ghost, unsigned int a_focalBlock=0)
Define.
Definition: Proto_MBLevelMap.H:42
Definition: Proto_BoxData.H:1436