X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FMG_ADAPT.cxx;h=3a1f568326fa1899737d915d267b26bf5912bc29;hb=2e6d41859930a694e6df9302898e9fab77809428;hp=ce0bbeeab570496794415d7b943b2ac1dc73e15c;hpb=abe3e0bbe9a83c7b07818571dc949d87c2fd0f4a;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/MG_ADAPT.cxx b/src/SMESHGUI/MG_ADAPT.cxx index ce0bbeeab..3a1f56832 100644 --- a/src/SMESHGUI/MG_ADAPT.cxx +++ b/src/SMESHGUI/MG_ADAPT.cxx @@ -17,7 +17,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ // file : MG_ADAPT.cxx #include "MG_ADAPT.hxx" @@ -35,9 +35,9 @@ #include #include #include +#include #include - static std::string removeFile(std::string fileName, int& notOk) { std::string errStr; @@ -1105,7 +1105,7 @@ void MgAdapt::convertMedFile(std::string& meshFormatMeshFileName, std::string& s { std::vector fieldFileNames; - MeshFormatWriter writer; + MEDCoupling::MeshFormatWriter writer; MEDCoupling::MCAuto mfd = MEDCoupling::MEDFileData::New(medFileIn); MEDCoupling::MEDFileMeshes* meshes = mfd->getMeshes(); MEDCoupling::MEDFileMesh* fileMesh = meshes->getMeshAtPos(0); // ok only one mesh in file! @@ -1159,7 +1159,7 @@ void MgAdapt::convertMedFile(std::string& meshFormatMeshFileName, std::string& s void MgAdapt::convertMeshFile(std::string& meshFormatIn, std::vector< std::string>& solFieldFileNames) const { - MeshFormatReader reader(meshFormatIn, solFieldFileNames); + MEDCoupling::MeshFormatReader reader(meshFormatIn, solFieldFileNames); MEDCoupling::MCAuto mfd = reader.loadInMedFileDS(); // write MED @@ -1226,7 +1226,8 @@ void MgAdapt::restorefams(MEDCoupling::MEDFileMesh* fileMesh) const { try // safety : FAMILY could be lost P2-->P1 { - std::string givenFamNameFromMeshGemConverter = fileMesh->getFamilyNameGivenId( fIt->_famId ); + std::string givenFamNameFromMeshGemConverter = fileMesh->getFamilyNameGivenId( std::abs(fIt->_famId) ); + fileMesh->changeFamilyId(std::abs(fIt->_famId), fIt->_famId); fileMesh->changeFamilyName(givenFamNameFromMeshGemConverter, fIt->_famName); } catch (const std::exception& e) @@ -1279,7 +1280,7 @@ void MgAdapt::buildBackGroundMeshAndSolFiles(const std::vector& fie tmpMfd->setFields( tmp_fields ); - MeshFormatWriter tmpWriter; + MEDCoupling::MeshFormatWriter tmpWriter; tmpWriter.setMeshFileName(meshFormatsizeMapFile); tmpWriter.setFieldFileNames( fieldFileNames); tmpWriter.setMEDFileDS(tmpMfd);