Commit 32a0a723 authored by Timo Koch's avatar Timo Koch
Browse files

[linear] Remove deprecated interfaces, alias, parameters

parent b43580dd
install(FILES
amgbackend.hh
amgparallelhelpers.hh
amgtraits.hh
istlsolverfactorybackend.hh
linearsolverparameters.hh
linearsolvertraits.hh
......@@ -12,5 +10,4 @@ pdesolver.hh
scotchbackend.hh
seqsolverbackend.hh
solver.hh
vectorexchange.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/linear)
......@@ -234,29 +234,6 @@ private:
bool firstCall_;
};
// deprecation helper -> will be removed after 3.2
template<class GridView, class Traits>
using ParallelAMGBackend
= AMGBiCGSTABBackend<Traits>;
} // namespace Dumux
#include <dumux/common/properties.hh>
#include <dumux/linear/linearsolvertraits.hh>
namespace Dumux {
/*!
* \ingroup Linear
* \brief A linear solver based on the ISTL AMG preconditioner
* and the ISTL BiCGSTAB solver.
* \note This is an adaptor using a TypeTag
*/
template<class TypeTag>
using AMGBackend [[deprecated("Use AMGBiCGSTABBackend instead. Will be removed after 3.2!")]]
= ParallelAMGBackend<typename GetPropType<TypeTag, Properties::GridGeometry>::GridView,
LinearSolverTraits<GetPropType<TypeTag, Properties::GridGeometry>>>;
} // namespace Dumux
} // end namespace Dumux
#endif // DUMUX_AMGBACKEND_HH
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program 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 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup Linear
* \brief Provides a helper class for nonoverlapping
* decomposition using the ISTL AMG.
*/
#ifndef DUMUX_AMGPARALLELHELPERS_HH
#define DUMUX_AMGPARALLELHELPERS_HH
#include "parallelhelpers.hh"
#warning "This header is deprecated and will be removed after release 3.2. Use linearsolver/parallelhelpers.hh"
#endif // DUMUX_AMGPARALLELHELPERS_HH
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program 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 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup Linear
* \brief Define traits for the AMG backend.
*/
#ifndef DUMUX_AMG_TRAITS_HH
#define DUMUX_AMG_TRAITS_HH
#warning "This header is deprecated and will be removed after release 3.2. Use linearsolver/linearsolvertraits.hh"
#include "linearsolvertraits.hh"
namespace Dumux {
//! The type traits required for using the AMG backend
template<class MType, class VType, class GridGeometry>
using AmgTraits [[deprecated("Use LinearSolverTraits<GridGeometry> instead. AmgTraits will be removed after 3.2!")]] = LinearSolverTraits<GridGeometry>;
} // end namespace Dumux
#endif // DUMUX_AMG_TRAITS_HH
......@@ -56,41 +56,9 @@ public:
verbosity_ = getParamFromGroup<int>(paramGroup, "LinearSolver.Verbosity", 0);
maxIter_ = getParamFromGroup<int>(paramGroup, "LinearSolver.MaxIterations", 250);
residReduction_ = getParamFromGroup<double>(paramGroup, "LinearSolver.ResidualReduction", 1e-13);
// for deprecation period we ask also for the "old" parameters but print a warning
// the "new" style parameter takes precedence
// TODO: Remove all this code after 3.2 and use commented code below
if (hasParamInGroup(paramGroup, "LinearSolver.PreconditionerRelaxation"))
{
std::cerr << "Deprecation warning: parameter LinearSolver.PreconditionerRelaxation is deprecated and will be removed after 3.2. "
<< "Use LinearSolver.Preconditioner.Relaxation instead (Preconditioner subgroup)." << std::endl;
relaxation_ = getParamFromGroup<double>(paramGroup, "LinearSolver.PreconditionerRelaxation");
}
else
relaxation_ = getParamFromGroup<double>(paramGroup, "LinearSolver.Preconditioner.Relaxation", 1);
if (hasParamInGroup(paramGroup, "LinearSolver.PreconditionerIterations"))
{
std::cerr << "Deprecation warning: parameter LinearSolver.PreconditionerIterations is deprecated and will be removed after 3.2. "
<< "Use LinearSolver.Preconditioner.Iterations instead (Preconditioner subgroup)." << std::endl;
precondIter_ = getParamFromGroup<int>(paramGroup, "LinearSolver.PreconditionerIterations");
}
else
precondIter_ = getParamFromGroup<int>(paramGroup, "LinearSolver.Preconditioner.Iterations", 1);
if (hasParamInGroup(paramGroup, "LinearSolver.PreconditionerVerbosity"))
{
std::cerr << "Deprecation warning: parameter LinearSolver.PreconditionerVerbosity is deprecated and will be removed after 3.2. "
<< "Use LinearSolver.Preconditioner.Verbosity instead (Preconditioner subgroup)." << std::endl;
precondVerbosity_ = getParamFromGroup<int>(paramGroup, "LinearSolver.PreconditionerVerbosity");
}
else
precondVerbosity_ = getParamFromGroup<int>(paramGroup, "LinearSolver.Preconditioner.Verbosity", 0);
// TODO: use this code instead of the above code after release 3.2
// relaxation_ = getParamFromGroup<double>(paramGroup, "LinearSolver.Preconditioner.Relaxation", 1);
// precondIter_ = getParamFromGroup<int>(paramGroup, "LinearSolver.Preconditioner.Iterations", 1);
// precondVerbosity_ = getParamFromGroup<int>(paramGroup, "LinearSolver.Preconditioner.Verbosity", 0);
relaxation_ = getParamFromGroup<double>(paramGroup, "LinearSolver.Preconditioner.Relaxation", 1);
precondIter_ = getParamFromGroup<int>(paramGroup, "LinearSolver.Preconditioner.Iterations", 1);
precondVerbosity_ = getParamFromGroup<int>(paramGroup, "LinearSolver.Preconditioner.Verbosity", 0);
}
/*!
......
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program 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 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup Linear
* \brief Contains a class to exchange entries of a vector
*/
#ifndef DUMUX_VECTOR_EXCHANGE_HH
#define DUMUX_VECTOR_EXCHANGE_HH
#warning "This header is deprecated and will be removed after release 3.2. Use parallel/vectorcommdatahandle.hh"
#include <dumux/parallel/vectorcommdatahandle.hh>
namespace Dumux {
template<class Mapper, class Vector>
using VectorExchange [[deprecated("Use VectorCommDataHandleEqual<Mapper, Vector, 0> instead. Will be removed after 3.2!")]] = VectorCommDataHandleEqual<Mapper, Vector, 0/*elementCodim*/>;
} // end namespace Dumux
#endif
......@@ -44,6 +44,7 @@
#include <dumux/io/grid/gridmanager_yasp.hh>
#include <dumux/io/staggeredvtkoutputmodule.hh>
#include <dumux/linear/seqsolverbackend.hh>
#include <dumux/linear/linearsolvertraits.hh>
#include <dumux/nonlinear/newtonsolver.hh>
#include <dune/common/version.hh>
......
......@@ -37,6 +37,7 @@
#include <dumux/common/dumuxmessage.hh>
#include <dumux/io/grid/gridmanager.hh>
#include <dumux/linear/linearsolvertraits.hh>
#include <dumux/linear/amgbackend.hh>
#include <dumux/nonlinear/newtonsolver.hh>
......
......@@ -44,6 +44,7 @@
#include <dumux/porousmediumflow/2p/sequential/transport/cellcentered/evalcflfluxcoats.hh>
#include <dumux/linear/amgbackend.hh>
#include <dumux/linear/linearsolvertraits.hh>
namespace Dumux
{
......@@ -112,7 +113,12 @@ struct EvalCflFluxFunction<TypeTag, TTag::IMPESTest> { using type = EvalCflFluxC
// use the AMG backend for the corresponding test
template<class TypeTag>
struct LinearSolver<TypeTag, TTag::IMPESTestWithAMG> { using type = AMGBackend<TypeTag>; };
struct LinearSolver<TypeTag, TTag::IMPESTestWithAMG>
{
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using type = AMGBiCGSTABBackend<LinearSolverTraits<GridGeometry>>;
};
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::IMPESTestWithAMG> { using type = Dune::YaspGrid<2>; };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment