24#ifndef __SMESH_RegularGrid_HXX__
25#define __SMESH_RegularGrid_HXX__
28#include <Precision.hxx>
29#include <NCollection_Array1.hxx>
32#include <TopExp_Explorer.hxx>
33#include <TopTools_DataMapOfShapeReal.hxx>
34#include <TopTools_ListIteratorOfListOfShape.hxx>
35#include <TopTools_MapOfShape.hxx>
54std::vector<T>
operator+(std::vector<T>
const &x, std::vector<T>
const &y)
57 vec.reserve(x.size() + y.size());
58 vec.insert(vec.end(), x.begin(), x.end());
59 vec.insert(vec.end(), y.begin(), y.end());
77 void SetNode(
const std::shared_ptr<gp_Pnt>& point,
const int iIndex,
const int jIndex,
const int zIndex = 0 );
78 void SetNode(
const SMDS_MeshNode* point,
const int iIndex,
const int jIndex,
const int zIndex = 0 );
80 const std::shared_ptr<gp_Pnt>
GetNode(
const int index )
const {
return myCoordinates[index]; };
81 const std::shared_ptr<gp_Pnt> GetNode(
const int iIndex,
const int jIndex,
const int zIndex );
82 int nx()
const {
return mnx; };
83 int ny()
const {
return mny; };
84 int nz()
const {
return mnz; };
86 NCollection_Array1<std::shared_ptr<gp_Pnt>>::Iterator
CoordinateBegin() {
return NCollection_Array1<std::shared_ptr<gp_Pnt>>::Iterator( myCoordinates ); };
87 int id()
const {
return myId; };
222 void getAllEdgeIndexLimits( std::vector<std::vector<T>>& allRanges );
226 void getAllFaceIndexLimits( std::vector<std::vector<T>>& allRanges );
230 std::vector<T> getEdgeIndexLimits(
const EdgeType edge )
const;
233 std::vector<int> getEdgeIndexLimitsInverted(
const EdgeType edge )
const;
259 void GetCommontInterface( EdgeType edge,
SMESH_RegularGrid * grid, std::vector<int>& interface );
260 void GetCommontInterface( FaceType face,
SMESH_RegularGrid * grid, std::vector<int>& interface );
266 bool GetPrecomputedInterface( EdgeType edge,
const SMESH_RegularGrid * grid, std::vector<int>& interface );
272 bool GetPrecomputedInterface( FaceType face,
const SMESH_RegularGrid * grid, std::vector<int>& interface );
289 std::vector<int> getEdgeIndexLimits(
const int start,
const int end )
const;
290 std::vector<int> getFaceIndexLimits(
const int start,
const int end )
const;
299 int getEdgeSize(
const EdgeType edge )
const;
302 int getFaceSize(
const FaceType face )
const;
305 int getFaceCoordinateIndex(
const VertexType v )
const;
310 std::tuple<int,int,int> GetIJK(
const int index )
const;
318 template<
typename FUNCTION>
319 void foreachGridSide(
const FUNCTION& fSide )
const;
327 template<
typename FUNCTION>
328 void foreachGridFace(
const FUNCTION& fSide )
const;
336 void foreachNodeOnSide(
SMESH_RegularGrid::EdgeType edge,
const std::function<
void(
const std::shared_ptr<gp_Pnt> point,
const int index )>& function )
const;
344 void foreachNodeOnFace(
SMESH_RegularGrid::FaceType face,
const std::function<
void(
const std::shared_ptr<gp_Pnt> point,
const int index )>& function )
const;
359 void transformIndexLimits(FaceType face,
360 std::vector<int>& faceLimits,
361 const std::shared_ptr<gp_Pnt>& V0,
362 const std::shared_ptr<gp_Pnt>& V1,
363 const std::shared_ptr<gp_Pnt>& V2,
364 const std::shared_ptr<gp_Pnt>& V3);
371 std::map<SMESH_RegularGrid::EdgeType,std::map<int,std::vector<int>>>
myInterfaceMap;
std::vector< T > operator+(std::vector< T > const &x, std::vector< T > const &y)
Definition: SMESH_RegularGrid.hxx:54
#define SMESHUtils_EXPORT
Definition: SMESH_Utils.hxx:37
IMAP::const_iterator end(const IMAP &m)
Definition: StdMeshers_Projection_2D.cxx:106
Definition: SMDS_MeshNode.hxx:36
Define a regular grid of nx,ny,nz dimension.
Definition: SMESH_RegularGrid.hxx:73
EdgeType
Definition: SMESH_RegularGrid.hxx:102
@ RIGHT
Definition: SMESH_RegularGrid.hxx:104
@ TOP
Definition: SMESH_RegularGrid.hxx:105
@ BOTTOM
Definition: SMESH_RegularGrid.hxx:103
@ LEFT
Definition: SMESH_RegularGrid.hxx:106
VertexType
Definition: SMESH_RegularGrid.hxx:111
@ V3
Definition: SMESH_RegularGrid.hxx:115
@ V1
Definition: SMESH_RegularGrid.hxx:113
@ V5
Definition: SMESH_RegularGrid.hxx:117
@ V4
Definition: SMESH_RegularGrid.hxx:116
@ V0
Definition: SMESH_RegularGrid.hxx:112
@ V2
Definition: SMESH_RegularGrid.hxx:114
@ V6
Definition: SMESH_RegularGrid.hxx:118
NCollection_Array1< std::shared_ptr< gp_Pnt > >::Iterator CoordinateBegin()
Definition: SMESH_RegularGrid.hxx:86
int myId
Definition: SMESH_RegularGrid.hxx:367
int ny() const
Definition: SMESH_RegularGrid.hxx:83
int nz() const
Definition: SMESH_RegularGrid.hxx:84
std::map< SMESH_RegularGrid::EdgeType, std::map< int, std::vector< int > > > myInterfaceMap
Definition: SMESH_RegularGrid.hxx:371
int nx() const
Definition: SMESH_RegularGrid.hxx:82
int mns
Definition: SMESH_RegularGrid.hxx:368
int id() const
Definition: SMESH_RegularGrid.hxx:87
int Size()
Definition: SMESH_RegularGrid.hxx:85
std::map< SMESH_RegularGrid::FaceType, std::map< int, std::vector< int > > > myFaceInterafaceMap
Definition: SMESH_RegularGrid.hxx:372
FaceType
Definition: SMESH_RegularGrid.hxx:157
@ B_BACK
Definition: SMESH_RegularGrid.hxx:160
@ B_LEFT
Definition: SMESH_RegularGrid.hxx:161
@ B_BOTTOM
Definition: SMESH_RegularGrid.hxx:158
@ B_RIGHT
Definition: SMESH_RegularGrid.hxx:159
@ B_TOP
Definition: SMESH_RegularGrid.hxx:163
@ B_FRONT
Definition: SMESH_RegularGrid.hxx:162
NCollection_Array1< std::shared_ptr< gp_Pnt > > myCoordinates
Definition: SMESH_RegularGrid.hxx:369
const std::shared_ptr< gp_Pnt > GetNode(const int index) const
Definition: SMESH_RegularGrid.hxx:80
Definition: SMESH_BoostTxtArchive.hxx:35