Move PreconditionerFactory into namespace Opm.

This fixes name clashes with DUNE's own factory that is introduced
in DUNE 2.7. Hence it closes issue #2266.

BTW: Dune's factory has more template parameters than ours.
This commit is contained in:
Markus Blatt
2020-01-07 17:53:54 +01:00
parent e8e084e10f
commit 7e700c11e0
4 changed files with 12 additions and 8 deletions

View File

@@ -35,14 +35,18 @@
#include <fstream>
#include <type_traits>
namespace Dune
{
namespace Opm
{
// Circular dependency between PreconditionerFactory [which can make an OwningTwoLevelPreconditioner]
// and OwningTwoLevelPreconditioner [which uses PreconditionerFactory to choose the fine-level smoother]
// must be broken, accomplished by forward-declaration here.
template <class Operator, class Comm = Dune::Amg::SequentialInformation>
class PreconditionerFactory;
}
namespace Dune
{
// Must forward-declare FlexibleSolver as we want to use it as solver for the pressure system.
@@ -63,7 +67,7 @@ class OwningTwoLevelPreconditioner : public Dune::PreconditionerWithUpdate<Vecto
public:
using pt = boost::property_tree::ptree;
using MatrixType = typename OperatorType::matrix_type;
using PrecFactory = PreconditionerFactory<OperatorType, Communication>;
using PrecFactory = Opm::PreconditionerFactory<OperatorType, Communication>;
OwningTwoLevelPreconditioner(const OperatorType& linearoperator, const pt& prm)
: linear_operator_(linearoperator)