return m0_1->isEqual(m0_2, 1e-12);
}
+std::string getMeshName(std::string mesh_file){
+ std::unique_ptr<MEDFileUMesh> myMedMesh=MEDFileUMesh::New(mesh_file);
+
+ return myMedMesh->getLevel0Mesh()->getName();
+}
+
/**
* @brief Import a mesh from a mesh file (MED) into a SMESH_Mesh object
*
*
* @return error code
*/
-int importMesh(const std::string mesh_file, SMESH_Mesh& aMesh, const std::string mesh_name){
+int importMesh(const std::string mesh_file, SMESH_Mesh& aMesh){
// TODO: change that as it depends on the language
- std::cout << "Importing mesh from " << mesh_file << std::endl;
+ std::string mesh_name = getMeshName(mesh_file);
+ std::cout << "Importing mesh from " << mesh_file << " mesh " << mesh_name2 << std::endl;
int ret = aMesh.MEDToMesh(mesh_file.c_str(), mesh_name.c_str());
return ret;
}
const std::string mesh_file2,
const std::string mesh_name);
int importMesh(const std::string mesh_file,
- SMESH_Mesh& aMesh,
- const std::string meshName);
+ SMESH_Mesh& aMesh);
int exportMesh(const std::string mesh_file,
SMESH_Mesh& aMesh,
const std::string meshName);
if(file_name != "")
{
fs::path mesh_file = fs::path(aMesh.tmp_folder) / fs::path(file_name);
- // TODO: change mesh name
- exportMesh(mesh_file.string(), aMesh, "Maillage_1");
+ exportMesh(mesh_file.string(), aMesh, "MESH");
}
//Resetting threaded pool info