mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2946 from atgeirr/add-more-amg-options
Add more AMG options to allow setting from JSON.
This commit is contained in:
commit
374764fc6f
@ -138,6 +138,11 @@ private:
|
|||||||
// graph might be unsymmetric and hence not supported by the PTScotch/ParMetis
|
// graph might be unsymmetric and hence not supported by the PTScotch/ParMetis
|
||||||
// calls in DUNE. Accumulating to 1 skips PTScotch/ParMetis
|
// calls in DUNE. Accumulating to 1 skips PTScotch/ParMetis
|
||||||
criterion.setAccumulate(static_cast<Dune::Amg::AccumulationMode>(prm.get<int>("accumulate", 1)));
|
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;
|
return criterion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +65,11 @@ setupCPR(const std::string& conf, const FlowLinearSolverParameters& p)
|
|||||||
// graph might be unsymmetric and hence not supported by the PTScotch/ParMetis
|
// graph might be unsymmetric and hence not supported by the PTScotch/ParMetis
|
||||||
// calls in DUNE. Accumulating to 1 skips PTScotch/ParMetis
|
// calls in DUNE. Accumulating to 1 skips PTScotch/ParMetis
|
||||||
prm.put("preconditioner.coarsesolver.preconditioner.accumulate", 1);
|
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;
|
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
|
// graph might be unsymmetric and hence not supported by the PTScotch/ParMetis
|
||||||
// calls in DUNE. Accumulating to 1 skips PTScotch/ParMetis
|
// calls in DUNE. Accumulating to 1 skips PTScotch/ParMetis
|
||||||
prm.put("preconditioner.accumulate", 1);
|
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;
|
return prm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user