mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 10:40:21 -06:00
Merge pull request #1311 from blattms/use-MatrixBlock-dune-2.5.0
Use MatrixBlock instead of FieldMatrix for DUNE 2.5.0
This commit is contained in:
commit
f886a3f0ff
@ -429,7 +429,9 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2 , 5)
|
||||
#if DUNE_VERSION_NEWER_REV(DUNE_ISTL, 2 , 5, 1)
|
||||
// 3x3 matrix block inversion was unstable at least 2.3 until and including
|
||||
// 2.5.0
|
||||
typedef ParallelOverlappingILU0<Matrix,Vector,Vector> SeqPreconditioner;
|
||||
#else
|
||||
typedef ParallelOverlappingILU0<Dune::BCRSMatrix<Dune::MatrixBlock<typename Matrix::field_type,
|
||||
@ -449,7 +451,9 @@ namespace Opm
|
||||
|
||||
#if HAVE_MPI
|
||||
typedef Dune::OwnerOverlapCopyCommunication<int, int> Comm;
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2 , 5)
|
||||
#if DUNE_VERSION_NEWER_REV(DUNE_ISTL, 2 , 5, 1)
|
||||
// 3x3 matrix block inversion was unstable from at least 2.3 until and
|
||||
// including 2.5.0
|
||||
typedef ParallelOverlappingILU0<Matrix,Vector,Vector,Comm> ParPreconditioner;
|
||||
#else
|
||||
typedef ParallelOverlappingILU0<Dune::BCRSMatrix<Dune::MatrixBlock<typename Matrix::field_type,
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
|
||||
#include <opm/autodiff/WellInterface.hpp>
|
||||
#include <opm/autodiff/ISTLSolver.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -82,8 +83,16 @@ namespace Opm
|
||||
typedef Dune::FieldVector<Scalar, numWellEq> VectorBlockWellType;
|
||||
typedef Dune::BlockVector<VectorBlockWellType> BVectorWell;
|
||||
|
||||
#if DUNE_VERSION_NEWER_REV(DUNE_ISTL, 2 , 5, 1)
|
||||
// 3x3 matrix block inversion was unstable from at least 2.3 until and
|
||||
// including 2.5.0
|
||||
// the matrix type for the diagonal matrix D
|
||||
typedef Dune::FieldMatrix<Scalar, numWellEq, numWellEq > DiagMatrixBlockWellType;
|
||||
#else
|
||||
// the matrix type for the diagonal matrix D
|
||||
typedef Dune::MatrixBlock<Scalar, numWellEq, numWellEq > DiagMatrixBlockWellType;
|
||||
#endif
|
||||
|
||||
typedef Dune::BCRSMatrix <DiagMatrixBlockWellType> DiagMatWell;
|
||||
|
||||
// the matrix type for the non-diagonal matrix B and C^T
|
||||
|
Loading…
Reference in New Issue
Block a user