mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Adds BISAI preconditioner to openclSolver
This commit is contained in:
@@ -84,10 +84,15 @@ setupPropertyTree(FlowLinearSolverParameters p, // Note: copying the parameters
|
||||
return setupILU(conf, p);
|
||||
}
|
||||
|
||||
// Same configuration as ILU0.
|
||||
if (conf == "isai") {
|
||||
return setupISAI(conf, p);
|
||||
}
|
||||
|
||||
// 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, or cpr_quasiimpes");
|
||||
<< " Please use ilu0, cpr, cpr_trueimpes, cpr_quasiimpes or isai");
|
||||
}
|
||||
|
||||
PropertyTree
|
||||
@@ -187,5 +192,20 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user