Merge pull request #2946 from atgeirr/add-more-amg-options

Add more AMG options to allow setting from JSON.
This commit is contained in:
Atgeirr Flø Rasmussen 2020-11-27 08:57:04 +01:00 committed by GitHub
commit 374764fc6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -138,6 +138,11 @@ private:
// graph might be unsymmetric and hence not supported by the PTScotch/ParMetis
// calls in DUNE. Accumulating to 1 skips PTScotch/ParMetis
criterion.setAccumulate(static_cast<Dune::Amg::AccumulationMode>(prm.get<int>("accumulate", 1)));
criterion.setProlongationDampingFactor(prm.get<double>("prolongationdamping", 1.6));
criterion.setMaxDistance(prm.get<int>("maxdistance", 2));
criterion.setMaxConnectivity(prm.get<int>("maxconnectivity", 15));
criterion.setMaxAggregateSize(prm.get<int>("maxaggsize", 6));
criterion.setMinAggregateSize(prm.get<int>("minaggsize", 4));
return criterion;
}

View File

@ -65,6 +65,11 @@ setupCPR(const std::string& conf, const FlowLinearSolverParameters& p)
// graph might be unsymmetric and hence not supported by the PTScotch/ParMetis
// calls in DUNE. Accumulating to 1 skips PTScotch/ParMetis
prm.put("preconditioner.coarsesolver.preconditioner.accumulate", 1);
prm.put("preconditioner.coarsesolver.preconditioner.prolongationdamping", 1.6);
prm.put("preconditioner.coarsesolver.preconditioner.maxdistance", 2);
prm.put("preconditioner.coarsesolver.preconditioner.maxconnectivity", 15);
prm.put("preconditioner.coarsesolver.preconditioner.maxaggsize", 6);
prm.put("preconditioner.coarsesolver.preconditioner.minaggsize", 4);
return prm;
}
@ -93,6 +98,11 @@ setupAMG([[maybe_unused]] const std::string& conf, const FlowLinearSolverParamet
// graph might be unsymmetric and hence not supported by the PTScotch/ParMetis
// calls in DUNE. Accumulating to 1 skips PTScotch/ParMetis
prm.put("preconditioner.accumulate", 1);
prm.put("preconditioner.prolongationdamping", 1.6);
prm.put("preconditioner.maxdistance", 2);
prm.put("preconditioner.maxconnectivity", 15);
prm.put("preconditioner.maxaggsize", 6);
prm.put("preconditioner.minaggsize", 4);
return prm;
}