Version: 9.16.0
StdMeshers_Cartesian_3D_Grid.hxx
Go to the documentation of this file.
1// Copyright (C) 2016-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19// File : StdMeshers_Cartesian_3D_Grid.hxx
20// Module : SMESH
21// Purpose: Make BodyFitting mesh algorithm more modular and testable
22//
23
24#ifndef _SMESH_Cartesian_3D_GRID_HXX_
25#define _SMESH_Cartesian_3D_GRID_HXX_
26
27#ifdef WITH_TBB
28#include <tbb/parallel_for.h>
29#endif
30
31#include <utilities.h>
32
33// STD
34#include <algorithm>
35#include <map>
36#include <vector>
37#include <memory>
38#include <mutex>
39#include <thread>
40
41// SMESH
42#include "SMESH_StdMeshers.hxx"
45
46#include <ObjectPool.hxx>
47#include <SMDS_LinearEdge.hxx>
48#include <SMDS_MeshNode.hxx>
50#include <SMDS_VolumeTool.hxx>
51#include <SMESHDS_Mesh.hxx>
52#include <SMESH_Block.hxx>
53#include <SMESH_Comment.hxx>
54#include <SMESH_ControlsDef.hxx>
55#include <SMESH_Mesh.hxx>
56#include <SMESH_MeshAlgos.hxx>
57#include <SMESH_MeshEditor.hxx>
59#include <SMESH_subMesh.hxx>
61
62#include <utilities.h>
63#include <Utils_ExceptHandlers.hxx>
64
65#include <GEOMUtils.hxx>
66
67//OCC
68#include <BRepAdaptor_Curve.hxx>
69#include <BRepAdaptor_Surface.hxx>
70#include <BRepBndLib.hxx>
71#include <BRepBuilderAPI_Copy.hxx>
72#include <BRepBuilderAPI_MakeFace.hxx>
73#include <BRepTools.hxx>
74#include <BRepTopAdaptor_FClass2d.hxx>
75#include <BRep_Builder.hxx>
76#include <BRep_Tool.hxx>
77#include <Bnd_B3d.hxx>
78#include <Bnd_Box.hxx>
79#include <ElSLib.hxx>
80#include <GCPnts_UniformDeflection.hxx>
81#include <Geom2d_BSplineCurve.hxx>
82#include <Geom2d_BezierCurve.hxx>
83#include <Geom2d_TrimmedCurve.hxx>
84#include <GeomAPI_ProjectPointOnSurf.hxx>
85#include <GeomLib.hxx>
86#include <Geom_BSplineCurve.hxx>
87#include <Geom_BSplineSurface.hxx>
88#include <Geom_BezierCurve.hxx>
89#include <Geom_BezierSurface.hxx>
90#include <Geom_RectangularTrimmedSurface.hxx>
91#include <Geom_TrimmedCurve.hxx>
92#include <IntAna_IntConicQuad.hxx>
93#include <IntAna_IntLinTorus.hxx>
94#include <IntAna_Quadric.hxx>
95#include <IntCurveSurface_TransitionOnCurve.hxx>
96#include <IntCurvesFace_Intersector.hxx>
97#include <Poly_Triangulation.hxx>
98#include <Precision.hxx>
99#include <TopExp.hxx>
100#include <TopExp_Explorer.hxx>
101#include <TopLoc_Location.hxx>
102#include <TopTools_DataMapOfShapeInteger.hxx>
103#include <TopTools_IndexedMapOfShape.hxx>
104#include <TopTools_MapOfShape.hxx>
105#include <TopoDS.hxx>
106#include <TopoDS_Compound.hxx>
107#include <TopoDS_Face.hxx>
108#include <TopoDS_TShape.hxx>
109#include <gp_Cone.hxx>
110#include <gp_Cylinder.hxx>
111#include <gp_Lin.hxx>
112#include <gp_Pln.hxx>
113#include <gp_Pnt2d.hxx>
114#include <gp_Sphere.hxx>
115#include <gp_Torus.hxx>
116
117// All utility structs used in Grid and hexahedron class will be included here
118// Ideally each one of this should define their own testable class
119namespace StdMeshers
120{
121namespace Cartesian3D
122{
123 typedef int TGeomID; // IDs of sub-shapes
124 typedef TopTools_ShapeMapHasher TShapeHasher; // non-oriented shape hasher
125 typedef std::array< int, 3 > TIJK;
126
127 typedef std::map< TGeomID, std::vector< TGeomID > > TEdge2faceIDsMap;
128
129 const TGeomID theUndefID = 1e+9;
130
131 //=============================================================================
132 // Definitions of internal utils
133 // --------------------------------------------------------------------------
135 Trans_TANGENT = IntCurveSurface_Tangent,
136 Trans_IN = IntCurveSurface_In,
137 Trans_OUT = IntCurveSurface_Out,
139 Trans_INTERNAL // for INTERNAL FACE
140 };
141
142 // --------------------------------------------------------------------------
149 {
153 ConcaveFace( int f=0, int e1=0, int e2=0, int v1=0, int v2=0 )
154 : _concaveFace(f), _edge1(e1), _edge2(e2), _v1(v1), _v2(v2) {}
155 bool HasEdge( TGeomID edge ) const { return edge == _edge1 || edge == _edge2; }
156 bool HasVertex( TGeomID v ) const { return v == _v1 || v == _v2; }
157 void SetEdge( TGeomID edge ) { ( _edge1 ? _edge2 : _edge1 ) = edge; }
158 void SetVertex( TGeomID v ) { ( _v1 ? _v2 : _v1 ) = v; }
159 };
160 typedef NCollection_DataMap< TGeomID, ConcaveFace > TConcaveVertex2Face;
161
162 // --------------------------------------------------------------------------
166 class Solid // sole SOLID contains all sub-shapes
167 {
168 TGeomID _id; // SOLID id
170 TConcaveVertex2Face _concaveVertex; // concave VERTEX -> ConcaveFace
171 public:
172 virtual ~Solid() {}
173 virtual bool Contains( TGeomID /*subID*/ ) const { return true; }
174 virtual bool ContainsAny( const std::vector< TGeomID>& /*subIDs*/ ) const { return true; }
175 virtual TopAbs_Orientation Orientation( const TopoDS_Shape& s ) const { return s.Orientation(); }
176 virtual bool IsOutsideOriented( TGeomID /*faceID*/ ) const { return true; }
177 void SetID( TGeomID id ) { _id = id; }
178 TGeomID ID() const { return _id; }
179 void SetHasInternalFaces( bool has ) { _hasInternalFaces = has; }
180 bool HasInternalFaces() const { return _hasInternalFaces; }
182 { _concaveVertex.Bind( V, ConcaveFace{ F, E1, E2, V1, V2 }); }
183 bool HasConcaveVertex() const { return !_concaveVertex.IsEmpty(); }
184 const ConcaveFace* GetConcave( TGeomID V ) const { return _concaveVertex.Seek( V ); }
185 };
186
187 // --------------------------------------------------------------------------
188 class OneOfSolids : public Solid
189 {
190 TColStd_MapOfInteger _subIDs;
191 TopTools_MapOfShape _faces; // keep FACE orientation
192 TColStd_MapOfInteger _outFaceIDs; // FACEs of shape_to_mesh oriented outside the SOLID
193 public:
194 void Init( const TopoDS_Shape& solid,
195 TopAbs_ShapeEnum subType,
196 const SMESHDS_Mesh* mesh );
197 virtual bool Contains( TGeomID i ) const { return i == ID() || _subIDs.Contains( i ); }
198 virtual bool ContainsAny( const std::vector< TGeomID>& subIDs ) const
199 {
200 for ( size_t i = 0; i < subIDs.size(); ++i ) if ( Contains( subIDs[ i ])) return true;
201 return false;
202 }
203 virtual TopAbs_Orientation Orientation( const TopoDS_Shape& face ) const
204 {
205 const TopoDS_Shape& sInMap = const_cast< OneOfSolids* >(this)->_faces.Added( face );
206 return sInMap.Orientation();
207 }
208 virtual bool IsOutsideOriented( TGeomID faceID ) const
209 {
210 return faceID == 0 || _outFaceIDs.Contains( faceID );
211 }
212 };
213
214 // --------------------------------------------------------------------------
219 {
220 typedef std::vector< TGeomID > TVector;
222 bool myOwn;
223
224 public:
225 GeomIDVecHelder( const TVector& idVec, bool isOwner ): myVec( idVec ), myOwn( isOwner ) {}
226 GeomIDVecHelder( const GeomIDVecHelder& holder ): myVec( holder.myVec ), myOwn( holder.myOwn )
227 {
228 const_cast< bool& >( holder.myOwn ) = false;
229 }
230 ~GeomIDVecHelder() { if ( myOwn ) const_cast<TVector&>( myVec ).clear(); }
231 size_t size() const { return myVec.size(); }
232 TGeomID operator[]( size_t i ) const { return i < size() ? myVec[i] : theUndefID; }
233 bool operator==( const GeomIDVecHelder& other ) const { return myVec == other.myVec; }
234 bool contain( const TGeomID& id ) const {
235 return std::find( myVec.begin(), myVec.end(), id ) != myVec.end();
236 }
237 TGeomID otherThan( const TGeomID& id ) const {
238 for ( const TGeomID& id2 : myVec )
239 if ( id != id2 )
240 return id2;
241 return theUndefID;
242 }
243 TGeomID oneCommon( const GeomIDVecHelder& other ) const {
244 TGeomID common = theUndefID;
245 for ( const TGeomID& id : myVec )
246 if ( other.contain( id ))
247 {
248 if ( common != theUndefID )
249 return theUndefID;
250 common = id;
251 }
252 return common;
253 }
254 };
255
256 // --------------------------------------------------------------------------
260 struct Geometry
261 {
262 TopoDS_Shape _mainShape;
263 std::vector< std::vector< TGeomID > > _solidIDsByShapeID;// V/E/F ID -> SOLID IDs
265 std::map< TGeomID, OneOfSolids > _solidByID;
266 TColStd_MapOfInteger _boundaryFaces; // FACEs on boundary of mesh->ShapeToMesh()
267 TColStd_MapOfInteger _strangeEdges; // EDGEs shared by strange FACEs
268 TGeomID _extIntFaceID; // pseudo FACE - extension of INTERNAL FACE
269
270 TopTools_DataMapOfShapeInteger _shape2NbNodes; // nb of pre-existing nodes on shapes
271
274
275 bool IsOneSolid() const { return _solidByID.size() < 2; }
276 GeomIDVecHelder GetSolidIDsByShapeID( const std::vector< TGeomID >& shapeIDs ) const;
277 };
278
279 // --------------------------------------------------------------------------
284 {
285 // This two class members are being updated in a non thread safe way.
286 // See Add method modify _node and _faceIDs class members dynamically during execution
287 // of Hexahedron.compute() method.
288 // std::mutex _mutex;
289 mutable const SMDS_MeshNode* _node;
290 mutable std::vector< TGeomID > _faceIDs;
291
293 bool Add( const std::vector< TGeomID >& fIDs, const SMDS_MeshNode* n=NULL ) const;
294 TGeomID HasCommonFace( const B_IntersectPoint * other, TGeomID avoidFace=-1 ) const;
295 size_t GetCommonFaces( const B_IntersectPoint * other, TGeomID * commonFaces ) const;
296 bool IsOnFace( TGeomID faceID ) const;
297 virtual ~B_IntersectPoint() {}
298 };
299
300 // --------------------------------------------------------------------------
305 {
307 double _u, _v;
309 mutable size_t _indexOnLine;
310
311 bool operator< ( const F_IntersectPoint& o ) const {
312 return _paramOnLine < o._paramOnLine;
313 }
314 };
315
316 // --------------------------------------------------------------------------
321 {
322 gp_Pnt _point;
323 double _uvw[3];
324 TGeomID _shapeID; // ID of EDGE or VERTEX
325 };
326
327 // --------------------------------------------------------------------------
331 struct GridLine
332 {
333 gp_Lin _line;
334 double _length; // line length
335 std::multiset< F_IntersectPoint > _intPoints;
336
337 void RemoveExcessIntPoints( const double tol );
338 TGeomID GetSolidIDBefore( std::multiset< F_IntersectPoint >::iterator ip,
339 const TGeomID prevID,
340 const Geometry& geom);
341 };
342 // --------------------------------------------------------------------------
347 {
348 gp_XYZ _zNorm;
349 std::vector< gp_XYZ > _origins; // origin points of all planes in one direction
350 std::vector< double > _zProjs; // projections of origins to _zNorm
351 };
352 // --------------------------------------------------------------------------
357 {
358 size_t _size [3];
359 size_t _curInd[3];
361 std::string _name1, _name2, _nameConst;
363 LineIndexer( size_t sz1, size_t sz2, size_t sz3,
364 size_t iv1, size_t iv2, size_t iConst,
365 const std::string& nv1, const std::string& nv2, const std::string& nConst )
366 {
367 _size[0] = sz1; _size[1] = sz2; _size[2] = sz3;
368 _curInd[0] = _curInd[1] = _curInd[2] = 0;
369 _iVar1 = iv1; _iVar2 = iv2; _iConst = iConst;
370 _name1 = nv1; _name2 = nv2; _nameConst = nConst;
371 }
372
373 size_t I() const { return _curInd[0]; }
374 size_t J() const { return _curInd[1]; }
375 size_t K() const { return _curInd[2]; }
376 void SetIJK( size_t i, size_t j, size_t k )
377 {
378 _curInd[0] = i; _curInd[1] = j; _curInd[2] = k;
379 }
380 void SetLineIndex(size_t i)
381 {
382 _curInd[_iVar2] = i / _size[_iVar1];
383 _curInd[_iVar1] = i % _size[_iVar1];
384 }
386 {
387 if ( ++_curInd[_iVar1] == _size[_iVar1] )
388 _curInd[_iVar1] = 0, ++_curInd[_iVar2];
389 }
390 bool More() const { return _curInd[_iVar2] < _size[_iVar2]; }
391 size_t LineIndex () const { return _curInd[_iVar1] + _curInd[_iVar2]* _size[_iVar1]; }
392 size_t LineIndex10 () const { return (_curInd[_iVar1] + 1 ) + _curInd[_iVar2]* _size[_iVar1]; }
393 size_t LineIndex01 () const { return _curInd[_iVar1] + (_curInd[_iVar2] + 1 )* _size[_iVar1]; }
394 size_t LineIndex11 () const { return (_curInd[_iVar1] + 1 ) + (_curInd[_iVar2] + 1 )* _size[_iVar1]; }
395 void SetIndexOnLine (size_t i) { _curInd[ _iConst ] = i; }
396 bool IsValidIndexOnLine (size_t i) const { return i < _size[ _iConst ]; }
397 size_t NbLines() const { return _size[_iVar1] * _size[_iVar2]; }
398 };
399
400 class Tools
401 {
402 public:
403 Tools() = delete;
404
405 //================================================================================
409 //================================================================================
410 static void GetExactBndBox( const std::vector< TopoDS_Shape >& faceVec, const double* axesDirs, Bnd_Box& shapeBox );
411 };
412
414 {
415 public:
416 std::vector< double > _coords[3]; // coordinates of grid nodes
417 gp_XYZ _axes [3]; // axis directions
418 std::vector< GridLine > _lines [3]; // in 3 directions
419 double _tol, _minCellSize;
420 gp_XYZ _origin;
421 gp_Mat _invB; // inverted basis of _axes
422
423 // index shift within _nodes of nodes of a cell from the 1st node
424 int _nodeShift[8];
425
426 std::vector< const SMDS_MeshNode* > _nodes; // mesh nodes at grid nodes
427 std::vector< const SMDS_MeshNode* > _allBorderNodes; // mesh nodes between the bounding box and the geometry boundary
428
429 std::vector< const F_IntersectPoint* > _gridIntP; // grid node intersection with geometry
430 ObjectPool< E_IntersectPoint > _edgeIntPool; // intersections with EDGEs
431 ObjectPool< F_IntersectPoint > _extIntPool; // intersections with extended INTERNAL FACEs
432 //list< E_IntersectPoint > _edgeIntP; // intersections with EDGEs
433
441 double _quanta;
442
444
445 size_t CellIndex( size_t i, size_t j, size_t k ) const
446 {
447 return i + j*(_coords[0].size()-1) + k*(_coords[0].size()-1)*(_coords[1].size()-1);
448 }
449 size_t NodeIndex( size_t i, size_t j, size_t k ) const
450 {
451 return i + j*_coords[0].size() + k*_coords[0].size()*_coords[1].size();
452 }
453 size_t NodeIndex( const TIJK& ijk ) const
454 {
455 return NodeIndex( ijk[0], ijk[1], ijk[2] );
456 }
457 size_t NodeIndexDX() const { return 1; }
458 size_t NodeIndexDY() const { return _coords[0].size(); }
459 size_t NodeIndexDZ() const { return _coords[0].size() * _coords[1].size(); }
460
461 LineIndexer GetLineIndexer(size_t iDir) const;
462 size_t GetLineDir( const GridLine* line, size_t & index ) const;
463
465 {
466 E_IntersectPoint* eip = _edgeIntPool.getNew();
467 *eip = ip;
468 return eip;
469 }
470 void Remove( E_IntersectPoint* eip ) { _edgeIntPool.destroy( eip ); }
471
472 TGeomID ShapeID( const TopoDS_Shape& s ) const;
473 const TopoDS_Shape& Shape( TGeomID id ) const;
474 TopAbs_ShapeEnum ShapeType( TGeomID id ) const { return Shape(id).ShapeType(); }
475 void InitGeometry( const TopoDS_Shape& theShape );
476 void InitClassifier( const TopoDS_Shape& mainShape,
477 TopAbs_ShapeEnum shapeType,
479 void GetEdgesToImplement( std::map< TGeomID, std::vector< TGeomID > > & edge2faceMap,
480 const TopoDS_Shape& shape,
481 const std::vector< TopoDS_Shape >& faces );
482 void SetSolidFather( const TopoDS_Shape& s, const TopoDS_Shape& theShapeToMesh );
483 bool IsShared( TGeomID faceID ) const;
484 bool IsAnyShared( const std::vector< TGeomID >& faceIDs ) const;
485 bool IsInternal( TGeomID faceID ) const {
486 return ( faceID == PseudoIntExtFaceID() ||
487 Shape( faceID ).Orientation() == TopAbs_INTERNAL ); }
488 bool IsSolid( TGeomID shapeID ) const {
489 if ( _geometry.IsOneSolid() ) return _geometry._soleSolid.ID() == shapeID;
490 else return _geometry._solidByID.count( shapeID ); }
491 bool IsStrangeEdge( TGeomID id ) const { return _geometry._strangeEdges.Contains( id ); }
492 TGeomID PseudoIntExtFaceID() const { return _geometry._extIntFaceID; }
493 Solid* GetSolid( TGeomID solidID = 0 );
494 Solid* GetOneOfSolids( TGeomID solidID );
495 const std::vector< TGeomID > & GetSolidIDs( TGeomID subShapeID ) const;
496 bool IsCorrectTransition( TGeomID faceID, const Solid* solid );
497 bool IsBoundaryFace( TGeomID face ) const { return _geometry._boundaryFaces.Contains( face ); }
498 void SetOnShape( const SMDS_MeshNode* n, const F_IntersectPoint& ip,
499 TopoDS_Vertex* vertex = nullptr, bool unset = false );
500 void UpdateFacesOfVertex( const B_IntersectPoint& ip, const TopoDS_Vertex& vertex );
501 bool IsToCheckNodePos() const { return !_toAddEdges && _toCreateFaces; }
502 bool IsToRemoveExcessEntities() const { return !_toAddEdges; }
503
504 void SetCoordinates(const std::vector<double>& xCoords,
505 const std::vector<double>& yCoords,
506 const std::vector<double>& zCoords,
507 const double* axesDirs,
508 const Bnd_Box& bndBox );
509 void ComputeUVW(const gp_XYZ& p, double uvw[3]);
510 void ComputeNodes(SMESH_MesherHelper& helper);
511 bool GridInitAndInterserctWithShape( const TopoDS_Shape& theShape,
512 std::map< TGeomID, std::vector< TGeomID > >& edge2faceIDsMap,
514 const int numOfThreads,
515 bool computeCanceled );
516 };
517
518 // Implement parallel computation of Hexa with c++ thread implementation
519 template<typename Iterator, class Function>
520 void parallel_for(const Iterator& first, const Iterator& last, Function&& f, const unsigned int nthreads = 1)
521 {
522 MESSAGE("Start parallel computation of Hexa with c++ threads...");
523
524 assert(nthreads > 0);
525
526 const unsigned int numTasksTotal = last - first;
527 std::vector<std::thread> threads;
528 Iterator it = first;
529
530 MESSAGE("Number of elements to compute: " << numTasksTotal << "; num of threads: " << nthreads);
531
532 // Distribute tasks among threads
533 if (numTasksTotal <= nthreads)
534 {
535 // A simple case - just one task executed in one thread.
536 // TODO: check if it's faster to do it sequentially
537 threads.reserve(numTasksTotal);
538 for (; it < last; ++it)
539 {
540 threads.emplace_back(f, std::ref(*it));
541 }
542
543 // This line for debug in sequential mode
544 // std::for_each(it, last, f);
545 }
546 else
547 {
548 // Calculate how to distribute elements among threads evenly
549 const unsigned int numTasksInThread = numTasksTotal / nthreads;
550 MESSAGE("Number of tasks in thread: " << numTasksInThread);
551
552 // Store the numbers of tasks per thread
553 std::vector<unsigned int> distTasksInThreads(nthreads, numTasksInThread);
554
555 // Distribute a remainder among saved numbers
556 const unsigned int remainder = numTasksTotal % nthreads;
557 MESSAGE("Remainder of tasks " << remainder << " will be evenly distributed among threads");
558 for (unsigned int i = 0; i < remainder; ++i)
559 {
560 ++distTasksInThreads[i];
561 }
562
563 // Create threads for each number of tasks
564 threads.reserve(nthreads);
565 for (const auto i : distTasksInThreads)
566 {
567 Iterator curLast = it + i;
568
569 // Pass iterators by value and the function by reference!
570 auto lambda = [=,&f](){ std::for_each(it, curLast, f); };
571
572 // Create a thread
573 threads.emplace_back(lambda);
574
575 // Advance iterator to the next step
576 it = curLast;
577 }
578 }
579
580 std::for_each(threads.begin(), threads.end(), [](std::thread& x){ x.join(); });
581
582 MESSAGE("Parallel computation was finished successfully");
583 }
584
585 // --------------------------------------------------------------------------
590 {
591 TopoDS_Face _face;
594 Bnd_Box _bndBox;
595 IntCurvesFace_Intersector* _surfaceInt;
596 std::vector< std::pair< GridLine*, F_IntersectPoint > > _intersections;
597
599 void Intersect();
600
602 {
603 for ( size_t i = 0; i < _intersections.size(); ++i )
604 {
605 std::multiset< F_IntersectPoint >::iterator ip =
606 _intersections[i].first->_intPoints.insert( _intersections[i].second );
607 ip->_faceIDs.reserve( 1 );
608 ip->_faceIDs.push_back( _faceID );
609 }
610 }
611 const Bnd_Box& GetFaceBndBox()
612 {
614 return _bndBox;
615 }
616 IntCurvesFace_Intersector* GetCurveFaceIntersector()
617 {
618 if ( !_surfaceInt )
619 {
620 _surfaceInt = new IntCurvesFace_Intersector( _face, Precision::PConfusion() );
621 _bndBox = _surfaceInt->Bounding();
622 if ( _bndBox.IsVoid() )
624 }
625 return _surfaceInt;
626 }
627#ifdef WITH_TBB
628 bool IsThreadSafe(std::set< const Standard_Transient* >& noSafeTShapes) const;
629#endif
630 };
631
632#ifdef WITH_TBB
633 // --------------------------------------------------------------------------
637 struct ParallelIntersector
638 {
639 std::vector< FaceGridIntersector >& _faceVec;
640 ParallelIntersector( std::vector< FaceGridIntersector >& faceVec): _faceVec(faceVec){}
641 void operator() ( const tbb::blocked_range<size_t>& r ) const
642 {
643 for ( size_t i = r.begin(); i != r.end(); ++i )
644 _faceVec[i].Intersect();
645 }
646 };
647#endif
648
649 template<typename Type>
650 void computeGridIntersection( Type faceGridIntersector )
651 {
652 faceGridIntersector.Intersect();
653 }
654
655 // --------------------------------------------------------------------------
660 {
661 double _tol;
662 double _u, _v, _w; // params on the face and the line
663 Transition _transition; // transition at intersection (see IntCurveSurface.cdl)
664 Transition _transIn, _transOut; // IN and OUT transitions depending of face orientation
665
666 gp_Pln _plane;
667 gp_Cylinder _cylinder;
668 gp_Cone _cone;
669 gp_Sphere _sphere;
670 gp_Torus _torus;
671 IntCurvesFace_Intersector* _surfaceInt;
672
673 std::vector< F_IntersectPoint > _intPoints;
674
675 void IntersectWithPlane (const GridLine& gridLine);
676 void IntersectWithCylinder(const GridLine& gridLine);
677 void IntersectWithCone (const GridLine& gridLine);
678 void IntersectWithSphere (const GridLine& gridLine);
679 void IntersectWithTorus (const GridLine& gridLine);
680 void IntersectWithSurface (const GridLine& gridLine);
681
682 /*
683 * Return true if (_u,_v) is on the face
684 */
685 bool UVIsOnFace() const
686 {
687 TopAbs_State state = _surfaceInt->ClassifyUVPoint(gp_Pnt2d( _u,_v ));
688 return ( state == TopAbs_IN || state == TopAbs_ON );
689 }
690 void addIntPoint(const bool toClassify=true);
691 bool isParamOnLineOK( const double linLength )
692 {
693 return -_tol < _w && _w < linLength + _tol;
694 }
697 };
698
699} // end namespace Cartesian3D
700} // end namespace StdMeshers
701
702#endif
#define STDMESHERS_EXPORT
Definition: SMESH_StdMeshers.hxx:38
#define MESSAGE(msg)
Definition: UNV_Utilities.hxx:149
Definition: ObjectPool.hxx:40
X * getNew()
Definition: ObjectPool.hxx:102
void destroy(X *obj)
Definition: ObjectPool.hxx:133
Definition: SMDS_MeshNode.hxx:36
Definition: SMESHDS_Mesh.hxx:98
Definition: SMESH_ControlsDef.hxx:970
It helps meshers to add elements and provides other utilities.
Definition: SMESH_MesherHelper.hxx:84
Hold a vector of TGeomID and clear it at destruction.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:219
bool contain(const TGeomID &id) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:234
bool operator==(const GeomIDVecHelder &other) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:233
GeomIDVecHelder(const TVector &idVec, bool isOwner)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:225
size_t size() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:231
TGeomID oneCommon(const GeomIDVecHelder &other) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:243
GeomIDVecHelder(const GeomIDVecHelder &holder)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:226
TGeomID otherThan(const TGeomID &id) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:237
std::vector< TGeomID > TVector
Definition: StdMeshers_Cartesian_3D_Grid.hxx:220
TGeomID operator[](size_t i) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:232
~GeomIDVecHelder()
Definition: StdMeshers_Cartesian_3D_Grid.hxx:230
const TVector & myVec
Definition: StdMeshers_Cartesian_3D_Grid.hxx:221
bool myOwn
Definition: StdMeshers_Cartesian_3D_Grid.hxx:222
Definition: StdMeshers_Cartesian_3D_Grid.hxx:414
void Remove(E_IntersectPoint *eip)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:470
bool IsSolid(TGeomID shapeID) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:488
bool IsBoundaryFace(TGeomID face) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:497
bool _toCreateFaces
Definition: StdMeshers_Cartesian_3D_Grid.hxx:436
bool _toConsiderInternalFaces
Definition: StdMeshers_Cartesian_3D_Grid.hxx:437
ObjectPool< E_IntersectPoint > _edgeIntPool
Definition: StdMeshers_Cartesian_3D_Grid.hxx:430
bool _toUseThresholdForInternalFaces
Definition: StdMeshers_Cartesian_3D_Grid.hxx:438
bool IsToRemoveExcessEntities() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:502
size_t CellIndex(size_t i, size_t j, size_t k) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:445
bool IsInternal(TGeomID faceID) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:485
size_t NodeIndex(size_t i, size_t j, size_t k) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:449
size_t NodeIndex(const TIJK &ijk) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:453
bool IsStrangeEdge(TGeomID id) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:491
bool IsToCheckNodePos() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:501
TGeomID PseudoIntExtFaceID() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:492
TopAbs_ShapeEnum ShapeType(TGeomID id) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:474
double _sizeThreshold
Definition: StdMeshers_Cartesian_3D_Grid.hxx:439
size_t NodeIndexDX() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:457
size_t NodeIndexDZ() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:459
std::vector< const SMDS_MeshNode * > _nodes
Definition: StdMeshers_Cartesian_3D_Grid.hxx:426
SMESH_MesherHelper * _helper
Definition: StdMeshers_Cartesian_3D_Grid.hxx:443
std::vector< const SMDS_MeshNode * > _allBorderNodes
Definition: StdMeshers_Cartesian_3D_Grid.hxx:427
bool _toAddEdges
Definition: StdMeshers_Cartesian_3D_Grid.hxx:435
bool _toUseQuanta
Definition: StdMeshers_Cartesian_3D_Grid.hxx:440
double _minCellSize
Definition: StdMeshers_Cartesian_3D_Grid.hxx:419
Geometry _geometry
Definition: StdMeshers_Cartesian_3D_Grid.hxx:434
size_t NodeIndexDY() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:458
E_IntersectPoint * Add(const E_IntersectPoint &ip)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:464
gp_Mat _invB
Definition: StdMeshers_Cartesian_3D_Grid.hxx:421
std::vector< const F_IntersectPoint * > _gridIntP
Definition: StdMeshers_Cartesian_3D_Grid.hxx:429
ObjectPool< F_IntersectPoint > _extIntPool
Definition: StdMeshers_Cartesian_3D_Grid.hxx:431
gp_XYZ _origin
Definition: StdMeshers_Cartesian_3D_Grid.hxx:420
double _quanta
Definition: StdMeshers_Cartesian_3D_Grid.hxx:441
Definition: StdMeshers_Cartesian_3D_Grid.hxx:189
virtual bool ContainsAny(const std::vector< TGeomID > &subIDs) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:198
TopTools_MapOfShape _faces
Definition: StdMeshers_Cartesian_3D_Grid.hxx:191
virtual TopAbs_Orientation Orientation(const TopoDS_Shape &face) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:203
TColStd_MapOfInteger _subIDs
Definition: StdMeshers_Cartesian_3D_Grid.hxx:190
virtual bool IsOutsideOriented(TGeomID faceID) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:208
virtual bool Contains(TGeomID i) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:197
TColStd_MapOfInteger _outFaceIDs
Definition: StdMeshers_Cartesian_3D_Grid.hxx:192
void Init(const TopoDS_Shape &solid, TopAbs_ShapeEnum subType, const SMESHDS_Mesh *mesh)
Definition: StdMeshers_Cartesian_3D_Grid.cxx:221
Container of IDs of SOLID sub-shapes.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:167
virtual bool ContainsAny(const std::vector< TGeomID > &) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:174
bool HasConcaveVertex() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:183
virtual TopAbs_Orientation Orientation(const TopoDS_Shape &s) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:175
bool _hasInternalFaces
Definition: StdMeshers_Cartesian_3D_Grid.hxx:169
void SetID(TGeomID id)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:177
TConcaveVertex2Face _concaveVertex
Definition: StdMeshers_Cartesian_3D_Grid.hxx:170
TGeomID _id
Definition: StdMeshers_Cartesian_3D_Grid.hxx:168
virtual ~Solid()
Definition: StdMeshers_Cartesian_3D_Grid.hxx:172
void SetConcave(TGeomID V, TGeomID F, TGeomID E1, TGeomID E2, TGeomID V1, TGeomID V2)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:181
virtual bool Contains(TGeomID) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:173
void SetHasInternalFaces(bool has)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:179
TGeomID ID() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:178
virtual bool IsOutsideOriented(TGeomID) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:176
bool HasInternalFaces() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:180
const ConcaveFace * GetConcave(TGeomID V) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:184
Definition: StdMeshers_Cartesian_3D_Grid.hxx:401
static void GetExactBndBox(const std::vector< TopoDS_Shape > &faceVec, const double *axesDirs, Bnd_Box &shapeBox)
computes exact bounding box with axes parallel to given ones
Definition: StdMeshers_Cartesian_3D_Grid.cxx:1022
Definition: StdMeshers_Distribution.hxx:45
interface of "Body fitting Parameters" hypothesis.
Definition: SMESH_BasicHypothesis.idl:997
ENUM Add(ENUM v, int delta)
Return incremented enum value.
Definition: SMESH_TypeDefs.hxx:140
Orientation
Definition: SMESHGUI_ClippingDlg.h:75
Transition
Definition: StdMeshers_Cartesian_3D_Grid.hxx:134
@ Trans_APEX
Definition: StdMeshers_Cartesian_3D_Grid.hxx:138
@ Trans_OUT
Definition: StdMeshers_Cartesian_3D_Grid.hxx:137
@ Trans_INTERNAL
Definition: StdMeshers_Cartesian_3D_Grid.hxx:139
@ Trans_IN
Definition: StdMeshers_Cartesian_3D_Grid.hxx:136
@ Trans_TANGENT
Definition: StdMeshers_Cartesian_3D_Grid.hxx:135
const TGeomID theUndefID
Definition: StdMeshers_Cartesian_3D_Grid.hxx:129
TopTools_ShapeMapHasher TShapeHasher
Definition: StdMeshers_Cartesian_3D_Grid.hxx:124
int TGeomID
Definition: StdMeshers_Cartesian_3D_Grid.hxx:123
std::map< TGeomID, std::vector< TGeomID > > TEdge2faceIDsMap
Definition: StdMeshers_Cartesian_3D_Grid.hxx:127
NCollection_DataMap< TGeomID, ConcaveFace > TConcaveVertex2Face
Definition: StdMeshers_Cartesian_3D_Grid.hxx:160
void computeGridIntersection(Type faceGridIntersector)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:650
std::array< int, 3 > TIJK
Definition: StdMeshers_Cartesian_3D_Grid.hxx:125
void parallel_for(const Iterator &first, const Iterator &last, Function &&f, const unsigned int nthreads=1)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:520
StdMeshers: interfaces to standard hypotheses and algorithms.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:120
Common data of any intersection between a Grid and a shape.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:284
bool Add(const std::vector< TGeomID > &fIDs, const SMDS_MeshNode *n=NULL) const
Definition: StdMeshers_Cartesian_3D_Grid.cxx:156
const SMDS_MeshNode * _node
Definition: StdMeshers_Cartesian_3D_Grid.hxx:289
size_t GetCommonFaces(const B_IntersectPoint *other, TGeomID *commonFaces) const
Definition: StdMeshers_Cartesian_3D_Grid.cxx:194
virtual ~B_IntersectPoint()
Definition: StdMeshers_Cartesian_3D_Grid.hxx:297
std::vector< TGeomID > _faceIDs
Definition: StdMeshers_Cartesian_3D_Grid.hxx:290
B_IntersectPoint()
Definition: StdMeshers_Cartesian_3D_Grid.hxx:292
TGeomID HasCommonFace(const B_IntersectPoint *other, TGeomID avoidFace=-1) const
Definition: StdMeshers_Cartesian_3D_Grid.cxx:181
bool IsOnFace(TGeomID faceID) const
Definition: StdMeshers_Cartesian_3D_Grid.cxx:210
Sub-entities of a FACE neighboring its concave VERTEX.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:149
ConcaveFace(int f=0, int e1=0, int e2=0, int v1=0, int v2=0)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:153
bool HasEdge(TGeomID edge) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:155
TGeomID _edge1
Definition: StdMeshers_Cartesian_3D_Grid.hxx:151
void SetEdge(TGeomID edge)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:157
bool HasVertex(TGeomID v) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:156
TGeomID _v2
Definition: StdMeshers_Cartesian_3D_Grid.hxx:152
void SetVertex(TGeomID v)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:158
TGeomID _edge2
Definition: StdMeshers_Cartesian_3D_Grid.hxx:151
TGeomID _concaveFace
Definition: StdMeshers_Cartesian_3D_Grid.hxx:150
TGeomID _v1
Definition: StdMeshers_Cartesian_3D_Grid.hxx:152
Data of intersection between GridPlanes and a TopoDS_EDGE.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:321
gp_Pnt _point
Definition: StdMeshers_Cartesian_3D_Grid.hxx:322
double _uvw[3]
Definition: StdMeshers_Cartesian_3D_Grid.hxx:323
TGeomID _shapeID
Definition: StdMeshers_Cartesian_3D_Grid.hxx:324
Data of intersection between a GridLine and a TopoDS_Face.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:305
double _paramOnLine
Definition: StdMeshers_Cartesian_3D_Grid.hxx:306
Transition _transition
Definition: StdMeshers_Cartesian_3D_Grid.hxx:308
double _v
Definition: StdMeshers_Cartesian_3D_Grid.hxx:307
size_t _indexOnLine
Definition: StdMeshers_Cartesian_3D_Grid.hxx:309
double _u
Definition: StdMeshers_Cartesian_3D_Grid.hxx:307
bool operator<(const F_IntersectPoint &o) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:311
Intersector of TopoDS_Face with all GridLine's.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:590
FaceGridIntersector()
Definition: StdMeshers_Cartesian_3D_Grid.hxx:598
IntCurvesFace_Intersector * GetCurveFaceIntersector()
Definition: StdMeshers_Cartesian_3D_Grid.hxx:616
void StoreIntersections()
Definition: StdMeshers_Cartesian_3D_Grid.hxx:601
IntCurvesFace_Intersector * _surfaceInt
Definition: StdMeshers_Cartesian_3D_Grid.hxx:595
TGeomID _faceID
Definition: StdMeshers_Cartesian_3D_Grid.hxx:592
Bnd_Box _bndBox
Definition: StdMeshers_Cartesian_3D_Grid.hxx:594
const Bnd_Box & GetFaceBndBox()
Definition: StdMeshers_Cartesian_3D_Grid.hxx:611
Grid * _grid
Definition: StdMeshers_Cartesian_3D_Grid.hxx:593
void Intersect()
Definition: StdMeshers_Cartesian_3D_Grid.cxx:1102
std::vector< std::pair< GridLine *, F_IntersectPoint > > _intersections
Definition: StdMeshers_Cartesian_3D_Grid.hxx:596
TopoDS_Face _face
Definition: StdMeshers_Cartesian_3D_Grid.hxx:591
Intersector of a surface with a GridLine.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:660
void IntersectWithSurface(const GridLine &gridLine)
Definition: StdMeshers_Cartesian_3D_Grid.cxx:1435
Transition _transOut
Definition: StdMeshers_Cartesian_3D_Grid.hxx:664
void addIntPoint(const bool toClassify=true)
Definition: StdMeshers_Cartesian_3D_Grid.cxx:1266
FaceLineIntersector()
Definition: StdMeshers_Cartesian_3D_Grid.hxx:695
~FaceLineIntersector()
Definition: StdMeshers_Cartesian_3D_Grid.hxx:696
bool UVIsOnFace() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:685
bool isParamOnLineOK(const double linLength)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:691
void IntersectWithPlane(const GridLine &gridLine)
Definition: StdMeshers_Cartesian_3D_Grid.cxx:1283
gp_Pln _plane
Definition: StdMeshers_Cartesian_3D_Grid.hxx:666
gp_Sphere _sphere
Definition: StdMeshers_Cartesian_3D_Grid.hxx:669
void IntersectWithTorus(const GridLine &gridLine)
Definition: StdMeshers_Cartesian_3D_Grid.cxx:1402
gp_Cone _cone
Definition: StdMeshers_Cartesian_3D_Grid.hxx:668
gp_Torus _torus
Definition: StdMeshers_Cartesian_3D_Grid.hxx:670
double _u
Definition: StdMeshers_Cartesian_3D_Grid.hxx:662
std::vector< F_IntersectPoint > _intPoints
Definition: StdMeshers_Cartesian_3D_Grid.hxx:673
Transition _transition
Definition: StdMeshers_Cartesian_3D_Grid.hxx:663
void IntersectWithCone(const GridLine &gridLine)
Definition: StdMeshers_Cartesian_3D_Grid.cxx:1330
double _w
Definition: StdMeshers_Cartesian_3D_Grid.hxx:662
gp_Cylinder _cylinder
Definition: StdMeshers_Cartesian_3D_Grid.hxx:667
void IntersectWithCylinder(const GridLine &gridLine)
Definition: StdMeshers_Cartesian_3D_Grid.cxx:1298
double _v
Definition: StdMeshers_Cartesian_3D_Grid.hxx:662
IntCurvesFace_Intersector * _surfaceInt
Definition: StdMeshers_Cartesian_3D_Grid.hxx:671
void IntersectWithSphere(const GridLine &gridLine)
Definition: StdMeshers_Cartesian_3D_Grid.cxx:1370
Transition _transIn
Definition: StdMeshers_Cartesian_3D_Grid.hxx:664
double _tol
Definition: StdMeshers_Cartesian_3D_Grid.hxx:661
Geom data.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:261
SMESH::Controls::ElementsOnShape _vertexClassifier
Definition: StdMeshers_Cartesian_3D_Grid.hxx:273
TColStd_MapOfInteger _boundaryFaces
Definition: StdMeshers_Cartesian_3D_Grid.hxx:266
Solid _soleSolid
Definition: StdMeshers_Cartesian_3D_Grid.hxx:264
TopTools_DataMapOfShapeInteger _shape2NbNodes
Definition: StdMeshers_Cartesian_3D_Grid.hxx:270
std::map< TGeomID, OneOfSolids > _solidByID
Definition: StdMeshers_Cartesian_3D_Grid.hxx:265
std::vector< std::vector< TGeomID > > _solidIDsByShapeID
Definition: StdMeshers_Cartesian_3D_Grid.hxx:263
TopoDS_Shape _mainShape
Definition: StdMeshers_Cartesian_3D_Grid.hxx:262
SMESH::Controls::ElementsOnShape _edgeClassifier
Definition: StdMeshers_Cartesian_3D_Grid.hxx:272
GeomIDVecHelder GetSolidIDsByShapeID(const std::vector< TGeomID > &shapeIDs) const
Definition: StdMeshers_Cartesian_3D_Grid.cxx:251
TColStd_MapOfInteger _strangeEdges
Definition: StdMeshers_Cartesian_3D_Grid.hxx:267
TGeomID _extIntFaceID
Definition: StdMeshers_Cartesian_3D_Grid.hxx:268
bool IsOneSolid() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:275
A line of the grid and its intersections with 2D geometry.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:332
double _length
Definition: StdMeshers_Cartesian_3D_Grid.hxx:334
std::multiset< F_IntersectPoint > _intPoints
Definition: StdMeshers_Cartesian_3D_Grid.hxx:335
TGeomID GetSolidIDBefore(std::multiset< F_IntersectPoint >::iterator ip, const TGeomID prevID, const Geometry &geom)
Definition: StdMeshers_Cartesian_3D_Grid.cxx:83
void RemoveExcessIntPoints(const double tol)
Definition: StdMeshers_Cartesian_3D_Grid.cxx:50
gp_Lin _line
Definition: StdMeshers_Cartesian_3D_Grid.hxx:333
Planes of the grid used to find intersections of an EDGE with a hexahedron.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:347
std::vector< gp_XYZ > _origins
Definition: StdMeshers_Cartesian_3D_Grid.hxx:349
gp_XYZ _zNorm
Definition: StdMeshers_Cartesian_3D_Grid.hxx:348
std::vector< double > _zProjs
Definition: StdMeshers_Cartesian_3D_Grid.hxx:350
Iterator on the parallel grid lines of one direction.
Definition: StdMeshers_Cartesian_3D_Grid.hxx:357
size_t _iVar2
Definition: StdMeshers_Cartesian_3D_Grid.hxx:360
size_t LineIndex10() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:392
LineIndexer()
Definition: StdMeshers_Cartesian_3D_Grid.hxx:362
bool More() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:390
size_t _iConst
Definition: StdMeshers_Cartesian_3D_Grid.hxx:360
size_t LineIndex11() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:394
size_t K() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:375
size_t NbLines() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:397
std::string _name1
Definition: StdMeshers_Cartesian_3D_Grid.hxx:361
void SetIndexOnLine(size_t i)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:395
std::string _name2
Definition: StdMeshers_Cartesian_3D_Grid.hxx:361
size_t LineIndex() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:391
size_t LineIndex01() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:393
size_t J() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:374
void SetIJK(size_t i, size_t j, size_t k)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:376
void operator++()
Definition: StdMeshers_Cartesian_3D_Grid.hxx:385
size_t I() const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:373
size_t _iVar1
Definition: StdMeshers_Cartesian_3D_Grid.hxx:360
size_t _size[3]
Definition: StdMeshers_Cartesian_3D_Grid.hxx:358
void SetLineIndex(size_t i)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:380
std::string _nameConst
Definition: StdMeshers_Cartesian_3D_Grid.hxx:361
LineIndexer(size_t sz1, size_t sz2, size_t sz3, size_t iv1, size_t iv2, size_t iConst, const std::string &nv1, const std::string &nv2, const std::string &nConst)
Definition: StdMeshers_Cartesian_3D_Grid.hxx:363
size_t _curInd[3]
Definition: StdMeshers_Cartesian_3D_Grid.hxx:359
bool IsValidIndexOnLine(size_t i) const
Definition: StdMeshers_Cartesian_3D_Grid.hxx:396