From: Christophe Bourcier Date: Wed, 6 Oct 2021 06:26:02 +0000 (+0200) Subject: Convert .mesh to .med in multithread as before. But don't create joints and xml files... X-Git-Tag: V9_8_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fcbr%2Ffix_tetrahpc_with_new_licence;p=plugins%2Fghs3dprlplugin.git Convert .mesh to .med in multithread as before. But don't create joints and xml files (useless since only one domain in multithread) --- diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx index db4f829..8c0f78d 100644 --- a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx +++ b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include "utilities.h" @@ -220,13 +221,13 @@ bool GHS3DPRLPlugin_GHS3DPRL::Compute(SMESH_Mesh& theMesh, SMESH_MesherHelper* /*theHelper*/) { bool Ok=false; - TCollection_AsciiString pluginerror("ghs3dprl: "); + TCollection_AsciiString pluginerror("MG-TETRA_HPC: "); SMESHDS_Mesh* meshDS = theMesh.GetMeshDS(); if ( theMesh.NbTriangles() == 0 ) return error( COMPERR_BAD_INPUT_MESH, "No triangles in the mesh" ); if (_hypothesis==NULL){ - pluginerror += "No existing parameters/hypothesis for GHS3DPRL"; + pluginerror += "No existing parameters/hypothesis for MG-TETRA_HPC"; cout <<"\n"< 0) - { - pluginerror = pluginerror + "PROBLEM tetrahpc2med command"; - cout< 0) + { + pluginerror = pluginerror + "PROBLEM tetrahpc2med command"; + cout< 0) + { + Ok = true; + pluginerror = pluginerror + "MG-tetra_hpc mesh not loaded in memory, is stored in file "+ resuMedFile; cout<0) std::cout<<"CreateMEDFile for all joints <"<\n"; + if (! for_multithread) + { + tmp=path+medname+tmp.sprintf("_joints.med"); + charendnull(distfilename,tmp,MED_COMMENT_SIZE); + fidjoint=MEDfileOpen(distfilename,MED_ACC_CREAT); + if (fidjoint<0) std::cerr<<"Problem MEDfileOpen "<0) std::cout<<"CreateMEDFile for all joints <"<\n"; + } //copy file source/GHS3DPRL_skin.med as destination/DOMAIN.skin.med tmp=path+medname+"_skin.med"; @@ -2084,8 +2087,9 @@ bool ghs3dprl_mesh_wrap::Write_MEDfiles_v2(bool /*deletekeys*/) } MEDfileClose(fid); //no error - //master.xml writings - /*oktmp=*/Write_masterxmlMEDfile(); + //master.xml writings if mpi mode + if (!for_multithread) + /*oktmp=*/Write_masterxmlMEDfile(); continue; //and loop on others domains erreur: //error @@ -2094,7 +2098,8 @@ bool ghs3dprl_mesh_wrap::Write_MEDfiles_v2(bool /*deletekeys*/) } - MEDfileClose(fidjoint); //no error + if (! for_multithread) + MEDfileClose(fidjoint); //no error if (verbose>0)std::cout<<"\nTotalNumberOftetrahedra="<