diff --git a/examples/flow_ebos.cpp b/examples/flow_ebos.cpp index 90c44433f..00d8eddb1 100644 --- a/examples/flow_ebos.cpp +++ b/examples/flow_ebos.cpp @@ -24,6 +24,9 @@ #include "config.h" #endif // HAVE_CONFIG_H +// Define making clear that the simulator supports AMG +#define FLOW_SUPPORT_AMG 1 + #include #include #include diff --git a/examples/flow_legacy.cpp b/examples/flow_legacy.cpp index 53a5b2d6d..e40a412e2 100644 --- a/examples/flow_legacy.cpp +++ b/examples/flow_legacy.cpp @@ -24,6 +24,8 @@ #include "config.h" #endif // HAVE_CONFIG_H +// Define making clear that the simulator supports AMG +#define FLOW_SUPPORT_AMG !defined(HAVE_UMFPACK) #include #include diff --git a/examples/flow_mpi.cpp b/examples/flow_mpi.cpp index e3f65b970..5356207ff 100644 --- a/examples/flow_mpi.cpp +++ b/examples/flow_mpi.cpp @@ -24,6 +24,8 @@ #include "config.h" #endif // HAVE_CONFIG_H +// Define making clear that the simulator supports AMG +#define FLOW_SUPPORT_AMG !defined(HAVE_UMFPACK) #include #include 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/FlowMain.hpp b/opm/autodiff/FlowMain.hpp index 644512863..4a03d5301 100644 --- a/opm/autodiff/FlowMain.hpp +++ b/opm/autodiff/FlowMain.hpp @@ -23,9 +23,6 @@ #ifndef OPM_FLOWMAIN_HEADER_INCLUDED #define OPM_FLOWMAIN_HEADER_INCLUDED -// Define making clear that the simulator supports AMG -#define FLOW_SUPPORT_AMG !defined(HAVE_UMFPACK) - #include diff --git a/opm/autodiff/FlowMainEbos.hpp b/opm/autodiff/FlowMainEbos.hpp index 9ba105843..8b2ef145f 100755 --- a/opm/autodiff/FlowMainEbos.hpp +++ b/opm/autodiff/FlowMainEbos.hpp @@ -23,8 +23,6 @@ #ifndef OPM_FLOW_MAIN_EBOS_HEADER_INCLUDED #define OPM_FLOW_MAIN_EBOS_HEADER_INCLUDED -// Define making clear that the simulator supports AMG -#define FLOW_SUPPORT_AMG #include @@ -40,6 +38,7 @@ #include #include #include +#include #include diff --git a/opm/autodiff/ISTLSolver.hpp b/opm/autodiff/ISTLSolver.hpp index af0ff16a4..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::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::createAMGPreconditionerPointer( opA, relax, comm, amg ); + ISTLUtility::template createAMGPreconditionerPointer( opA, relax, comm, amg ); } /// \brief Solve the system using the given preconditioner and scalar product. diff --git a/opm/autodiff/NewtonIterationBlackoilInterleaved.cpp b/opm/autodiff/NewtonIterationBlackoilInterleaved.cpp index d9574fef2..7db49042c 100644 --- a/opm/autodiff/NewtonIterationBlackoilInterleaved.cpp +++ b/opm/autodiff/NewtonIterationBlackoilInterleaved.cpp @@ -23,6 +23,9 @@ #include +// Define making clear that the simulator supports AMG +#define FLOW_SUPPORT_AMG !defined(HAVE_UMFPACK) + #include #include #include diff --git a/opm/autodiff/StandardWellsDense.hpp b/opm/autodiff/StandardWellsDense.hpp index fa958fb5b..e2125ec51 100644 --- a/opm/autodiff/StandardWellsDense.hpp +++ b/opm/autodiff/StandardWellsDense.hpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/opm/simulators/ParallelFileMerger.hpp b/opm/simulators/ParallelFileMerger.hpp index bceb2fe00..df11256e4 100644 --- a/opm/simulators/ParallelFileMerger.hpp +++ b/opm/simulators/ParallelFileMerger.hpp @@ -22,6 +22,7 @@ #define OPM_PARALLELFILEMERGER_HEADER_INCLUDED #include +#include #include #include