diff --git a/opm/simulators/linalg/linalgparameters.hh b/opm/simulators/linalg/linalgparameters.hh new file mode 100644 index 000000000..a3dd8c30a --- /dev/null +++ b/opm/simulators/linalg/linalgparameters.hh @@ -0,0 +1,48 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . + + Consult the COPYING file in the top-level source directory of this + module for the precise wording of the license and the list of + copyright holders. +*/ +/*! + * \file + * \ingroup BlackOilModel + * + * \brief Declares the parameters for the black oil model. + */ +#ifndef EWOMS_LINALG_PARAMETERS_HH +#define EWOMS_LINALG_PARAMETERS_HH + +#include + +namespace Opm::Parameters { + +/*! + * \brief The size of the algebraic overlap of the linear solver. + * + * Algebraic overlaps can be thought as being the same as the overlap + * of a grid, but it is only existant for the linear system of + * equations. + */ +template +struct LinearSolverOverlapSize { using type = Properties::UndefinedProperty; }; + +} // namespace Opm::Parameters + +#endif diff --git a/opm/simulators/linalg/linalgproperties.hh b/opm/simulators/linalg/linalgproperties.hh index d03675fef..db3200e4a 100644 --- a/opm/simulators/linalg/linalgproperties.hh +++ b/opm/simulators/linalg/linalgproperties.hh @@ -46,16 +46,6 @@ struct PreconditionerWrapper { using type = UndefinedProperty; }; template struct LinearSolverScalar { using type = UndefinedProperty; }; -/*! - * \brief The size of the algebraic overlap of the linear solver. - * - * Algebraic overlaps can be thought as being the same as the overlap - * of a grid, but it is only existant for the linear system of - * equations. - */ -template -struct LinearSolverOverlapSize { using type = UndefinedProperty; }; - /*! * \brief Maximum accepted error of the solution of the linear solver. */ diff --git a/opm/simulators/linalg/parallelbasebackend.hh b/opm/simulators/linalg/parallelbasebackend.hh index 31d38e32a..db2ca3aeb 100644 --- a/opm/simulators/linalg/parallelbasebackend.hh +++ b/opm/simulators/linalg/parallelbasebackend.hh @@ -27,31 +27,31 @@ #ifndef EWOMS_PARALLEL_BASE_BACKEND_HH #define EWOMS_PARALLEL_BASE_BACKEND_HH -#include +#include "opm/simulators/linalg/linalgparameters.hh" +#include +#include -#include -#include -#include -#include -#include -#include -#include -#include +#include + +#include #include #include #include -#include + +#include +#include #include +#include +#include +#include +#include +#include +#include -#include - -#include -#include - -#include -#include #include +#include +#include namespace Opm::Properties { @@ -156,7 +156,7 @@ public: ("The maximum allowed error between of the linear solver"); Parameters::registerParam ("The maximum accepted error of the norm of the residual"); - Parameters::registerParam + Parameters::registerParam ("The size of the algebraic overlap for the linear solver"); Parameters::registerParam ("The maximum number of iterations of the linear solver"); @@ -195,7 +195,7 @@ public: simulator_.model().dofMapper()); // create the overlapping Jacobian matrix - unsigned overlapSize = Parameters::get(); + unsigned overlapSize = Parameters::get(); overlappingMatrix_ = new OverlappingMatrix(M.istlMatrix(), borderListCreator.borderList(), borderListCreator.blackList(), @@ -458,14 +458,19 @@ template struct PreconditionerWrapper { using type = Opm::Linear::PreconditionerWrapperILU; }; -//! set the default overlap size to 2 -template -struct LinearSolverOverlapSize { static constexpr unsigned value = 2; }; - //! set the default number of maximum iterations for the linear solver template struct LinearSolverMaxIterations { static constexpr int value = 1000; }; } // namespace Opm::Properties +namespace Opm::Parameters { + +//! set the default overlap size to 2 +template +struct LinearSolverOverlapSize +{ static constexpr unsigned value = 2; }; + +} // namespace Opm::Parameters + #endif diff --git a/opm/simulators/linalg/parallelbicgstabbackend.hh b/opm/simulators/linalg/parallelbicgstabbackend.hh index 41eb49a14..76ed538d3 100644 --- a/opm/simulators/linalg/parallelbicgstabbackend.hh +++ b/opm/simulators/linalg/parallelbicgstabbackend.hh @@ -27,11 +27,12 @@ #ifndef EWOMS_PARALLEL_BICGSTAB_BACKEND_HH #define EWOMS_PARALLEL_BICGSTAB_BACKEND_HH -#include "linalgproperties.hh" -#include "parallelbasebackend.hh" -#include "bicgstabsolver.hh" -#include "combinedcriterion.hh" -#include "istlsparsematrixadapter.hh" +#include +#include +#include +#include +#include +#include #include