From 58ca79c858e1151163fef7def2ae32334b6ce7f8 Mon Sep 17 00:00:00 2001 From: GERALD NICOLAS Date: Wed, 10 Feb 2021 14:41:44 +0100 Subject: [PATCH] =?utf8?q?contr=C3=B4le=20du=20nom=20du=20champ=20de=20la?= =?utf8?q?=20carte=20de=20taille?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/SMESH/MG_ADAPT.cxx | 44 ++++++++++++++++++++++++++++++++---------- src/SMESH/MG_ADAPT.hxx | 1 + 2 files changed, 35 insertions(+), 10 deletions(-) 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) ; }; -- 2.39.2