Define a regular grid of nx,ny,nz dimension. More...
#include <SMESH_RegularGrid.hxx>
Public Types | |
| enum | EdgeType { BOTTOM , RIGHT , TOP , LEFT , NONE } |
| enum | VertexType { V0 , V1 , V2 , V3 , V4 , V5 , V6 , V7 } |
| enum | FaceType { B_BOTTOM , B_RIGHT , B_BACK , B_LEFT , B_FRONT , B_TOP , B_NONE } |
Public Member Functions | |
| SMESH_RegularGrid (const int id, const int nx, const int ny, const int nz=1) | |
| void | SetNode (const std::shared_ptr< gp_Pnt > &point, const int iIndex, const int jIndex, const int zIndex=0) |
| void | SetNode (const SMDS_MeshNode *point, const int iIndex, const int jIndex, const int zIndex=0) |
| void | SetNode (const SMDS_MeshNode *point, const int index) |
| const std::shared_ptr< gp_Pnt > | GetNode (const int index) const |
| const std::shared_ptr< gp_Pnt > | GetNode (const int iIndex, const int jIndex, const int zIndex) |
| int | nx () const |
| int | ny () const |
| int | nz () const |
| int | Size () |
| NCollection_Array1< std::shared_ptr< gp_Pnt > >::Iterator | CoordinateBegin () |
| int | id () const |
| void | GetEdgeInterfaces (SMESH_RegularGrid *grid, std::vector< int > &interface) |
| void | GetFaceInterfaces (SMESH_RegularGrid *grid, std::vector< int > &interface) |
| template<typename T > | |
| void | getAllEdgeIndexLimits (std::vector< std::vector< T > > &allRanges) |
| template<typename T > | |
| void | getAllFaceIndexLimits (std::vector< std::vector< T > > &allRanges) |
| template<typename T > | |
| std::vector< T > | getEdgeIndexLimits (const EdgeType edge) const |
| std::vector< int > | getEdgeIndexLimitsInverted (const EdgeType edge) const |
| template<typename T > | |
| std::vector< T > | getFaceIndexLimits (SMESH_RegularGrid::FaceType face) const |
| SMESH_RegularGrid::FaceType | getFaceTypeByGeomFace (TopoDS_Shape shapeFace) const |
| SMESH_RegularGrid::EdgeType | getEdgeTypeByGeomEdge (TopoDS_Shape shapeEdge) const |
| ~SMESH_RegularGrid () | |
Protected Member Functions | |
| void | GetCommontInterface (EdgeType edge, SMESH_RegularGrid *grid, std::vector< int > &interface) |
| void | GetCommontInterface (FaceType face, SMESH_RegularGrid *grid, std::vector< int > &interface) |
| bool | GetPrecomputedInterface (EdgeType edge, const SMESH_RegularGrid *grid, std::vector< int > &interface) |
| bool | GetPrecomputedInterface (FaceType face, const SMESH_RegularGrid *grid, std::vector< int > &interface) |
| void | setInterface (SMESH_RegularGrid::EdgeType edge, const int gridId, std::vector< int > &interface) |
| void | setInterface (SMESH_RegularGrid::FaceType face, const int gridId, std::vector< int > &interface) |
| std::pair< int, int > | getEdgeLimits (const SMESH_RegularGrid::EdgeType edge) const |
| std::tuple< int, int, int, int > | getFaceLimits (const SMESH_RegularGrid::FaceType face) const |
| std::vector< int > | getEdgeIndexLimits (const int start, const int end) const |
| std::vector< int > | getFaceIndexLimits (const int start, const int end) const |
| std::vector< int > | computeTransformation (const SMESH_RegularGrid::EdgeType edge, SMESH_RegularGrid::EdgeType gridDonorEdge, std::vector< int > &interfaceRange, std::vector< int > &interfaceDonor) const |
| std::vector< int > | computeTransformation (const SMESH_RegularGrid::FaceType face, SMESH_RegularGrid::FaceType gridDonorFace, std::vector< int > &interfaceRange, std::vector< int > &interfaceDonor) const |
| int | getEdgeSize (const EdgeType edge) const |
| int | getFaceSize (const FaceType face) const |
| int | getFaceCoordinateIndex (const VertexType v) const |
| std::tuple< int, int, int > | GetIJK (const int index) const |
| template<typename FUNCTION > | |
| void | foreachGridSide (const FUNCTION &fSide) const |
| template<typename FUNCTION > | |
| void | foreachGridFace (const FUNCTION &fSide) const |
| void | foreachNodeOnSide (SMESH_RegularGrid::EdgeType edge, const std::function< void(const std::shared_ptr< gp_Pnt > point, const int index)> &function) const |
| void | foreachNodeOnFace (SMESH_RegularGrid::FaceType face, const std::function< void(const std::shared_ptr< gp_Pnt > point, const int index)> &function) const |
| std::vector< int > | nodesOfSide (SMESH_RegularGrid::EdgeType edge) const |
| std::vector< int > | nodesOfFace (SMESH_RegularGrid::FaceType face) const |
| void | transformIndexLimits (FaceType face, std::vector< int > &faceLimits, const std::shared_ptr< gp_Pnt > &V0, const std::shared_ptr< gp_Pnt > &V1, const std::shared_ptr< gp_Pnt > &V2, const std::shared_ptr< gp_Pnt > &V3) |
Private Attributes | |
| int | myId |
| int | mnx |
| int | mny |
| int | mnz |
| int | mns |
| NCollection_Array1< std::shared_ptr< gp_Pnt > > | myCoordinates |
| std::map< SMESH_RegularGrid::EdgeType, std::map< int, std::vector< int > > > | myInterfaceMap |
| std::map< SMESH_RegularGrid::FaceType, std::map< int, std::vector< int > > > | myFaceInterafaceMap |
Define a regular grid of nx,ny,nz dimension.
A vector with gp_Pnt is defined by default by a canonical order, the canonical order is: i-index goes faster, then j-index and finally z-index. This data structure was created to index mesh nodes created by Quadrangle_2D and Prism_3D meshers. The StructuredCGNS export driver uses this data structure to define zones, grid coordinate points and interfaces.
| SMESH_RegularGrid::SMESH_RegularGrid | ( | const int | id, |
| const int | nx, | ||
| const int | ny, | ||
| const int | nz = 1 |
||
| ) |
References mnx, mny, mnz, and myCoordinates.
| SMESH_RegularGrid::~SMESH_RegularGrid | ( | ) |
References myFaceInterafaceMap, and myInterfaceMap.
|
protected |
References BOTTOM, MESHCUT::d, LEFT, RIGHT, and TOP.
Referenced by GetCommontInterface().
|
protected |
| NCollection_Array1< std::shared_ptr< gp_Pnt > >::Iterator SMESHUtils::SMESH_RegularGrid::CoordinateBegin | ( | ) |
|
protected |
References B_BOTTOM, and B_TOP.
Referenced by getAllFaceIndexLimits(), GetCommontInterface(), GetFaceInterfaces(), and getFaceTypeByGeomFace().
|
protected |
Referenced by getAllEdgeIndexLimits(), GetCommontInterface(), GetEdgeInterfaces(), and getEdgeTypeByGeomEdge().
|
protected |
References myCoordinates, and nodesOfFace().
Referenced by GetCommontInterface().
|
protected |
References myCoordinates, and nodesOfSide().
Referenced by GetCommontInterface().
| void SMESHUtils::SMESH_RegularGrid::getAllEdgeIndexLimits | ( | std::vector< std::vector< T > > & | allRanges | ) |
References foreachGridSide().
| void SMESHUtils::SMESH_RegularGrid::getAllFaceIndexLimits | ( | std::vector< std::vector< T > > & | allRanges | ) |
References foreachGridFace().
|
protected |
References foreachGridSide(), foreachNodeOnSide(), getEdgeIndexLimits(), getEdgeIndexLimitsInverted(), getEdgeLimits(), getEdgeSize(), GetNode(), and myCoordinates.
Referenced by GetEdgeInterfaces(), and GetFaceInterfaces().
|
protected |
| std::vector< T > SMESHUtils::SMESH_RegularGrid::getEdgeIndexLimits | ( | const EdgeType | edge | ) | const |
Referenced by GetCommontInterface().
|
protected |
| std::vector< int > SMESH_RegularGrid::getEdgeIndexLimitsInverted | ( | const EdgeType | edge | ) | const |
Referenced by GetCommontInterface().
| void SMESH_RegularGrid::GetEdgeInterfaces | ( | SMESH_RegularGrid * | grid, |
| std::vector< int > & | interface | ||
| ) |
References foreachGridSide(), GetCommontInterface(), and GetPrecomputedInterface().
|
protected |
Referenced by GetCommontInterface(), and getEdgeTypeByGeomEdge().
|
protected |
Referenced by GetCommontInterface().
| SMESH_RegularGrid::EdgeType SMESH_RegularGrid::getEdgeTypeByGeomEdge | ( | TopoDS_Shape | shapeEdge | ) | const |
References foreachGridSide(), getEdgeLimits(), myCoordinates, and NONE.
Referenced by DriverStructuredCGNS_Write::CheckForGroupNameOnEdgeInterfaces().
|
protected |
Referenced by getFaceLimits().
|
protected |
| std::vector< T > SMESHUtils::SMESH_RegularGrid::getFaceIndexLimits | ( | SMESH_RegularGrid::FaceType | face | ) | const |
| void SMESH_RegularGrid::GetFaceInterfaces | ( | SMESH_RegularGrid * | grid, |
| std::vector< int > & | interface | ||
| ) |
References foreachGridFace(), GetCommontInterface(), and GetPrecomputedInterface().
|
protected |
References B_BACK, B_BOTTOM, B_FRONT, B_LEFT, B_RIGHT, B_TOP, and getFaceCoordinateIndex().
Referenced by GetCommontInterface(), and getFaceTypeByGeomFace().
|
protected |
| SMESH_RegularGrid::FaceType SMESH_RegularGrid::getFaceTypeByGeomFace | ( | TopoDS_Shape | shapeFace | ) | const |
References B_NONE, foreachGridFace(), getFaceLimits(), and myCoordinates.
Referenced by DriverStructuredCGNS_Write::CheckForGroupNameOnFaceInterfaces().
|
protected |
Referenced by getEdgeIndexLimits(), and getFaceIndexLimits().
| const std::shared_ptr< gp_Pnt > SMESH_RegularGrid::GetNode | ( | const int | iIndex, |
| const int | jIndex, | ||
| const int | zIndex | ||
| ) |
References mns, mnx, mny, and myCoordinates.
| const std::shared_ptr< gp_Pnt > SMESHUtils::SMESH_RegularGrid::GetNode | ( | const int | index | ) | const |
Referenced by GetCommontInterface().
|
protected |
References id(), and myInterfaceMap.
Referenced by GetEdgeInterfaces(), and GetFaceInterfaces().
|
protected |
References id(), and myFaceInterafaceMap.
| int SMESHUtils::SMESH_RegularGrid::id | ( | ) | const |
Referenced by GetCommontInterface(), and GetPrecomputedInterface().
|
protected |
|
protected |
References BOTTOM, mnx, mny, and TOP.
Referenced by foreachNodeOnSide().
| int SMESHUtils::SMESH_RegularGrid::nx | ( | ) | const |
| int SMESHUtils::SMESH_RegularGrid::ny | ( | ) | const |
| int SMESHUtils::SMESH_RegularGrid::nz | ( | ) | const |
|
protected |
References myInterfaceMap.
Referenced by GetCommontInterface().
|
protected |
References myFaceInterafaceMap.
| void SMESH_RegularGrid::SetNode | ( | const SMDS_MeshNode * | point, |
| const int | iIndex, | ||
| const int | jIndex, | ||
| const int | zIndex = 0 |
||
| ) |
References mns, mnx, mny, myCoordinates, SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
| void SMESH_RegularGrid::SetNode | ( | const SMDS_MeshNode * | point, |
| const int | index | ||
| ) |
References mns, myCoordinates, SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
| void SMESH_RegularGrid::SetNode | ( | const std::shared_ptr< gp_Pnt > & | point, |
| const int | iIndex, | ||
| const int | jIndex, | ||
| const int | zIndex = 0 |
||
| ) |
References mns, mnx, mny, and myCoordinates.
| int SMESHUtils::SMESH_RegularGrid::Size | ( | ) |
|
protected |
|
private |
|
private |
|
private |
Referenced by getFaceCoordinateIndex(), getFaceIndexLimits(), getFaceSize(), nodesOfFace(), and SMESH_RegularGrid().
|
private |
|
private |
Referenced by GetPrecomputedInterface(), setInterface(), and ~SMESH_RegularGrid().
|
private |
|
private |
Referenced by GetPrecomputedInterface(), setInterface(), and ~SMESH_RegularGrid().