From: GERALD NICOLAS Date: Wed, 10 Feb 2021 13:41:44 +0000 (+0100) Subject: contrĂ´le du nom du champ de la carte de taille X-Git-Tag: V9_7_0a1~18^2~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=58ca79c858e1151163fef7def2ae32334b6ce7f8;p=modules%2Fsmesh.git contrĂ´le du nom du champ de la carte de taille --- diff --git a/src/SMESH/MG_ADAPT.cxx b/src/SMESH/MG_ADAPT.cxx index 76934c6a7..e73758b5d 100644 --- a/src/SMESH/MG_ADAPT.cxx +++ b/src/SMESH/MG_ADAPT.cxx @@ -1152,9 +1152,33 @@ void MgAdapt::copyMgAdaptHypothesisData( const MgAdaptHypothesisData* from) data->myVerboseLevel = from->myVerboseLevel; } +bool MgAdapt::checkFieldName(std::string fileIn) +{ + bool ret = false ; + MEDCoupling::MCAuto mfd = MEDCoupling::MEDFileData::New(fileIn); + std::vector fieldNames(mfd->getFields()->getFieldsNames()); + std::size_t jaux(fieldNames.size()); + for(std::size_t j=0;j mfd = MEDCoupling::MEDFileData::New(fileIn); MEDCoupling::MCAuto fts = dynamic_cast( mfd->getFields()->getFieldWithName(fieldName) ); @@ -1165,19 +1189,15 @@ bool MgAdapt::checkTimeStepRank(std::string fileIn) std::size_t jaux(timesteprank.size()); for(std::size_t j=0;j fts = dynamic_cast( mfd->getFields()->getFieldWithName(fieldName) ); MEDCoupling::MCAuto f = fts->getTimeStep(timeStep, rank); MEDCoupling::MCAuto tmFts = MEDCoupling::MEDFileFieldMultiTS::New(); diff --git a/src/SMESH/MG_ADAPT.hxx b/src/SMESH/MG_ADAPT.hxx index 0684c2838..be289729a 100644 --- a/src/SMESH/MG_ADAPT.hxx +++ b/src/SMESH/MG_ADAPT.hxx @@ -328,6 +328,7 @@ private : void execCmd( const char* cmd, int& err); void cleanUp(); void appendMsgToLogFile(std::string& msg); + bool checkFieldName(std::string fileIn) ; bool checkTimeStepRank(std::string fileIn) ; };