mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
MSWellHelpers: reverse order of template parameters
this way the matrix type and be deduced from passed parameters
This commit is contained in:
parent
79c8bc75bc
commit
eadf972014
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user