mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #864 from lisajulia/feature/deterministic-indicesSyncer
Construct the matrices in the AMG hierarchy with deterministic indices if possible.
This commit is contained in:
commit
3aa2e0969f
@ -255,6 +255,18 @@ protected:
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// trailing return type with decltype used for detecting existence of setUseFixedOrder member function by overloading the setUseFixedOrder function
|
||||||
|
template <typename C>
|
||||||
|
auto setUseFixedOrder(C criterion, bool booleanValue) -> decltype(criterion.setUseFixedOrder(booleanValue))
|
||||||
|
{
|
||||||
|
return criterion.setUseFixedOrder(booleanValue); // Set flag to ensure that the matrices in the AMG hierarchy are constructed with deterministic indices.
|
||||||
|
}
|
||||||
|
template <typename C>
|
||||||
|
void setUseFixedOrder(C, ...)
|
||||||
|
{
|
||||||
|
// do nothing, since the function setUseFixedOrder does not exist yet
|
||||||
|
}
|
||||||
|
|
||||||
void setupAmg_()
|
void setupAmg_()
|
||||||
{
|
{
|
||||||
if (amg_)
|
if (amg_)
|
||||||
@ -291,6 +303,7 @@ protected:
|
|||||||
// coarsenCriterion.setAccumulate(Dune::Amg::noAccu);
|
// coarsenCriterion.setAccumulate(Dune::Amg::noAccu);
|
||||||
coarsenCriterion.setAccumulate(Dune::Amg::atOnceAccu);
|
coarsenCriterion.setAccumulate(Dune::Amg::atOnceAccu);
|
||||||
coarsenCriterion.setSkipIsolated(false);
|
coarsenCriterion.setSkipIsolated(false);
|
||||||
|
setUseFixedOrder(coarsenCriterion, true); // If possible, set flag to ensure that the matrices in the AMG hierarchy are constructed with deterministic indices.
|
||||||
|
|
||||||
// instantiate the AMG preconditioner
|
// instantiate the AMG preconditioner
|
||||||
#if HAVE_MPI
|
#if HAVE_MPI
|
||||||
|
Loading…
Reference in New Issue
Block a user