Make use of template argument deduction for createAMGPreconditionerPointer

This commit is contained in:
Markus Blatt
2017-05-23 16:42:59 +02:00
parent 59ca0b4424
commit f913baa66e
2 changed files with 3 additions and 3 deletions

View File

@@ -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 <class Op, class P, class AMG, int pressureIndex=0 >
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 )
{

View File

@@ -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<MatrixOperator,POrComm,AMG,pressureIndex>( *opA, relax, comm, amg );
ISTLUtility::template createAMGPreconditionerPointer<pressureIndex>( *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<MatrixOperator,POrComm,AMG,pressureIndex>( opA, relax, comm, amg );
ISTLUtility::template createAMGPreconditionerPointer<pressureIndex>( opA, relax, comm, amg );
}
/// \brief Solve the system using the given preconditioner and scalar product.