1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 //=============================================================================
24 // File : NETGENPlugin_NETGEN_3D.cxx
25 // Moved here from SMESH_NETGEN_3D.cxx
26 // Created : lundi 27 Janvier 2003
27 // Author : Nadir BOUHAMOU (CEA)
29 //=============================================================================
31 #include "NETGENPlugin_NETGEN_3D.hxx"
33 #include "NETGENPlugin_Hypothesis.hxx"
35 #include <SMDS_MeshElement.hxx>
36 #include <SMDS_MeshNode.hxx>
37 #include <SMESHDS_Mesh.hxx>
38 #include <SMESH_Comment.hxx>
39 #include <SMESH_ControlsDef.hxx>
40 #include <SMESH_Gen.hxx>
41 #include <SMESH_Mesh.hxx>
42 #include <SMESH_MeshEditor.hxx>
43 #include <SMESH_MesherHelper.hxx>
44 #include <SMESH_subMesh.hxx>
45 #include <StdMeshers_MaxElementVolume.hxx>
46 #include <StdMeshers_QuadToTriaAdaptor.hxx>
47 #include <StdMeshers_ViscousLayers.hxx>
49 #include <BRepGProp.hxx>
50 #include <BRep_Tool.hxx>
51 #include <GProp_GProps.hxx>
53 #include <TopExp_Explorer.hxx>
54 #include <TopTools_ListIteratorOfListOfShape.hxx>
57 #include <Standard_Failure.hxx>
58 #include <Standard_ErrorHandler.hxx>
60 #include <utilities.h>
73 #include <occgeom.hpp>
79 extern int OCCGenerateMesh (OCCGeometry&, Mesh*&, MeshingParameters&, int, int);
81 extern int OCCGenerateMesh (OCCGeometry&, Mesh*&, int, int, char*);
83 extern MeshingParameters mparam;
84 extern volatile multithreadt multithread;
86 using namespace nglib;
89 //=============================================================================
93 //=============================================================================
95 NETGENPlugin_NETGEN_3D::NETGENPlugin_NETGEN_3D(int hypId, int studyId,
97 : SMESH_3D_Algo(hypId, studyId, gen)
99 MESSAGE("NETGENPlugin_NETGEN_3D::NETGENPlugin_NETGEN_3D");
101 _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);// 1 bit /shape type
102 _compatibleHypothesis.push_back("MaxElementVolume");
103 _compatibleHypothesis.push_back("NETGEN_Parameters");
104 _compatibleHypothesis.push_back("ViscousLayers");
106 _maxElementVolume = 0.;
108 _hypMaxElementVolume = NULL;
109 _hypParameters = NULL;
110 _viscousLayersHyp = NULL;
112 _requireShape = false; // can work without shape
115 //=============================================================================
119 //=============================================================================
121 NETGENPlugin_NETGEN_3D::~NETGENPlugin_NETGEN_3D()
123 MESSAGE("NETGENPlugin_NETGEN_3D::~NETGENPlugin_NETGEN_3D");
126 //=============================================================================
130 //=============================================================================
132 bool NETGENPlugin_NETGEN_3D::CheckHypothesis (SMESH_Mesh& aMesh,
133 const TopoDS_Shape& aShape,
134 Hypothesis_Status& aStatus)
136 MESSAGE("NETGENPlugin_NETGEN_3D::CheckHypothesis");
138 _hypMaxElementVolume = NULL;
139 _hypParameters = NULL;
140 _viscousLayersHyp = NULL;
141 _maxElementVolume = DBL_MAX;
143 list<const SMESHDS_Hypothesis*>::const_iterator itl;
144 const SMESHDS_Hypothesis* theHyp;
146 const list<const SMESHDS_Hypothesis*>& hyps =
147 GetUsedHypothesis(aMesh, aShape, /*ignoreAuxiliary=*/false);
148 list <const SMESHDS_Hypothesis* >::const_iterator h = hyps.begin();
149 if ( h == hyps.end())
151 aStatus = SMESH_Hypothesis::HYP_OK;
152 return true; // can work with no hypothesis
156 for ( ; h != hyps.end(); ++h )
158 if ( !_hypMaxElementVolume )
159 _hypMaxElementVolume = dynamic_cast< const StdMeshers_MaxElementVolume*> ( *h );
160 if ( !_viscousLayersHyp )
161 _viscousLayersHyp = dynamic_cast< const StdMeshers_ViscousLayers*> ( *h );
162 if ( ! _hypParameters )
163 _hypParameters = dynamic_cast< const NETGENPlugin_Hypothesis*> ( *h );
165 if ( *h != _hypMaxElementVolume &&
166 *h != _viscousLayersHyp &&
167 *h != _hypParameters)
168 aStatus = HYP_INCOMPATIBLE;
170 if ( _hypMaxElementVolume && _hypParameters )
171 aStatus = HYP_INCOMPATIBLE;
173 if ( _hypMaxElementVolume )
174 _maxElementVolume = _hypMaxElementVolume->GetMaxVolume();
176 return aStatus == HYP_OK;
179 //=============================================================================
181 *Here we are going to use the NETGEN mesher
183 //=============================================================================
185 bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
186 const TopoDS_Shape& aShape)
188 netgen::multithread.terminate = 0;
190 SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
192 SMESH_MesherHelper helper(aMesh);
193 bool _quadraticMesh = helper.IsQuadraticSubMesh(aShape);
194 helper.SetElementsOnShape( true );
196 int Netgen_NbOfNodes = 0;
197 double Netgen_point[3];
198 int Netgen_triangle[3];
200 NETGENPlugin_NetgenLibWrapper ngLib;
201 Ng_Mesh * Netgen_mesh = ngLib._ngMesh;
203 // vector of nodes in which node index == netgen ID
204 vector< const SMDS_MeshNode* > nodeVec;
206 const int invalid_ID = -1;
208 SMESH::Controls::Area areaControl;
209 SMESH::Controls::TSequenceOfXYZ nodesCoords;
211 // maps nodes to ng ID
212 typedef map< const SMDS_MeshNode*, int, TIDCompare > TNodeToIDMap;
213 typedef TNodeToIDMap::value_type TN2ID;
214 TNodeToIDMap nodeToNetgenID;
216 // find internal shapes
217 NETGENPlugin_Internals internals( aMesh, aShape, /*is3D=*/true );
219 // ---------------------------------
220 // Feed the Netgen with surface mesh
221 // ---------------------------------
223 TopAbs_ShapeEnum mainType = aMesh.GetShapeToMesh().ShapeType();
224 bool checkReverse = ( mainType == TopAbs_COMPOUND || mainType == TopAbs_COMPSOLID );
226 SMESH_ProxyMesh::Ptr proxyMesh( new SMESH_ProxyMesh( aMesh ));
227 if ( _viscousLayersHyp )
229 proxyMesh = _viscousLayersHyp->Compute( aMesh, aShape );
233 if ( aMesh.NbQuadrangles() > 0 )
235 StdMeshers_QuadToTriaAdaptor* Adaptor = new StdMeshers_QuadToTriaAdaptor;
236 Adaptor->Compute(aMesh,aShape,proxyMesh.get());
237 proxyMesh.reset( Adaptor );
240 for ( TopExp_Explorer exFa( aShape, TopAbs_FACE ); exFa.More(); exFa.Next())
242 const TopoDS_Shape& aShapeFace = exFa.Current();
243 int faceID = meshDS->ShapeToIndex( aShapeFace );
244 bool isInternalFace = internals.isInternalShape( faceID );
246 if ( checkReverse && !isInternalFace &&
247 helper.NbAncestors(aShapeFace, aMesh, aShape.ShapeType()) > 1 )
248 // IsReversedSubMesh() can work wrong on strongly curved faces,
249 // so we use it as less as possible
250 isRev = helper.IsReversedSubMesh( TopoDS::Face( aShapeFace ));
252 const SMESHDS_SubMesh * aSubMeshDSFace = proxyMesh->GetSubMesh( aShapeFace );
253 if ( !aSubMeshDSFace ) continue;
254 SMDS_ElemIteratorPtr iteratorElem = aSubMeshDSFace->GetElements();
255 while ( iteratorElem->more() ) // loop on elements on a geom face
258 const SMDS_MeshElement* elem = iteratorElem->next();
260 return error( COMPERR_BAD_INPUT_MESH, "Null element encounters");
261 if ( elem->NbCornerNodes() != 3 )
262 return error( COMPERR_BAD_INPUT_MESH, "Not triangle element encounters");
264 // Add nodes of triangles and triangles them-selves to netgen mesh
266 // add three nodes of triangle
267 bool hasDegen = false;
268 for ( int iN = 0; iN < 3; ++iN )
270 const SMDS_MeshNode* node = elem->GetNode( iN );
271 const int shapeID = node->getshapeId();
272 if ( node->GetPosition()->GetTypeOfPosition() == SMDS_TOP_EDGE &&
273 helper.IsDegenShape( shapeID ))
275 // ignore all nodes on degeneraged edge and use node on its vertex instead
276 TopoDS_Shape vertex = TopoDS_Iterator( meshDS->IndexToShape( shapeID )).Value();
277 node = SMESH_Algo::VertexNode( TopoDS::Vertex( vertex ), meshDS );
280 int& ngID = nodeToNetgenID.insert(TN2ID( node, invalid_ID )).first->second;
281 if ( ngID == invalid_ID )
283 ngID = ++Netgen_NbOfNodes;
284 Netgen_point [ 0 ] = node->X();
285 Netgen_point [ 1 ] = node->Y();
286 Netgen_point [ 2 ] = node->Z();
287 Ng_AddPoint(Netgen_mesh, Netgen_point);
289 Netgen_triangle[ isRev ? 2-iN : iN ] = ngID;
292 if ( hasDegen && (Netgen_triangle[0] == Netgen_triangle[1] ||
293 Netgen_triangle[0] == Netgen_triangle[2] ||
294 Netgen_triangle[2] == Netgen_triangle[1] ))
297 Ng_AddSurfaceElement(Netgen_mesh, NG_TRIG, Netgen_triangle);
299 if ( isInternalFace && !proxyMesh->IsTemporary( elem ))
301 swap( Netgen_triangle[1], Netgen_triangle[2] );
302 Ng_AddSurfaceElement(Netgen_mesh, NG_TRIG, Netgen_triangle);
304 } // loop on elements on a face
305 } // loop on faces of a SOLID or SHELL
307 // insert old nodes into nodeVec
308 nodeVec.resize( nodeToNetgenID.size() + 1, 0 );
309 TNodeToIDMap::iterator n_id = nodeToNetgenID.begin();
310 for ( ; n_id != nodeToNetgenID.end(); ++n_id )
311 nodeVec[ n_id->second ] = n_id->first;
312 nodeToNetgenID.clear();
314 if ( internals.hasInternalVertexInSolid() )
316 netgen::OCCGeometry occgeo;
317 NETGENPlugin_Mesher::AddIntVerticesInSolids( occgeo,
318 (netgen::Mesh&) *Netgen_mesh,
324 // -------------------------
325 // Generate the volume mesh
326 // -------------------------
328 return ( ngLib._isComputeOk = compute( aMesh, helper, nodeVec, Netgen_mesh));
331 //================================================================================
333 * \brief set parameters and generate the volume mesh
335 //================================================================================
337 bool NETGENPlugin_NETGEN_3D::compute(SMESH_Mesh& aMesh,
338 SMESH_MesherHelper& helper,
339 vector< const SMDS_MeshNode* >& nodeVec,
340 Ng_Mesh * Netgen_mesh)
342 netgen::multithread.terminate = 0;
344 netgen::Mesh* ngMesh = (netgen::Mesh*)Netgen_mesh;
345 int Netgen_NbOfNodes = Ng_GetNP(Netgen_mesh);
350 int startWith = netgen::MESHCONST_MESHVOLUME;
351 int endWith = netgen::MESHCONST_OPTVOLUME;
354 NETGENPlugin_Mesher aMesher( &aMesh, helper.GetSubShape(), /*isVolume=*/true );
355 netgen::OCCGeometry occgeo;
357 if ( _hypParameters )
359 aMesher.SetParameters( _hypParameters );
360 if ( !_hypParameters->GetOptimize() )
361 endWith = netgen::MESHCONST_MESHVOLUME;
363 else if ( _hypMaxElementVolume )
365 netgen::mparam.maxh = pow( 72, 1/6. ) * pow( _maxElementVolume, 1/3. );
367 else if ( aMesh.HasShapeToMesh() )
369 aMesher.PrepareOCCgeometry( occgeo, helper.GetSubShape(), aMesh );
370 netgen::mparam.maxh = occgeo.GetBoundingBox().Diam()/2;
374 netgen::Point3d pmin, pmax;
375 ngMesh->GetBox (pmin, pmax);
376 netgen::mparam.maxh = Dist(pmin, pmax)/2;
379 if ( !_hypParameters && aMesh.HasShapeToMesh() )
381 netgen::mparam.minh = aMesher.GetDefaultMinSize( helper.GetSubShape(), netgen::mparam.maxh );
386 #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
390 ngMesh->CalcLocalH(netgen::mparam.grading);
391 err = netgen::OCCGenerateMesh(occgeo, ngMesh, netgen::mparam, startWith, endWith);
393 ngMesh->CalcLocalH();
394 err = netgen::OCCGenerateMesh(occgeo, ngMesh, startWith, endWith, optstr);
396 if(netgen::multithread.terminate)
399 error(SMESH_Comment("Error in netgen::OCCGenerateMesh() at ") << netgen::multithread.task);
401 catch (Standard_Failure& ex)
403 SMESH_Comment str("Exception in netgen::OCCGenerateMesh()");
404 str << " at " << netgen::multithread.task
405 << ": " << ex.DynamicType()->Name();
406 if ( ex.GetMessageString() && strlen( ex.GetMessageString() ))
407 str << ": " << ex.GetMessageString();
410 catch (netgen::NgException exc)
412 SMESH_Comment str("NgException");
413 if ( strlen( netgen::multithread.task ) > 0 )
414 str << " at " << netgen::multithread.task;
415 str << ": " << exc.What();
420 SMESH_Comment str("Exception in netgen::OCCGenerateMesh()");
421 if ( strlen( netgen::multithread.task ) > 0 )
422 str << " at " << netgen::multithread.task;
426 int Netgen_NbOfNodesNew = Ng_GetNP(Netgen_mesh);
427 int Netgen_NbOfTetra = Ng_GetNE(Netgen_mesh);
429 MESSAGE("End of Volume Mesh Generation. err=" << err <<
430 ", nb new nodes: " << Netgen_NbOfNodesNew - Netgen_NbOfNodes <<
431 ", nb tetra: " << Netgen_NbOfTetra);
433 // -------------------------------------------------------------------
434 // Feed back the SMESHDS with the generated Nodes and Volume Elements
435 // -------------------------------------------------------------------
439 SMESH_ComputeErrorPtr ce = NETGENPlugin_Mesher::ReadErrors(nodeVec);
440 if ( ce && !ce->myBadElements.empty() )
444 bool isOK = ( /*status == NG_OK &&*/ Netgen_NbOfTetra > 0 );// get whatever built
447 double Netgen_point[3];
448 int Netgen_tetrahedron[4];
450 // create and insert new nodes into nodeVec
451 nodeVec.resize( Netgen_NbOfNodesNew + 1, 0 );
452 int nodeIndex = Netgen_NbOfNodes + 1;
453 for ( ; nodeIndex <= Netgen_NbOfNodesNew; ++nodeIndex )
455 Ng_GetPoint( Netgen_mesh, nodeIndex, Netgen_point );
456 nodeVec.at(nodeIndex) = helper.AddNode(Netgen_point[0], Netgen_point[1], Netgen_point[2]);
459 // create tetrahedrons
460 for ( int elemIndex = 1; elemIndex <= Netgen_NbOfTetra; ++elemIndex )
462 Ng_GetVolumeElement(Netgen_mesh, elemIndex, Netgen_tetrahedron);
465 helper.AddVolume (nodeVec.at( Netgen_tetrahedron[0] ),
466 nodeVec.at( Netgen_tetrahedron[1] ),
467 nodeVec.at( Netgen_tetrahedron[2] ),
468 nodeVec.at( Netgen_tetrahedron[3] ));
479 //================================================================================
481 * \brief Compute tetrahedral mesh from 2D mesh without geometry
483 //================================================================================
485 bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
486 SMESH_MesherHelper* aHelper)
488 const int invalid_ID = -1;
490 SMESH_MesherHelper::MType MeshType = aHelper->IsQuadraticMesh();
491 if ( MeshType == SMESH_MesherHelper::COMP )
492 return error( COMPERR_BAD_INPUT_MESH,
493 SMESH_Comment("Mesh with linear and quadratic elements given"));
495 aHelper->SetIsQuadratic( MeshType == SMESH_MesherHelper::QUADRATIC );
497 // ---------------------------------
498 // Feed the Netgen with surface mesh
499 // ---------------------------------
501 int Netgen_NbOfNodes = 0;
502 int Netgen_param2ndOrder = 0;
503 double Netgen_paramFine = 1.;
504 double Netgen_paramSize = pow( 72, 1/6. ) * pow( _maxElementVolume, 1/3. );
506 double Netgen_point[3];
507 int Netgen_triangle[3];
508 int Netgen_tetrahedron[4];
510 NETGENPlugin_NetgenLibWrapper ngLib;
511 Ng_Mesh * Netgen_mesh = ngLib._ngMesh;
513 SMESH_ProxyMesh::Ptr proxyMesh( new SMESH_ProxyMesh( aMesh ));
514 if ( aMesh.NbQuadrangles() > 0 )
516 StdMeshers_QuadToTriaAdaptor* Adaptor = new StdMeshers_QuadToTriaAdaptor;
517 Adaptor->Compute(aMesh);
518 proxyMesh.reset( Adaptor );
521 // maps nodes to ng ID
522 typedef map< const SMDS_MeshNode*, int, TIDCompare > TNodeToIDMap;
523 typedef TNodeToIDMap::value_type TN2ID;
524 TNodeToIDMap nodeToNetgenID;
526 SMDS_ElemIteratorPtr fIt = proxyMesh->GetFaces();
530 const SMDS_MeshElement* elem = fIt->next();
532 return error( COMPERR_BAD_INPUT_MESH, "Null element encounters");
533 if ( elem->NbCornerNodes() != 3 )
534 return error( COMPERR_BAD_INPUT_MESH, "Not triangle element encounters");
536 // add three nodes of triangle
537 for ( int iN = 0; iN < 3; ++iN )
539 const SMDS_MeshNode* node = elem->GetNode( iN );
540 int& ngID = nodeToNetgenID.insert(TN2ID( node, invalid_ID )).first->second;
541 if ( ngID == invalid_ID )
543 ngID = ++Netgen_NbOfNodes;
544 Netgen_point [ 0 ] = node->X();
545 Netgen_point [ 1 ] = node->Y();
546 Netgen_point [ 2 ] = node->Z();
547 Ng_AddPoint(Netgen_mesh, Netgen_point);
549 Netgen_triangle[ iN ] = ngID;
551 Ng_AddSurfaceElement(Netgen_mesh, NG_TRIG, Netgen_triangle);
553 proxyMesh.reset(); // delete tmp faces
555 // vector of nodes in which node index == netgen ID
556 vector< const SMDS_MeshNode* > nodeVec ( nodeToNetgenID.size() + 1 );
557 // insert old nodes into nodeVec
558 TNodeToIDMap::iterator n_id = nodeToNetgenID.begin();
559 for ( ; n_id != nodeToNetgenID.end(); ++n_id )
560 nodeVec.at( n_id->second ) = n_id->first;
561 nodeToNetgenID.clear();
563 // -------------------------
564 // Generate the volume mesh
565 // -------------------------
567 return ( ngLib._isComputeOk = compute( aMesh, *aHelper, nodeVec, Netgen_mesh));
570 void NETGENPlugin_NETGEN_3D::CancelCompute()
572 SMESH_Algo::CancelCompute();
573 netgen::multithread.terminate = 1;
576 //=============================================================================
580 //=============================================================================
582 bool NETGENPlugin_NETGEN_3D::Evaluate(SMESH_Mesh& aMesh,
583 const TopoDS_Shape& aShape,
584 MapShapeNbElems& aResMap)
586 int nbtri = 0, nbqua = 0;
587 double fullArea = 0.0;
588 for (TopExp_Explorer expF(aShape, TopAbs_FACE); expF.More(); expF.Next()) {
589 TopoDS_Face F = TopoDS::Face( expF.Current() );
590 SMESH_subMesh *sm = aMesh.GetSubMesh(F);
591 MapShapeNbElemsItr anIt = aResMap.find(sm);
592 if( anIt==aResMap.end() ) {
593 SMESH_ComputeErrorPtr& smError = sm->GetComputeError();
594 smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,"Submesh can not be evaluated",this));
597 std::vector<int> aVec = (*anIt).second;
598 nbtri += Max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
599 nbqua += Max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
601 BRepGProp::SurfaceProperties(F,G);
602 double anArea = G.Mass();
606 // collect info from edges
607 int nb0d_e = 0, nb1d_e = 0;
608 bool IsQuadratic = false;
610 TopTools_MapOfShape tmpMap;
611 for (TopExp_Explorer expF(aShape, TopAbs_EDGE); expF.More(); expF.Next()) {
612 TopoDS_Edge E = TopoDS::Edge(expF.Current());
613 if( tmpMap.Contains(E) )
616 SMESH_subMesh *aSubMesh = aMesh.GetSubMesh(expF.Current());
617 MapShapeNbElemsItr anIt = aResMap.find(aSubMesh);
618 if( anIt==aResMap.end() ) {
619 SMESH_ComputeErrorPtr& smError = aSubMesh->GetComputeError();
620 smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,
621 "Submesh can not be evaluated",this));
624 std::vector<int> aVec = (*anIt).second;
625 nb0d_e += aVec[SMDSEntity_Node];
626 nb1d_e += Max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
628 IsQuadratic = (aVec[SMDSEntity_Quad_Edge] > aVec[SMDSEntity_Edge]);
634 double ELen_face = sqrt(2.* ( fullArea/(nbtri+nbqua*2) ) / sqrt(3.0) );
635 double ELen_vol = pow( 72, 1/6. ) * pow( _maxElementVolume, 1/3. );
636 double ELen = Min(ELen_vol,ELen_face*2);
639 BRepGProp::VolumeProperties(aShape,G);
640 double aVolume = G.Mass();
641 double tetrVol = 0.1179*ELen*ELen*ELen;
642 double CoeffQuality = 0.9;
643 int nbVols = int( aVolume/tetrVol/CoeffQuality );
644 int nb1d_f = (nbtri*3 + nbqua*4 - nb1d_e) / 2;
645 int nb1d_in = (nbVols*6 - nb1d_e - nb1d_f ) / 5;
646 std::vector<int> aVec(SMDSEntity_Last);
647 for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i]=0;
649 aVec[SMDSEntity_Node] = nb1d_in/6 + 1 + nb1d_in;
650 aVec[SMDSEntity_Quad_Tetra] = nbVols - nbqua*2;
651 aVec[SMDSEntity_Quad_Pyramid] = nbqua;
654 aVec[SMDSEntity_Node] = nb1d_in/6 + 1;
655 aVec[SMDSEntity_Tetra] = nbVols - nbqua*2;
656 aVec[SMDSEntity_Pyramid] = nbqua;
658 SMESH_subMesh *sm = aMesh.GetSubMesh(aShape);
659 aResMap.insert(std::make_pair(sm,aVec));