Merge pull request #2625 from blattms/modify-cpr-defaults

Modify cpr defaults (for better performance)
This commit is contained in:
Markus Blatt 2020-05-15 14:07:36 +02:00 committed by GitHub
commit e812eb132a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ setupPropertyTree(const FlowLinearSolverParameters& p)
// Support old UseCpr if not configuration was set
if (!EWOMS_PARAM_IS_SET(TypeTag, std::string, LinearSolverConfiguration) && p.use_cpr_)
{
conf = "cpr_quasiimpes";
conf = "cpr_trueimpes";
}
if((conf == "cpr_trueimpes") || (conf == "cpr_quasiimpes")){
@ -92,7 +92,8 @@ setupPropertyTree(const FlowLinearSolverParameters& p)
prm.put("preconditioner.coarsesolver.preconditioner.relaxation",1.0);
if (EWOMS_PARAM_IS_SET(TypeTag, int, CprMaxEllIter))
prm.put("preconditioner.coarsesolver.preconditioner.iterations", p.cpr_max_ell_iter_);
prm.put("preconditioner.coarsesolver.preconditioner.iterations",1);
else
prm.put("preconditioner.coarsesolver.preconditioner.iterations",1);
prm.put("preconditioner.coarsesolver.preconditioner.coarsenTarget",1200);
prm.put("preconditioner.coarsesolver.preconditioner.pre_smooth",1);
prm.put("preconditioner.coarsesolver.preconditioner.post_smooth",1);
@ -101,9 +102,6 @@ setupPropertyTree(const FlowLinearSolverParameters& p)
prm.put("preconditioner.coarsesolver.preconditioner.verbosity",0);
prm.put("preconditioner.coarsesolver.preconditioner.maxlevel",15);
prm.put("preconditioner.coarsesolver.preconditioner.skip_isolated",0);
if(p.linear_solver_configuration_ == "cpr_trueimpes"){
prm.put("preconditioner.weight_type","trueimpes");
}
} else {
if(conf != "ilu0"){
OPM_THROW(std::invalid_argument, conf << "is not a valid setting for --linear-solver-configuration."