From f913baa66e6405a7babc5b8074d5d772e73be3d8 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Tue, 23 May 2017 16:42:59 +0200 Subject: [PATCH] Make use of template argument deduction for createAMGPreconditionerPointer --- opm/autodiff/CPRPreconditioner.hpp | 2 +- opm/autodiff/ISTLSolver.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opm/autodiff/CPRPreconditioner.hpp b/opm/autodiff/CPRPreconditioner.hpp index 4288610f6..f394c1b15 100644 --- a/opm/autodiff/CPRPreconditioner.hpp +++ b/opm/autodiff/CPRPreconditioner.hpp @@ -276,7 +276,7 @@ createEllipticPreconditionerPointer(const M& Ae, double relax, /// \param relax The relaxation parameter for ILU0. /// \param comm The object describing the parallelization information and communication. // \param amgPtr The unique_ptr to be filled (return) -template +template < int pressureIndex=0, class Op, class P, class AMG > inline void createAMGPreconditionerPointer( Op& opA, const double relax, const P& comm, std::unique_ptr< AMG >& amgPtr ) { diff --git a/opm/autodiff/ISTLSolver.hpp b/opm/autodiff/ISTLSolver.hpp index c3793cd9d..37c30376f 100644 --- a/opm/autodiff/ISTLSolver.hpp +++ b/opm/autodiff/ISTLSolver.hpp @@ -317,7 +317,7 @@ namespace Opm void constructAMGPrecond(LinearOperator& /* linearOperator */, const POrComm& comm, std::unique_ptr< AMG >& amg, std::unique_ptr< MatrixOperator >& opA, const double relax ) const { - ISTLUtility::template createAMGPreconditionerPointer( *opA, relax, comm, amg ); + ISTLUtility::template createAMGPreconditionerPointer( *opA, relax, comm, amg ); } @@ -325,7 +325,7 @@ namespace Opm void constructAMGPrecond(MatrixOperator& opA, const POrComm& comm, std::unique_ptr< AMG >& amg, std::unique_ptr< MatrixOperator >&, const double relax ) const { - ISTLUtility::template createAMGPreconditionerPointer( opA, relax, comm, amg ); + ISTLUtility::template createAMGPreconditionerPointer( opA, relax, comm, amg ); } /// \brief Solve the system using the given preconditioner and scalar product.