mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-11 00:41:56 -06:00
Remove misleading dummy ISAI config.
Added comment explaining a bit.
This commit is contained in:
parent
caca77dc67
commit
6834fafe15
@ -79,11 +79,11 @@ setupPropertyTree(FlowLinearSolverParameters p, // Note: copying the parameters
|
||||
return setupCPR(conf, p);
|
||||
}
|
||||
|
||||
if ((conf == "cprw")) {
|
||||
if ((conf == "cprw")) {
|
||||
if (!LinearSolverMaxIterSet) {
|
||||
// Use our own default unless it was explicitly overridden by user.
|
||||
p.linear_solver_maxiter_ = 20;
|
||||
}
|
||||
}
|
||||
return setupCPRW(conf, p);
|
||||
}
|
||||
|
||||
@ -96,9 +96,12 @@ setupPropertyTree(FlowLinearSolverParameters p, // Note: copying the parameters
|
||||
return setupILU(conf, p);
|
||||
}
|
||||
|
||||
// Same configuration as ILU0.
|
||||
// At this point, the only separate ISAI implementation is with the OpenCL code, and
|
||||
// it will check this argument to see if it should be using ISAI. The parameter tree
|
||||
// will be ignored, so this is just a dummy configuration to avoid the throw below.
|
||||
// If we are using CPU dune-istl solvers, this will just make "isai" an alias of "ilu".
|
||||
if (conf == "isai") {
|
||||
return setupISAI(conf, p);
|
||||
return setupILU(conf, p);
|
||||
}
|
||||
|
||||
// No valid configuration option found.
|
||||
@ -248,20 +251,4 @@ setupILU([[maybe_unused]] const std::string& conf, const FlowLinearSolverParamet
|
||||
}
|
||||
|
||||
|
||||
PropertyTree
|
||||
setupISAI([[maybe_unused]] const std::string& conf, const FlowLinearSolverParameters& p)
|
||||
{
|
||||
using namespace std::string_literals;
|
||||
PropertyTree prm;
|
||||
prm.put("tol", p.linear_solver_reduction_);
|
||||
prm.put("maxiter", p.linear_solver_maxiter_);
|
||||
prm.put("verbosity", p.linear_solver_verbosity_);
|
||||
prm.put("solver", "bicgstab"s);
|
||||
prm.put("preconditioner.type", "ParOverILU0"s);
|
||||
prm.put("preconditioner.relaxation", p.ilu_relaxation_);
|
||||
prm.put("preconditioner.ilulevel", p.ilu_fillin_level_);
|
||||
return prm;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -33,11 +33,10 @@ PropertyTree setupPropertyTree(FlowLinearSolverParameters p,
|
||||
bool LinearSolverMaxIterSet,
|
||||
bool CprMaxEllIterSet);
|
||||
|
||||
PropertyTree setupCPRW(const std::string& conf, const FlowLinearSolverParameters& p);
|
||||
PropertyTree setupCPRW(const std::string& conf, const FlowLinearSolverParameters& p);
|
||||
PropertyTree setupCPR(const std::string& conf, const FlowLinearSolverParameters& p);
|
||||
PropertyTree setupAMG(const std::string& conf, const FlowLinearSolverParameters& p);
|
||||
PropertyTree setupILU(const std::string& conf, const FlowLinearSolverParameters& p);
|
||||
PropertyTree setupISAI(const std::string& conf, const FlowLinearSolverParameters& p);
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user