Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[bos #40653][CEA] New mesh import export formats with meshio.
[modules/smesh.git]
/
src
/
SMESH
/
SMESH_Gen.cxx
diff --git
a/src/SMESH/SMESH_Gen.cxx
b/src/SMESH/SMESH_Gen.cxx
index f5bff50586aeb53f7ce890c0fba4c79e5857f2e4..8b042cf00f2451808deda9a27c9e0ef257f0230b 100644
(file)
--- a/
src/SMESH/SMESH_Gen.cxx
+++ b/
src/SMESH/SMESH_Gen.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-202
3
CEA, EDF, OPEN CASCADE
+// Copyright (C) 2007-202
4
CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-301,6
+301,7
@@
const std::function<void(SMESH_subMesh*,
void SMESH_Gen::send_mesh(SMESH_Mesh& aMesh, std::string file_name)
{
void SMESH_Gen::send_mesh(SMESH_Mesh& aMesh, std::string file_name)
{
+#ifndef WIN32
SMESH_ParallelMesh& aParMesh = dynamic_cast<SMESH_ParallelMesh&>(aMesh);
// Calling run_mesher
// Path to mesher script
SMESH_ParallelMesh& aParMesh = dynamic_cast<SMESH_ParallelMesh&>(aMesh);
// Calling run_mesher
// Path to mesher script
@@
-351,6
+352,7
@@
void SMESH_Gen::send_mesh(SMESH_Mesh& aMesh, std::string file_name)
msg += cmd + "\n";
throw SALOME_Exception(msg);
}
msg += cmd + "\n";
throw SALOME_Exception(msg);
}
+#endif
}
//=============================================================================
}
//=============================================================================
@@
-392,7
+394,7
@@
bool SMESH_Gen::parallelComputeSubMeshes(
// do not mesh vertices of a pseudo shape
const TopoDS_Shape& shape = smToCompute->GetSubShape();
const TopAbs_ShapeEnum shapeType = shape.ShapeType();
// do not mesh vertices of a pseudo shape
const TopoDS_Shape& shape = smToCompute->GetSubShape();
const TopAbs_ShapeEnum shapeType = shape.ShapeType();
- // Not doing in parallel 1D
and 2D
meshes
+ // Not doing in parallel 1D meshes
if ( !aMesh.HasShapeToMesh() && shapeType == TopAbs_VERTEX )
continue;
if ( !aMesh.HasShapeToMesh() && shapeType == TopAbs_VERTEX )
continue;
@@
-400,22
+402,10
@@
bool SMESH_Gen::parallelComputeSubMeshes(
// Waiting for all threads for the previous type to end
aMesh.wait();
// Waiting for all threads for the previous type to end
aMesh.wait();
- std::string file_name;
- switch(previousShapeType){
- case TopAbs_FACE:
- file_name = "Mesh2D.med";
- break;
- //case TopAbs_EDGE:
- // file_name = "Mesh1D.med";
- // break;
- //case TopAbs_VERTEX:
- // file_name = "Mesh0D.med";
- // break;
- case TopAbs_SOLID:
- default:
- file_name = "";
- break;
- }
+ std::string file_name="";
+ if (previousShapeType == aParMesh.GetDumpElement())
+ file_name = "Mesh"+std::to_string(aParMesh.GetParallelismDimension()-1)+"D.med";
+
if(file_name != "")
{
fs::path mesh_file = fs::path(aParMesh.GetTmpFolder()) / fs::path(file_name);
if(file_name != "")
{
fs::path mesh_file = fs::path(aParMesh.GetTmpFolder()) / fs::path(file_name);
@@
-437,7
+427,7
@@
bool SMESH_Gen::parallelComputeSubMeshes(
continue;
}
// Parallelism is only for 3D parts
continue;
}
// Parallelism is only for 3D parts
- if(shapeType!=
TopAbs_SOLID
){
+ if(shapeType!=
aMesh.GetParallelElement()
){
compute_function(smToCompute, computeEvent,
shapeSM, aShapeOnly, allowedSubShapes,
aShapesId);
compute_function(smToCompute, computeEvent,
shapeSM, aShapeOnly, allowedSubShapes,
aShapesId);
@@
-453,6
+443,9
@@
bool SMESH_Gen::parallelComputeSubMeshes(
aMesh.GetMeshDS()->Modified();
aMesh.GetMeshDS()->Modified();
+ // Cleanup done here as in Python the destructor is not called
+ aParMesh.cleanup();
+
return ret;
#endif
};
return ret;
#endif
};