mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add DILU preconditioner
This commit is contained in:
@@ -96,6 +96,10 @@ setupPropertyTree(FlowLinearSolverParameters p, // Note: copying the parameters
|
||||
return setupILU(conf, p);
|
||||
}
|
||||
|
||||
if (conf == "dilu") {
|
||||
return setupDILU(conf, p);
|
||||
}
|
||||
|
||||
if (conf == "umfpack") {
|
||||
return setupUMFPack(conf, p);
|
||||
}
|
||||
@@ -111,7 +115,7 @@ setupPropertyTree(FlowLinearSolverParameters p, // Note: copying the parameters
|
||||
// No valid configuration option found.
|
||||
OPM_THROW(std::invalid_argument,
|
||||
conf + " is not a valid setting for --linear-solver-configuration."
|
||||
" Please use ilu0, cpr, cpr_trueimpes, cpr_quasiimpes or isai");
|
||||
" Please use ilu0, dilu, cpr, cpr_trueimpes, cpr_quasiimpes or isai");
|
||||
}
|
||||
|
||||
std::string getSolverString(const FlowLinearSolverParameters& p)
|
||||
@@ -266,6 +270,19 @@ setupILU([[maybe_unused]] const std::string& conf, const FlowLinearSolverParamet
|
||||
return prm;
|
||||
}
|
||||
|
||||
PropertyTree
|
||||
setupDILU([[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", getSolverString(p));
|
||||
prm.put("preconditioner.type", "DILU"s);
|
||||
return prm;
|
||||
}
|
||||
|
||||
|
||||
PropertyTree
|
||||
setupUMFPack([[maybe_unused]] const std::string& conf, const FlowLinearSolverParameters& p)
|
||||
|
||||
Reference in New Issue
Block a user