MSWellHelpers: reverse order of template parameters

this way the matrix type and be deduced from passed parameters
This commit is contained in:
Arne Morten Kvarving 2022-11-30 23:05:29 +01:00
parent 79c8bc75bc
commit eadf972014
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