int _PetscIts=0;//the number of iterations of the linear solver
_ksptype = (char*)&KSPGMRES;
_pctype = (char*)&PCLU;
+ _nonLinearSolver = Newton_SOLVERLAB;
_heatPowerFieldSet=false;
_heatTransfertCoeff=0;
_rodTemperatureFieldSet=false;
void ProblemCoreFlows::setInitialFieldConstant(string fileName, const vector<double> Vconstant)
{
Mesh M(fileName);
- Field VV("Primitive", CELLS, M, Vconstant.size());
+ Field VV("SOLVERLAB results", CELLS, M, Vconstant.size());
for (int j = 0; j < M.getNumberOfCells(); j++) {
for (int i=0; i< VV.getNumberOfComponents(); i++)
}
void ProblemCoreFlows:: setInitialFieldConstant(const Mesh& M, const Vector Vconstant)
{
- Field VV("Primitive", CELLS, M, Vconstant.getNumberOfRows());
+ Field VV("SOLVERLAB results", CELLS, M, Vconstant.getNumberOfRows());
for (int j = 0; j < M.getNumberOfCells(); j++) {
for (int i=0; i< VV.getNumberOfComponents(); i++)
}
void ProblemCoreFlows:: setInitialFieldConstant(const Mesh& M, const vector<double> Vconstant)
{
- Field VV("Primitive", CELLS, M, Vconstant.size());
+ Field VV("SOLVERLAB results", CELLS, M, Vconstant.size());
for (int j = 0; j < M.getNumberOfCells(); j++) {
for (int i=0; i< VV.getNumberOfComponents(); i++)
_runLogFile->close();
throw CdmathException( "ProblemCoreFlows::setStepFunctionInitialField: Vectors VV_Left and VV_Right have different sizes");
}
- Field VV("Primitive", CELLS, M, VV_Left.getNumberOfRows());
+ Field VV("SOLVERLAB results", CELLS, M, VV_Left.getNumberOfRows());
double component_value;
}
}
+void ProblemCoreFlows::setNewtonSolver(double precision, int iterations, nonLinearSolver solverName)
+{
+ _maxNewtonIts=iterations;
+ _precision_Newton=precision;
+ _nonLinearSolver=solverName;
+}
+
+
// Description:
// Cette methode lance une execution du ProblemCoreFlows
// Elle peut etre utilisee si le probleme n'est couple a aucun autre.
void ProblemCoreFlows::setFreqSave(int freqSave){
_freqSave = freqSave;
}
+
bool ProblemCoreFlows::solveTimeStep(){
_NEWTON_its=0;
bool converged=false, ok=true;
return my_eigenfield;
}
+
+std::vector< double >
+ProblemCoreFlows::getSingularValues( int nsv, SVDWhich which, double tol) const
+{
+ SparseMatrixPetsc A = SparseMatrixPetsc(_A);
+ return A.getSingularValues( nsv, which, tol);
+}
+std::vector< Vector >
+ProblemCoreFlows::getSingularVectors(int nsv, SVDWhich which, double tol) const
+{
+ SparseMatrixPetsc A = SparseMatrixPetsc(_A);
+ return A.getSingularVectors( nsv, which, tol);
+}
+
+Field
+ProblemCoreFlows::getUnknownField() const
+{
+ if(!_initializedMemory)
+ {
+ _runLogFile->close();
+ throw CdmathException("ProblemCoreFlows::getUnknownField() call initialize() first");
+ }
+ return _VV;
+}