From 4cd6311d740e3b2e7fea4b760975087ad79a70dd Mon Sep 17 00:00:00 2001 From: azakir Date: Fri, 15 Jan 2021 12:03:28 +0100 Subject: [PATCH] little corrections --- idl/MG_ADAPT.idl | 23 ++++++++++++++++------- idl/SMESH_Gen.idl | 3 +++ src/SMESH/MG_ADAPT.cxx | 9 +++++---- src/SMESH_I/MG_ADAPT_i.cxx | 1 + 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/idl/MG_ADAPT.idl b/idl/MG_ADAPT.idl index 8cad0d628..3a593fde7 100644 --- a/idl/MG_ADAPT.idl +++ b/idl/MG_ADAPT.idl @@ -71,13 +71,13 @@ module SMESH{ void setPublish(in boolean b); boolean getPublish(); - void setFieldName(in string s); - string getFieldName(); + void setSizeMapFieldName(in string s); + string getSizeMapFieldName(); void setTimeStep(in long s); long getTimeStep() ; - void setRankTimeStep(in long s, in long f); + void setTimeStepRank(in long s, in long f); long getRank(); void setTimeStepRankLast(); @@ -103,8 +103,8 @@ module SMESH{ void setUseConstantValue(in boolean f); boolean getUseConstantValue(); - void setConstantValue(in double f); - double getConstantValue() ; + void setConstantSize(in double f); + double getConstantSize() ; void setSizeMapFile(in string f); string getSizeMapFile(); @@ -121,7 +121,7 @@ module SMESH{ void setWorkingDir(in string f); string getWorkingDir() ; - + void setSizeMapType(in string f); boolean setAll(); string getCommandToRun() ; //long compute(out string errStr); @@ -143,7 +143,16 @@ module SMESH{ str_array getCustomOptionValuesStrVec() ; str_array getOptionValuesStrVec() ; }; - + typedef MG_ADAPT MG_ADAPT_HYPOTHESIS; + interface MG_ADAPT_OBJECT : SALOME::GenericObj + { + void setMeshIn(in SMESH_Mesh theMesh ); + void setMEDFileIn(in string f); + void setMEDFileOut(in string f); + void setMEDFileBackground(in string f); + void AddHypothesis(in MG_ADAPT mg); + long Compute(in boolean Publish); + }; }; #endif // MG_ADAPT_IDL diff --git a/idl/SMESH_Gen.idl b/idl/SMESH_Gen.idl index 56901f5f9..52295a43b 100644 --- a/idl/SMESH_Gen.idl +++ b/idl/SMESH_Gen.idl @@ -44,6 +44,7 @@ module SMESH interface SMESH_Pattern; interface Measurements; interface MG_ADAPT; + interface MG_ADAPT_OBJECT; /*! * Tags definition @@ -586,6 +587,8 @@ module SMESH MG_ADAPT CreateMG_ADAPT(); + MG_ADAPT_OBJECT Adaptation(in string adaptType); + MG_ADAPT CreateAdaptationHypothesis(); }; }; diff --git a/src/SMESH/MG_ADAPT.cxx b/src/SMESH/MG_ADAPT.cxx index 688c5da2c..c3cba43ac 100644 --- a/src/SMESH/MG_ADAPT.cxx +++ b/src/SMESH/MG_ADAPT.cxx @@ -1426,17 +1426,18 @@ void MgAdapt::getTimeStepInfos(std::string aFile, med_int& numdt, med_int& numit void MgAdapt::updateTimeStepRank() { - med_int arank = rank; - med_int tmst = timeStep; + med_int arank; + med_int tmst; if (myUseNoTimeStep) { - rank = MED_NO_IT; + arank = MED_NO_IT; tmst = MED_NO_DT ; + setRankTimeStep((int)tmst, (int)arank); } else if (myUseLastTimeStep) { std::string fieldFile = useBackgroundMap ? sizeMapFile : medFileIn; getTimeStepInfos(fieldFile, tmst, arank); + setRankTimeStep((int)tmst, (int)arank); } - setRankTimeStep((int)tmst, (int)arank); } diff --git a/src/SMESH_I/MG_ADAPT_i.cxx b/src/SMESH_I/MG_ADAPT_i.cxx index 71c3ef21e..04ff3daaa 100644 --- a/src/SMESH_I/MG_ADAPT_i.cxx +++ b/src/SMESH_I/MG_ADAPT_i.cxx @@ -246,6 +246,7 @@ CORBA::Long MG_ADAPT_i::getTimeStep() } void MG_ADAPT_i::setTimeStepRank(CORBA::Long t, CORBA::Long r) { + myMgAdapt->setChosenTimeStepRank(); myMgAdapt->setRankTimeStep(t, r); } CORBA::Long MG_ADAPT_i::getRank() -- 2.39.2