13 #ifndef SFCSORTBENCH_BLOCK_H 14 #define SFCSORTBENCH_BLOCK_H 19 #include <treenode2vtk.h> 33 enum BlockType{UNSPECIFIED=0, INTRNL_INDEPENDENT, INTRNL_DEPENDENT, FULLY_INDEPENDENT, FULLY_DEPENDENT};
45 unsigned int m_uiRotID;
48 unsigned int m_uiRegGridLev;
51 DendroIntL m_uiLocalElementBegin;
54 DendroIntL m_uiLocalElementEnd;
57 DendroIntL m_uiOffset;
60 unsigned int m_uiSize1D;
63 unsigned int m_uiPaddingWidth;
66 unsigned int m_uiEleOrder;
78 std::vector<unsigned int> m_uiBLK2DIAG;
81 std::vector<unsigned int> m_uiBLKVERTX;
84 unsigned int m_uiBlkElem_1D;
106 Block(
ot::TreeNode pNode,
unsigned int rotID ,
unsigned int regLev,
unsigned int regEleBegin,
unsigned int regEleEnd,
unsigned int eleOrder);
144 inline void setBlk2DiagMap(
unsigned int owner,
unsigned int dir,
unsigned int id){m_uiBLK2DIAG[dir*(2*m_uiBlkElem_1D)+owner]=
id;}
146 inline void setBlk2VertexMap(
unsigned int dir,
unsigned int id){m_uiBLKVERTX[dir]=id;}
148 inline void setIsInternal(
bool isInternal){m_uiIsInternal=isInternal;}
150 inline void setBlkType(
BlockType btype) { m_uiBlkType = btype; }
152 inline BlockType getBlockType()
const {
return m_uiBlkType;}
154 inline bool isInternal(){
return m_uiIsInternal;}
163 inline DendroIntL
getOffset()
const {
return m_uiOffset;}
181 ((m_uiSzX & ((1u<<DENDRO_BLOCK_ALIGN_FACTOR_LOG)-1))==0)? tmp=m_uiSzX : tmp=((m_uiSzX/(1u<<DENDRO_BLOCK_ALIGN_FACTOR_LOG))+1)*(1u<<DENDRO_BLOCK_ALIGN_FACTOR_LOG);
182 return tmp*m_uiSzY*m_uiSzZ;
186 inline const unsigned int * getBlk2DiagMap()
const {
return &(*(m_uiBLK2DIAG.begin()));}
188 inline const unsigned int * getBlk2VertexMap()
const {
return &(*(m_uiBLKVERTX.begin()));}
190 inline void setAllocationSzX(
unsigned int sz) {m_uiSzX=sz;}
191 inline void setAllocationSzY(
unsigned int sz) {m_uiSzY=sz;}
192 inline void setAllocationSzZ(
unsigned int sz) {m_uiSzZ=sz;}
193 inline void setSiz1D(
unsigned int sz){m_uiSize1D=sz;}
195 inline unsigned int getElemSz1D()
const {
return m_uiBlkElem_1D;}
198 inline const std::vector<unsigned int >& getBlk2DiagMap_vec()
const {
return m_uiBLK2DIAG;}
199 inline const std::vector<unsigned int >& getBlk2VertexMap_vec()
const {
return m_uiBLKVERTX;}
218 void initializeBlkDiagMap(
const unsigned int value);
221 void initializeBlkVertexMap(
const unsigned int value);
234 #endif //SFCSORTBENCH_BLOCK_H unsigned int getRegularGridLev() const
returns the regular grid lev (m_uiRegGridLev) value. note: In octree2BlockDecomposition m_uiRegGridLe...
Definition: block.h:119
double computeDx(const Point &d_min, const Point &d_max) const
computes and returns the space discretization on x direction (problem domain)
Definition: block.cpp:85
double computeDz(const Point &d_min, const Point &d_max) const
computes and returns the space discretization on x direction (problem domain)
Definition: block.cpp:95
Simple class to manage async data transfer in the ODA class.
Definition: asyncExchangeContex.h:16
unsigned int getFlag() const
get the m_uiFlag value. Which is used to store the level and other aditional info.
Definition: TreeNode.h:402
unsigned int getBlkNodeFlag() const
set the blkFlag with the correct bdy
Definition: block.h:160
A class to manage octants.
Definition: TreeNode.h:35
ot::TreeNode getBlockNode() const
Return the block node.
Definition: block.h:113
void setOffset(DendroIntL offset)
set the block offset
Definition: block.cpp:101
A point class.
Definition: point.h:36
DendroIntL getLocalElementEnd() const
returns the local element end for the block.
Definition: block.h:133
unsigned int getAlignedBlockSz() const
align the total block size
Definition: block.h:178
unsigned int getAllocationSzZ() const
allocation length on Z direction
Definition: block.h:175
unsigned int getAllocationSzX() const
allocation length on X direction
Definition: block.h:169
void setBlkNodeFlag(unsigned int flag)
set the blkFlag with the correct bdy
Definition: block.h:157
Block()
Default constructor.
Definition: block.cpp:13
BlockType
Block type UNSPECIFIED : block flag type is not set INTRNL_INDEPENDENT: Block internal is independent...
Definition: block.h:33
unsigned int getAllocationSzY() const
allocation length on Y direction
Definition: block.h:172
unsigned int getElementOrder() const
returns the element order
Definition: block.h:139
double computeDy(const Point &d_min, const Point &d_max) const
computes and returns the space discretization on x direction (problem domain)
Definition: block.cpp:90
double computeGridDx() const
computes and returns the space discretization (grid domain)
Definition: block.cpp:70
unsigned int getRotationID() const
returns the rotation id of the block
Definition: block.h:122
unsigned int get1DPadWidth() const
returns 1D padding width
Definition: block.h:136
unsigned int get1DArraySize() const
returns the 1D array size
Definition: block.h:166
DendroIntL getOffset() const
get offset
Definition: block.h:163
void setFlag(unsigned int flag)
set the m_uiFlag value. Which is used to store the level and other aditional info.
Definition: TreeNode.h:401
double computeGridDz() const
computes and returns the space discretization (grid domain)
Definition: block.cpp:80
double computeGridDy() const
computes and returns the space discretization (grid domain)
Definition: block.cpp:75
DendroIntL getLocalElementBegin() const
returns the local element begin for the block.
Definition: block.h:127