From 42bcb3f47103a23a01b00ec53a8783e14a44181d Mon Sep 17 00:00:00 2001 From: Andreas Lauser <and@poware.org> Date: Wed, 17 Aug 2011 14:27:36 +0000 Subject: [PATCH] rename LS* to LinearSolver* also move these "LinearSolver" parameter group git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@6508 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/boxmodels/common/boxpropertydefaults.hh | 6 ++--- .../decoupled/1p/diffusion/fv/fvpressure1p.hh | 2 +- .../decoupled/2p/diffusion/fv/fvpressure2p.hh | 2 +- .../2p/diffusion/fvmpfa/fvmpfaopressure2p.hh | 6 ++--- .../2p/diffusion/fvmpfa/fvmpfaovelocity2p.hh | 4 +-- .../2p/diffusion/fvmpfa/mpfaproperties.hh | 4 +-- .../2p/diffusion/mimetic/localstiffness.hh | 4 +-- .../2p/diffusion/mimetic/mimeticpressure2p.hh | 2 +- dumux/decoupled/2p2c/fvpressure2p2c.hh | 2 +- dumux/decoupled/common/decoupledproperties.hh | 6 ++--- dumux/linear/boxlinearsolver.hh | 6 ++--- dumux/linear/impetbicgstabilu0solver.hh | 12 ++++----- dumux/linear/linearsolverproperties.hh | 10 +++---- dumux/linear/seqsolverbackend.hh | 26 +++++++++---------- test/boxmodels/1p/1ptestproblem.hh | 2 +- test/boxmodels/2p/lensproblem.hh | 2 +- test/decoupled/1p/test_1p_problem.hh | 2 +- tutorial/tutorialspatialparameters_coupled.hh | 4 +-- .../tutorialspatialparameters_decoupled.hh | 4 +-- 19 files changed, 53 insertions(+), 53 deletions(-) diff --git a/dumux/boxmodels/common/boxpropertydefaults.hh b/dumux/boxmodels/common/boxpropertydefaults.hh index 84c91e153f..83daa94705 100644 --- a/dumux/boxmodels/common/boxpropertydefaults.hh +++ b/dumux/boxmodels/common/boxpropertydefaults.hh @@ -217,19 +217,19 @@ SET_TYPE_PROP(BoxModel, LinearSolver, Dumux::BoxBiCGStabILU0Solver<TypeTag> ); // that the initial value for the delta vector u is quite // close to the final value, a reduction of 6 orders of // magnitude in the defect should be sufficient... -SET_PROP(BoxModel, LSResidualReduction) +SET_PROP(BoxModel, LinearSolverResidualReduction) {public: static constexpr double value = 1e-6; }; //! set the default number of maximum iterations for the linear solver -SET_PROP(BoxModel, LSMaxIterations) +SET_PROP(BoxModel, LinearSolverMaxIterations) {public: static constexpr int value = 250; }; //! set number of equations of the mathematical model as default -SET_PROP_DEFAULT(LSBlockSize) +SET_PROP_DEFAULT(LinearSolverBlockSize) {public: static constexpr int value = GET_PROP_VALUE(TypeTag, PTAG(NumEq)); }; diff --git a/dumux/decoupled/1p/diffusion/fv/fvpressure1p.hh b/dumux/decoupled/1p/diffusion/fv/fvpressure1p.hh index 3bb46ccc16..a51a4705c6 100644 --- a/dumux/decoupled/1p/diffusion/fv/fvpressure1p.hh +++ b/dumux/decoupled/1p/diffusion/fv/fvpressure1p.hh @@ -462,7 +462,7 @@ void FVPressure1P<TypeTag>::solve() { typedef typename GET_PROP_TYPE(TypeTag, PTAG(LinearSolver)) Solver; - int verboseLevelSolver = GET_PARAM(TypeTag, int, LSVerbosity); + int verboseLevelSolver = GET_PARAM(TypeTag, int, LinearSolver, Verbosity); if (verboseLevelSolver) std::cout << "FVPressure1P: solve for pressure" << std::endl; diff --git a/dumux/decoupled/2p/diffusion/fv/fvpressure2p.hh b/dumux/decoupled/2p/diffusion/fv/fvpressure2p.hh index 626e57cd1b..ace9b79cec 100644 --- a/dumux/decoupled/2p/diffusion/fv/fvpressure2p.hh +++ b/dumux/decoupled/2p/diffusion/fv/fvpressure2p.hh @@ -819,7 +819,7 @@ void FVPressure2P<TypeTag>::solve() { typedef typename GET_PROP_TYPE(TypeTag, PTAG(LinearSolver)) Solver; - int verboseLevelSolver = GET_PARAM(TypeTag, int, LSVerbosity); + int verboseLevelSolver = GET_PARAM(TypeTag, int, LinearSolver, Verbosity); if (verboseLevelSolver) std::cout << "FVPressure2P: solve for pressure" << std::endl; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p.hh index 51f58f37a4..eacfe8bcee 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p.hh @@ -18,8 +18,8 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ -#ifndef DUNE_FVMPFAOPRESSURE2P_HH -#define DUNE_FVMPFAOPRESSURE2P_HH +#ifndef DUMUX_FVMPFAOPRESSURE2P_HH +#define DUMUX_FVMPFAOPRESSURE2P_HH // dune environent: #include <dune/istl/bvector.hh> @@ -2425,7 +2425,7 @@ void FVMPFAOPressure2P<TypeTag>::solve() { typedef typename GET_PROP_TYPE(TypeTag, PTAG(LinearSolver)) Solver; - int verboseLevelSolver = GET_PARAM(TypeTag, int, LSVerbosity); + int verboseLevelSolver = GET_PARAM(TypeTag, int, LinearSolver, Verbosity); if (verboseLevelSolver) std::cout << "FVMPFAOPressure2P: solve for pressure" << std::endl; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaovelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaovelocity2p.hh index 70658260e0..8df738dd22 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaovelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaovelocity2p.hh @@ -19,8 +19,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ -#ifndef DUNE_MPFAOVELOCITY2P_HH -#define DUNE_MPFAOVELOCITY2P_HH +#ifndef DUMUX_MPFAOVELOCITY2P_HH +#define DUMUX_MPFAOVELOCITY2P_HH #include "dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p.hh" diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/mpfaproperties.hh b/dumux/decoupled/2p/diffusion/fvmpfa/mpfaproperties.hh index dcdd1c20d4..36779f93da 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/mpfaproperties.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/mpfaproperties.hh @@ -25,8 +25,8 @@ * * \brief Properties for the MPFA-O method. */ -#ifndef DUNE_MPFAOPROPERTIES_HH -#define DUNE_MPFAOPROPERTIES_HH +#ifndef DUMUX_MPFAOPROPERTIES_HH +#define DUMUX_MPFAOPROPERTIES_HH // dumux environment #include <dumux/decoupled/2p/2pproperties.hh> diff --git a/dumux/decoupled/2p/diffusion/mimetic/localstiffness.hh b/dumux/decoupled/2p/diffusion/mimetic/localstiffness.hh index 74c648ef90..cab87f95d0 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/localstiffness.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/localstiffness.hh @@ -12,8 +12,8 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ -#ifndef DUNE_LOCALSTIFFNESS_HH -#define DUNE_LOCALSTIFFNESS_HH +#ifndef DUMUX_LOCAL_STIFFNESS_HH +#define DUMUX_LOCAL_STIFFNESS_HH #include<iostream> #include<vector> diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh b/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh index 9403614a5d..92d98b37a2 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh @@ -234,7 +234,7 @@ void MimeticPressure2P<TypeTag>::solve() { typedef typename GET_PROP_TYPE(TypeTag, PTAG(LinearSolver)) Solver; - int verboseLevelSolver = GET_PARAM(TypeTag, int, LSVerbosity); + int verboseLevelSolver = GET_PARAM(TypeTag, int, LinearSolver, Verbosity); if (verboseLevelSolver) std::cout << "MimeticPressure2P: solve for pressure" << std::endl; diff --git a/dumux/decoupled/2p2c/fvpressure2p2c.hh b/dumux/decoupled/2p2c/fvpressure2p2c.hh index 3fbde7b62b..4573e546f4 100644 --- a/dumux/decoupled/2p2c/fvpressure2p2c.hh +++ b/dumux/decoupled/2p2c/fvpressure2p2c.hh @@ -1036,7 +1036,7 @@ void FVPressure2P2C<TypeTag>::solve() { typedef typename GET_PROP_TYPE(TypeTag, PTAG(LinearSolver)) Solver; - int verboseLevelSolver = GET_PARAM(TypeTag, int, LSVerbosity); + int verboseLevelSolver = GET_PARAM(TypeTag, int, LinearSolver, Verbosity); if (verboseLevelSolver) std::cout << "compositional 2p2c: solve for pressure" << std::endl; diff --git a/dumux/decoupled/common/decoupledproperties.hh b/dumux/decoupled/common/decoupledproperties.hh index 4931f9c0d2..d343ec5c20 100644 --- a/dumux/decoupled/common/decoupledproperties.hh +++ b/dumux/decoupled/common/decoupledproperties.hh @@ -196,19 +196,19 @@ public: }; //! set the default for the reduction of the initial residual -SET_PROP(DecoupledModel, LSResidualReduction) +SET_PROP(DecoupledModel, LinearSolverResidualReduction) {public: static constexpr double value = 1e-13; }; //! set the default number of maximum iterations for the linear solver -SET_PROP(DecoupledModel, LSMaxIterations) +SET_PROP(DecoupledModel, LinearSolverMaxIterations) {public: static constexpr int value = 500; }; //! set the default number of maximum iterations for the linear solver -SET_PROP(DecoupledModel, LSBlockSize) +SET_PROP(DecoupledModel, LinearSolverBlockSize) {public: static constexpr int value = 1; }; diff --git a/dumux/linear/boxlinearsolver.hh b/dumux/linear/boxlinearsolver.hh index e498e320ea..1eecda1c4c 100644 --- a/dumux/linear/boxlinearsolver.hh +++ b/dumux/linear/boxlinearsolver.hh @@ -104,9 +104,9 @@ public: { int verbosity = 0; if (problem_.gridView().comm().rank() == 0) - verbosity = GET_PARAM(TypeTag, int, LSVerbosity); - const int maxIter = GET_PARAM(TypeTag, double, LSMaxIterations); - const double residReduction = GET_PARAM(TypeTag, double, LSResidualReduction); + verbosity = GET_PARAM(TypeTag, int, LinearSolver, Verbosity); + const int maxIter = GET_PARAM(TypeTag, double, LinearSolver, MaxIterations); + const double residReduction = GET_PARAM(TypeTag, double, LinearSolver, ResidualReduction); if (!overlapMatrix_) { // make sure that the overlapping matrix and block vectors diff --git a/dumux/linear/impetbicgstabilu0solver.hh b/dumux/linear/impetbicgstabilu0solver.hh index 2c3357d92c..5649f5b881 100644 --- a/dumux/linear/impetbicgstabilu0solver.hh +++ b/dumux/linear/impetbicgstabilu0solver.hh @@ -45,9 +45,9 @@ NEW_PROP_TAG(PressureCoefficientMatrix); NEW_PROP_TAG(PressureRHSVector); NEW_PROP_TAG(SolutionTypes); NEW_PROP_TAG(GridView); -NEW_PROP_TAG(LSVerbosity); -NEW_PROP_TAG(LSMaxIterations); -NEW_PROP_TAG(LSResidualReduction); +NEW_PROP_TAG(LinearSolverVerbosity); +NEW_PROP_TAG(LinearSolverMaxIterations); +NEW_PROP_TAG(LinearSolverResidualReduction); NEW_PROP_TAG(PreconditionerRelaxation); } @@ -114,9 +114,9 @@ public: Vector &x, const Vector &b) { - int verbosityLevel = GET_PARAM(TypeTag, int, LSVerbosity); - const int maxIter = GET_PARAM(TypeTag, double, LSMaxIterations); - const double residReduction = GET_PARAM(TypeTag, double, LSResidualReduction); + int verbosityLevel = GET_PARAM(TypeTag, int, LinearSolver, Verbosity); + const int maxIter = GET_PARAM(TypeTag, double, LinearSolver, MaxIterations); + const double residReduction = GET_PARAM(TypeTag, double, LinearSolver, ResidualReduction); const double relaxation = GET_PARAM(TypeTag, double, PreconditionerRelaxation); if (!overlapMatrix_) { diff --git a/dumux/linear/linearsolverproperties.hh b/dumux/linear/linearsolverproperties.hh index dbf1f40df1..ffb1ef383e 100644 --- a/dumux/linear/linearsolverproperties.hh +++ b/dumux/linear/linearsolverproperties.hh @@ -45,13 +45,13 @@ NEW_PROP_TAG(LinearSolver); * property to 1 prints aggregated convergence rates, 2 prints the * convergence rate of every iteration of the scheme. */ -NEW_PROP_TAG(LSVerbosity); +NEW_PROP_TAG(LinearSolverVerbosity); //! target reduction of the initial residual -NEW_PROP_TAG(LSResidualReduction); +NEW_PROP_TAG(LinearSolverResidualReduction); //! maximum number of iterations of solver -NEW_PROP_TAG(LSMaxIterations); +NEW_PROP_TAG(LinearSolverMaxIterations); //! relaxation parameter for the preconditioner NEW_PROP_TAG(PreconditionerRelaxation); @@ -69,9 +69,9 @@ NEW_PROP_TAG(GMResRestart); * Thus, the block size does not have to be equal to NumEq. * (Especially important for the SuperLU solver!) */ -NEW_PROP_TAG(LSBlockSize); +NEW_PROP_TAG(LinearSolverBlockSize); -SET_PROP_DEFAULT(LSVerbosity) +SET_PROP_DEFAULT(LinearSolverVerbosity) {public: static constexpr int value = 0; }; diff --git a/dumux/linear/seqsolverbackend.hh b/dumux/linear/seqsolverbackend.hh index a7f299ee82..8ee737200b 100644 --- a/dumux/linear/seqsolverbackend.hh +++ b/dumux/linear/seqsolverbackend.hh @@ -45,9 +45,9 @@ public: template<class Preconditioner, class Solver, class Matrix, class Vector> bool solve(const Matrix& A, Vector& x, const Vector& b) { - int verbosity = GET_PARAM(TypeTag, int, LSVerbosity); - const int maxIter = GET_PARAM(TypeTag, double, LSMaxIterations); - const double residReduction = GET_PARAM(TypeTag, double, LSResidualReduction); + int verbosity = GET_PARAM(TypeTag, int, LinearSolver, Verbosity); + const int maxIter = GET_PARAM(TypeTag, double, LinearSolver, MaxIterations); + const double residReduction = GET_PARAM(TypeTag, double, LinearSolver, ResidualReduction); Vector bTmp(b); @@ -70,9 +70,9 @@ public: template<class Preconditioner, class Solver, class Matrix, class Vector> bool solve(const Matrix& A, Vector& x, const Vector& b, const int restartGMRes) { - int verbosity = GET_PARAM(TypeTag, int, LSVerbosity); - const int maxIter = GET_PARAM(TypeTag, double, LSMaxIterations); - const double residReduction = GET_PARAM(TypeTag, double, LSResidualReduction); + int verbosity = GET_PARAM(TypeTag, int, LinearSolver, Verbosity); + const int maxIter = GET_PARAM(TypeTag, double, LinearSolver, MaxIterations); + const double residReduction = GET_PARAM(TypeTag, double, LinearSolver, ResidualReduction); Vector bTmp(b); @@ -333,9 +333,9 @@ public: template<class Preconditioner, class Solver, class Matrix, class Vector> bool solve(const Matrix& A, Vector& x, const Vector& b) { - int verbosity = GET_PARAM(TypeTag, int, LSVerbosity); - const int maxIter = GET_PARAM(TypeTag, double, LSMaxIterations); - const double residReduction = GET_PARAM(TypeTag, double, LSResidualReduction); + int verbosity = GET_PARAM(TypeTag, int, LinearSolver, Verbosity); + const int maxIter = GET_PARAM(TypeTag, double, LinearSolver, MaxIterations); + const double residReduction = GET_PARAM(TypeTag, double, LinearSolver, ResidualReduction); Vector bTmp(b); @@ -357,9 +357,9 @@ public: template<class Preconditioner, class Solver, class Matrix, class Vector> bool solve(const Matrix& A, Vector& x, const Vector& b, const int restartGMRes) { - int verbosity = GET_PARAM(TypeTag, int, LSVerbosity); - const int maxIter = GET_PARAM(TypeTag, double, LSMaxIterations); - const double residReduction = GET_PARAM(TypeTag, double, LSResidualReduction); + int verbosity = GET_PARAM(TypeTag, int, LinearSolver, Verbosity); + const int maxIter = GET_PARAM(TypeTag, double, LinearSolver, MaxIterations); + const double residReduction = GET_PARAM(TypeTag, double, LinearSolver, ResidualReduction); Vector bTmp(b); @@ -466,7 +466,7 @@ public: Vector bTmp(b); typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - enum {blockSize = GET_PROP_VALUE(TypeTag, PTAG(LSBlockSize))}; + enum {blockSize = GET_PROP_VALUE(TypeTag, PTAG(LinearSolverBlockSize))}; typedef typename Dune::FieldMatrix<Scalar, blockSize, blockSize> MatrixBlock; typedef typename Dune::BCRSMatrix<MatrixBlock> ISTLMatrix; diff --git a/test/boxmodels/1p/1ptestproblem.hh b/test/boxmodels/1p/1ptestproblem.hh index 24ca13e739..ba5cf692a8 100644 --- a/test/boxmodels/1p/1ptestproblem.hh +++ b/test/boxmodels/1p/1ptestproblem.hh @@ -76,7 +76,7 @@ SET_PROP(OnePTestProblem, SpatialParameters) // Linear solver settings SET_TYPE_PROP(OnePTestProblem, LinearSolver, Dumux::BoxCGILU0Solver<TypeTag> ); -SET_INT_PROP(OnePTestProblem, LSVerbosity, 1); +SET_INT_PROP(OnePTestProblem, LinearSolverVerbosity, 1); SET_INT_PROP(OnePTestProblem, PreconditionerIterations, 1); SET_SCALAR_PROP(OnePTestProblem, PreconditionerRelaxation, 1.0); diff --git a/test/boxmodels/2p/lensproblem.hh b/test/boxmodels/2p/lensproblem.hh index 4e51456f30..76a43456b8 100644 --- a/test/boxmodels/2p/lensproblem.hh +++ b/test/boxmodels/2p/lensproblem.hh @@ -105,7 +105,7 @@ SET_INT_PROP(LensProblem, NumericDifferenceMethod, +1); // Linear solver settings SET_TYPE_PROP(LensProblem, LinearSolver, Dumux::BoxBiCGStabILU0Solver<TypeTag> ); -SET_INT_PROP(LensProblem, LSVerbosity, 0); +SET_INT_PROP(LensProblem, LinearSolverVerbosity, 0); SET_INT_PROP(LensProblem, PreconditionerIterations, 1); SET_SCALAR_PROP(LensProblem, PreconditionerRelaxation, 1.0); diff --git a/test/decoupled/1p/test_1p_problem.hh b/test/decoupled/1p/test_1p_problem.hh index b00968130f..3a23a42d2b 100644 --- a/test/decoupled/1p/test_1p_problem.hh +++ b/test/decoupled/1p/test_1p_problem.hh @@ -90,7 +90,7 @@ SET_TYPE_PROP(TestProblemOneP, Model, Dumux::FVVelocity1P<TypeTag>); SET_TYPE_PROP(TestProblemOneP, Problem, Dumux::TestProblemOneP<TTAG(TestProblemOneP)>); -SET_INT_PROP(TestProblemOneP, LSVerbosity, 1); +SET_INT_PROP(TestProblemOneP, LinearSolverVerbosity, 1); } /*! diff --git a/tutorial/tutorialspatialparameters_coupled.hh b/tutorial/tutorialspatialparameters_coupled.hh index 70675f595b..b3da08de53 100644 --- a/tutorial/tutorialspatialparameters_coupled.hh +++ b/tutorial/tutorialspatialparameters_coupled.hh @@ -23,8 +23,8 @@ * \brief The spatial parameters for the fully coupled tutorial problem * which uses the twophase box model. */ -#ifndef TUTORIALSPATIALPARAMETERS_COUPLED_HH -#define TUTORIALSPATIALPARAMETERS_COUPLED_HH +#ifndef DUMUX_TUTORIAL_SPATIAL_PARAMETERS_COUPLED_HH +#define DUMUX_TUTORIAL_SPATIAL_PARAMETERS_COUPLED_HH // include parent spatialparameters #include <dumux/material/spatialparameters/boxspatialparameters.hh> diff --git a/tutorial/tutorialspatialparameters_decoupled.hh b/tutorial/tutorialspatialparameters_decoupled.hh index 685bd61bdd..b0e4eadb37 100644 --- a/tutorial/tutorialspatialparameters_decoupled.hh +++ b/tutorial/tutorialspatialparameters_decoupled.hh @@ -22,8 +22,8 @@ * * \brief spatial parameters for the sequential tutorial */ -#ifndef TUTORIALSPATIALPARAMETERS_DECOUPLED_HH -#define TUTORIALSPATIALPARAMETERS_DECOUPLED_HH +#ifndef DUMUX_TUTORIAL_SPATIAL_PARAMETERS_DECOUPLED_HH +#define DUMUX_TUTORIAL_SPATIAL_PARAMETERS_DECOUPLED_HH #include <dumux/material/spatialparameters/fvspatialparameters.hh> -- GitLab