From: michael Date: Fri, 10 Dec 2021 13:32:36 +0000 (+0100) Subject: Tested mesh fast equivalence when giving an input field X-Git-Tag: V9_8_0~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3f1042c24dcc40a0ced3232ef2707aa7761030e7;p=tools%2Fsolverlab.git Tested mesh fast equivalence when giving an input field --- diff --git a/CoreFlows/Models/inc/ProblemCoreFlows.hxx b/CoreFlows/Models/inc/ProblemCoreFlows.hxx index 68585b8..5c038cc 100755 --- a/CoreFlows/Models/inc/ProblemCoreFlows.hxx +++ b/CoreFlows/Models/inc/ProblemCoreFlows.hxx @@ -665,12 +665,7 @@ public : * \param [in] Field * \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 - } + void setHeatPowerField(Field heatPower); /** \fn setHeatPowerField * \brief set the heat power field (variable in space) @@ -679,12 +674,7 @@ public : * \param [in] string fieldName * \param [out] void * */ - 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 - } + void setHeatPowerField(string fileName, string fieldName, int iteration = 0, int order = 0, int meshLevel=0); /** \fn setHeatSource * \brief sets a constant heat power field diff --git a/CoreFlows/Models/src/ProblemCoreFlows.cxx b/CoreFlows/Models/src/ProblemCoreFlows.cxx index 99f8ca9..6c35c63 100755 --- a/CoreFlows/Models/src/ProblemCoreFlows.cxx +++ b/CoreFlows/Models/src/ProblemCoreFlows.cxx @@ -91,10 +91,7 @@ ProblemCoreFlows::ProblemCoreFlows(MPI_Comm comm) _maxNewtonIts=50; _PetscIts=0;//the number of iterations of the linear solver _ksptype = (char*)&KSPGMRES; - if( _mpi_size>1) - _pctype = (char*)&PCNONE; - else - _pctype = (char*)&PCLU; + _pctype = (char*)&PCILU; /* Physical parameters */ _heatPowerFieldSet=false; @@ -793,3 +790,23 @@ ProblemCoreFlows::isMEDCoupling64Bits() const return false; #endif }; + +void +ProblemCoreFlows::setHeatPowerField(Field heatPower){ + if(!_initialDataSet) + throw CdmathException("!!!!!!!! ProblemCoreFlows::setHeatPowerField set initial field first"); + + heatPower.getMesh().checkFastEquivalWith(_mesh); + _heatPowerField=heatPower; + _heatPowerFieldSet=true; +} + +void +ProblemCoreFlows::setHeatPowerField(string fileName, string fieldName, int iteration, int order, int meshLevel){ + if(!_initialDataSet) + throw CdmathException("!!!!!!!! ProblemCoreFlows::setHeatPowerField set initial field first"); + + _heatPowerField=Field(fileName, CELLS,fieldName, iteration, order, meshLevel); + _heatPowerField.getMesh().checkFastEquivalWith(_mesh); + _heatPowerFieldSet=true; +}