mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-26 01:01:00 -06:00
changed: move the GMResRestart parameter to Opm::Parameters
This commit is contained in:
parent
b5470dc3eb
commit
f3af89447b
@ -125,7 +125,7 @@ public:
|
||||
|
||||
static void registerParameters()
|
||||
{
|
||||
Parameters::registerParam<TypeTag, Properties::GMResRestart>
|
||||
Parameters::registerParam<TypeTag, Parameters::GMResRestart>
|
||||
("Number of iterations after which the GMRES linear solver is restarted");
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ public:
|
||||
int verbosity = 0;
|
||||
if (parOperator.overlap().myRank() == 0)
|
||||
verbosity = Parameters::get<TypeTag, Parameters::LinearSolverVerbosity>();
|
||||
int restartAfter = Parameters::get<TypeTag, Properties::GMResRestart>();
|
||||
int restartAfter = Parameters::get<TypeTag, Parameters::GMResRestart>();
|
||||
solver_ = std::make_shared<RawSolver>(parOperator,
|
||||
parScalarProduct,
|
||||
parPreCond,
|
||||
|
@ -33,6 +33,10 @@
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
//! number of iterations between solver restarts for the GMRES solver
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct GMResRestart { using type = Properties::UndefinedProperty; };
|
||||
|
||||
/*!
|
||||
* \brief Maximum accepted error of the norm of the residual.
|
||||
*/
|
||||
|
@ -45,10 +45,6 @@ struct PreconditionerWrapper { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct LinearSolverScalar { using type = UndefinedProperty; };
|
||||
|
||||
//! number of iterations between solver restarts for the GMRES solver
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct GMResRestart { using type = UndefinedProperty; };
|
||||
|
||||
//! The class that allows to manipulate sparse matrices
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct SparseMatrixAdapter { using type = UndefinedProperty; };
|
||||
|
@ -156,10 +156,15 @@ template<class TypeTag>
|
||||
struct PreconditionerWrapper<TypeTag, TTag::ParallelIstlLinearSolver>
|
||||
{ using type = Opm::Linear::PreconditionerWrapperILU<TypeTag>; };
|
||||
|
||||
//! set the GMRes restart parameter to 10 by default
|
||||
template<class TypeTag>
|
||||
struct GMResRestart<TypeTag, TTag::ParallelIstlLinearSolver> { static constexpr int value = 10; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
//! set the GMRes restart parameter to 10 by default
|
||||
template<class TypeTag>
|
||||
struct GMResRestart<TypeTag, Properties::TTag::ParallelIstlLinearSolver>
|
||||
{ static constexpr int value = 10; };
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user