Salome HOME
23352: [CEA] Order and naming of meshing algorithms
[modules/smesh.git] / src / SMDS / SMDS_Mesh.cxx
index 6582e23f156cf269ea2239d2131d406fec87b328..95871d37af7bfc9a1282fe0a4fadd1014c0a8e81 100644 (file)
@@ -162,6 +162,17 @@ SMDS_Mesh::SMDS_Mesh():
   points->Delete();
   myGrid->BuildLinks();
   this->Modified();
+
+  // initialize static maps in SMDS_MeshCell, to be thread-safe
+  if ( myMeshId == 0 )
+  {
+    SMDS_MeshCell::toVtkType( SMDSEntity_Node );
+    SMDS_MeshCell::toVtkOrder( SMDSEntity_Node );
+    SMDS_MeshCell::reverseSmdsOrder( SMDSEntity_Node );
+    SMDS_MeshCell::interlacedSmdsOrder( SMDSEntity_Node );
+    SMDS_MeshCell::toSmdsType( VTK_VERTEX );
+    SMDS_MeshCell::fromVtkOrder( SMDSEntity_Node );
+  }
 }
 
 ///////////////////////////////////////////////////////////////////////////////