* \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)
* \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
_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;
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;
+}