mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Work around unstable matrix inversion in DUNE 2.[34]
The versions are missing the specialized code for inverting a 3x3 matrix that makes the algorithms quite a bit more stable. With this patch we fall back to using our own MatrixBlock that does not suffer from this deficiency.
This commit is contained in:
@@ -289,7 +289,14 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2 , 5)
|
||||
typedef ParallelOverlappingILU0<Matrix,Vector,Vector> SeqPreconditioner;
|
||||
#else
|
||||
typedef ParallelOverlappingILU0<Dune::BCRSMatrix<Dune::MatrixBlock<typename Matrix::field_type,
|
||||
Matrix::block_type::rows,
|
||||
Matrix::block_type::cols> >,
|
||||
Vector, Vector> SeqPreconditioner;
|
||||
#endif
|
||||
|
||||
template <class Operator>
|
||||
std::unique_ptr<SeqPreconditioner> constructPrecond(Operator& opA, const Dune::Amg::SequentialInformation&) const
|
||||
@@ -302,7 +309,14 @@ namespace Opm
|
||||
|
||||
#if HAVE_MPI
|
||||
typedef Dune::OwnerOverlapCopyCommunication<int, int> Comm;
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2 , 5)
|
||||
typedef ParallelOverlappingILU0<Matrix,Vector,Vector,Comm> ParPreconditioner;
|
||||
#else
|
||||
typedef ParallelOverlappingILU0<Dune::BCRSMatrix<Dune::MatrixBlock<typename Matrix::field_type,
|
||||
Matrix::block_type::rows,
|
||||
Matrix::block_type::cols> >,
|
||||
Vector, Vector, Comm> ParPreconditioner;
|
||||
#endif
|
||||
template <class Operator>
|
||||
std::unique_ptr<ParPreconditioner>
|
||||
constructPrecond(Operator& opA, const Comm& comm) const
|
||||
|
||||
Reference in New Issue
Block a user