mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use Dune::FMatrixHelp::invertMatrix for inversion
Thus we always take advantage of the specializations in ISTLSolver.hpp and do need to take care about the type of the matrix block.
This commit is contained in:
parent
b5d55b9fb2
commit
8e78f02230
@ -27,6 +27,7 @@
|
||||
#include <opm/autodiff/WellInterface.hpp>
|
||||
#include <opm/autodiff/ISTLSolver.hpp>
|
||||
#include <opm/autodiff/RateConverter.hpp>
|
||||
#include <opm/autodiff/ISTLSolver.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -88,15 +89,8 @@ 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;
|
||||
|
||||
|
@ -688,7 +688,10 @@ namespace Detail
|
||||
}
|
||||
|
||||
// do the local inversion of D.
|
||||
invDuneD_[0][0].invert();
|
||||
// we do this manually with invertMatrix to always get our
|
||||
// specializations in for 3x3 and 4x4 matrices.
|
||||
auto original = invDuneD_[0][0];
|
||||
Dune::FMatrixHelp::invertMatrix(original, invDuneD_[0][0]);
|
||||
|
||||
if ( param_.matrix_add_well_contributions_ )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user