]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
Tested mesh fast equivalence when giving an input field
authormichael <michael@localhost.localdomain>
Fri, 10 Dec 2021 13:32:36 +0000 (14:32 +0100)
committermichael <michael@localhost.localdomain>
Fri, 10 Dec 2021 13:32:36 +0000 (14:32 +0100)
CoreFlows/Models/inc/ProblemCoreFlows.hxx
CoreFlows/Models/src/ProblemCoreFlows.cxx

index 68585b8bfbb1532601a6e033d5c04d37298383c1..5c038cc8ef9ddc01ab568a4983c854aadda5003c 100755 (executable)
@@ -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
index 99f8ca9786cf579467632da77f30735596ac20be..6c35c630964c6f83e8b4f4d13fb21f802844a895 100755 (executable)
@@ -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;
+}