Merge pull request #4300 from akva2/msw_simplify_invert

MSWellHelpers: reverse order of template parameters
This commit is contained in:
Bård Skaflestad 2022-12-01 00:02:35 +01:00 committed by GitHub
commit 2e15513b43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -139,7 +139,7 @@ applyUMFPack(const MatrixType& D,
#endif // HAVE_UMFPACK
}
template <typename MatrixType, typename VectorType>
template <typename VectorType, typename MatrixType>
Dune::Matrix<typename MatrixType::block_type>
invertWithUMFPack(const MatrixType& D, std::shared_ptr<Dune::UMFPack<MatrixType> >& linsolver)
{
@ -332,7 +332,7 @@ using Mat = Dune::BCRSMatrix<Dune::FieldMatrix<double,Dim,Dim>>;
std::shared_ptr<Dune::UMFPack<Mat<Dim>>>&, \
Vec<Dim>); \
template Dune::Matrix<typename Mat<Dim>::block_type> \
invertWithUMFPack<Mat<Dim>,Vec<Dim>>(const Mat<Dim>& D, \
invertWithUMFPack<Vec<Dim>,Mat<Dim>>(const Mat<Dim>& D, \
std::shared_ptr<Dune::UMFPack<Mat<Dim>>>&);
INSTANCE_UMF(2)

View File

@ -49,7 +49,7 @@ namespace mswellhelpers
/// Applies umfpack and checks for singularity
template <typename MatrixType, typename VectorType>
template <typename VectorType, typename MatrixType>
Dune::Matrix<typename MatrixType::block_type>
invertWithUMFPack(const MatrixType& D,
std::shared_ptr<Dune::UMFPack<MatrixType> >& linsolver);

View File

@ -727,7 +727,7 @@ namespace Opm
MultisegmentWell<TypeTag>::
addWellContributions(SparseMatrixAdapter& jacobian) const
{
const auto invDuneD = mswellhelpers::invertWithUMFPack<DiagMatWell, BVectorWell>(this->duneD_, this->duneDSolver_);
const auto invDuneD = mswellhelpers::invertWithUMFPack<BVectorWell>(this->duneD_, this->duneDSolver_);
// We need to change matrix A as follows
// A -= C^T D^-1 B