Salome HOME
Some code factoring
[tools/solverlab.git] / CoreFlows / Models / inc / ProblemCoreFlows.hxx
index 19342ea8e57414d38735e9e5f22b73e362117899..ee2245e6308230a4b484444e59f5c5a6193ac635 100755 (executable)
@@ -86,6 +86,14 @@ enum TimeScheme
        Implicit/**< Implicit numerical scheme */
 };
 
+//! enumeration pressureEstimate
+/*! the pressure estimate needed to fit physical parameters  */
+enum pressureEstimate
+{
+       around1bar300K,/**< pressure is around 1 bar and temperature around 300K (for TransportEquation, SinglePhase and IsothermalTwoFluid) or 373 K (saturation for DriftModel and FiveEqsTwoFluid) */
+       around155bars600K/**< pressure is around 155 bars  and temperature around 618 K (saturation) */
+};
+
 class ProblemCoreFlows
 {
 public :
@@ -352,7 +360,7 @@ public :
         * \param [in] int : int corresponding to the enum CELLS, NODES or FACES
         * \param [out] void
         *  */
-       void setInitialField(string fileName, string fieldName, int timeStepNumber, int field_support_type);
+       void setInitialField(string fileName, string fieldName, int timeStepNumber, int order, int meshLevel, int field_support_type);
 
        /** \fn setInitialField
         * \brief sets the initial field from a field in a med file
@@ -363,7 +371,7 @@ public :
         * \param [in] EntityType : CELLS, NODES or FACES
         * \param [out] void
         *  */
-       void setInitialField(string fileName, string fieldName, int timeStepNumber, EntityType typeField = CELLS);
+       void setInitialField(string fileName, string fieldName, int timeStepNumber, int order = 0, int meshLevel=0, EntityType typeField = CELLS);
 
        /** \fn setInitialFieldConstant
         * \brief sets a constant initial field on a mesh stored in a med file
@@ -665,12 +673,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 +682,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
@@ -799,6 +797,10 @@ protected :
        Vec _b;//Linear system right hand side
        double _MaxIterLinearSolver;//nombre maximum d'iteration gmres obtenu au cours par les resolution de systemes lineaires au cours d'un pas de tmeps
        bool _conditionNumber;//computes an estimate of the condition number
+       /** \fn createKSP
+        * \brief Create PETSc solver and preconditioner structures
+        *  */
+       void createKSP();
 
        //simulation monitoring variables
        bool _isStationary;