From: michael Date: Wed, 24 Nov 2021 15:09:49 +0000 (+0100) Subject: Check mesh equivalence when setting input fields X-Git-Tag: V9_8_0~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b7641aa5e706c49bb01006d6cdb83d0167e2c19b;p=tools%2Fsolverlab.git Check mesh equivalence when setting input fields --- diff --git a/CoreFlows/Models/inc/DiffusionEquation.hxx b/CoreFlows/Models/inc/DiffusionEquation.hxx index 001f23c..ec2692c 100755 --- a/CoreFlows/Models/inc/DiffusionEquation.hxx +++ b/CoreFlows/Models/inc/DiffusionEquation.hxx @@ -107,6 +107,7 @@ public : void setInputField(const string& nameField, Field& inputField );//supply of a required input field void setFluidTemperatureField(Field coupledTemperatureField){ + coupledTemperatureField.getMesh().checkFastEquivalWith(_mesh); _fluidTemperatureField=coupledTemperatureField; _fluidTemperatureFieldSet=true; }; diff --git a/CoreFlows/Models/inc/ProblemCoreFlows.hxx b/CoreFlows/Models/inc/ProblemCoreFlows.hxx index 6ec3c60..19342ea 100755 --- a/CoreFlows/Models/inc/ProblemCoreFlows.hxx +++ b/CoreFlows/Models/inc/ProblemCoreFlows.hxx @@ -666,6 +666,7 @@ public : * \param [out] void * */ void setHeatPowerField(Field heatPower){ + heatPower.getMesh().checkFastEquivalWith(_mesh); _heatPowerField=heatPower; _heatPowerFieldSet=true; _isStationary=false;//Source term may be changed after previously reaching a stationary state @@ -678,8 +679,9 @@ public : * \param [in] string fieldName * \param [out] void * */ - void setHeatPowerField(string fileName, string fieldName){ - _heatPowerField=Field(fileName, CELLS,fieldName); + void setHeatPowerField(string fileName, string fieldName, int iteration = 0, int order = 0, int meshLevel=0){ + _heatPowerField=Field(fileName, CELLS,fieldName, iteration, order, meshLevel); + _heatPowerField.getMesh().checkFastEquivalWith(_mesh); _heatPowerFieldSet=true; _isStationary=false;//Source term may be changed after previously reaching a stationary state } diff --git a/CoreFlows/Models/inc/ProblemFluid.hxx b/CoreFlows/Models/inc/ProblemFluid.hxx index 0858618..79f1a8f 100755 --- a/CoreFlows/Models/inc/ProblemFluid.hxx +++ b/CoreFlows/Models/inc/ProblemFluid.hxx @@ -363,6 +363,7 @@ public : * @param [in] Field porosity field (field on CELLS) * */ void setPorosityField(Field Porosity){ + Porosity.getMesh().checkFastEquivalWith(_mesh); _porosityField=Porosity; _porosityFieldSet=true; } @@ -384,6 +385,7 @@ public : * */ void setPorosityField(string fileName, string fieldName){ _porosityField=Field(fileName, CELLS,fieldName); + _porosityField.getMesh().checkFastEquivalWith(_mesh); _porosityFieldSet=true; } @@ -392,6 +394,7 @@ public : * @param [in] Field pressure loss field (field on FACES) * */ void setPressureLossField(Field PressureLoss){ + PressureLoss.getMesh().checkFastEquivalWith(_mesh); _pressureLossField=PressureLoss; _pressureLossFieldSet=true; } @@ -404,6 +407,7 @@ public : * */ void setPressureLossField(string fileName, string fieldName){ _pressureLossField=Field(fileName, FACES,fieldName); + _pressureLossField.getMesh().checkFastEquivalWith(_mesh); _pressureLossFieldSet=true; } @@ -412,6 +416,7 @@ public : * @param [in] Field cross section field (field on CELLS) * */ void setSectionField(Field sectionField){ + sectionField.getMesh().checkFastEquivalWith(_mesh); _sectionField=sectionField; _sectionFieldSet=true; } @@ -424,6 +429,7 @@ public : * */ void setSectionField(string fileName, string fieldName){ _sectionField=Field(fileName, CELLS,fieldName); + _sectionField.getMesh().checkFastEquivalWith(_mesh); _sectionFieldSet=true; } diff --git a/CoreFlows/Models/inc/StationaryDiffusionEquation.hxx b/CoreFlows/Models/inc/StationaryDiffusionEquation.hxx index b47aa6b..008afe4 100755 --- a/CoreFlows/Models/inc/StationaryDiffusionEquation.hxx +++ b/CoreFlows/Models/inc/StationaryDiffusionEquation.hxx @@ -131,6 +131,7 @@ public : * \param [out] void * */ void setHeatPowerField(Field heatPower){ + heatPower.getMesh().checkFastEquivalWith(_mesh); _heatPowerField=heatPower; _heatPowerFieldSet=true; } @@ -142,8 +143,9 @@ public : * \param [in] string fieldName * \param [out] void * */ - void setHeatPowerField(string fileName, string fieldName){ - _heatPowerField=Field(fileName, CELLS,fieldName); + void setHeatPowerField(string fileName, string fieldName, int iteration = 0, int order = 0, int meshLevel=0){ + _heatPowerField=Field(fileName, CELLS,fieldName, iteration, order, meshLevel); + _heatPowerField.getMesh().checkFastEquivalWith(_mesh); _heatPowerFieldSet=true; } diff --git a/CoreFlows/Models/inc/TransportEquation.hxx b/CoreFlows/Models/inc/TransportEquation.hxx index 94f01c0..e1f2b9a 100755 --- a/CoreFlows/Models/inc/TransportEquation.hxx +++ b/CoreFlows/Models/inc/TransportEquation.hxx @@ -137,6 +137,7 @@ public : * \param [out] void * */ void setRodTemperatureField(Field rodTemperature){ + rodTemperature.getMesh().checkFastEquivalWith(_mesh); _rodTemperatureField=rodTemperature; _rodTemperatureFieldSet=true; _isStationary=false;//Source term may be changed after previously reaching a stationary state