mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: move the NewtonWriteConvergence parameter to Opm::Parameters
This commit is contained in:
parent
a39ccfd4d3
commit
c54fb7816f
@ -157,10 +157,6 @@ struct SolidEnergyLaw<TypeTag, TTag::Co2InjectionBaseProblem>
|
|||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct LinearSolverSplice<TypeTag, TTag::Co2InjectionBaseProblem> { using type = TTag::ParallelAmgLinearSolver; };
|
struct LinearSolverSplice<TypeTag, TTag::Co2InjectionBaseProblem> { using type = TTag::ParallelAmgLinearSolver; };
|
||||||
|
|
||||||
// Write the Newton convergence behavior to disk?
|
|
||||||
template<class TypeTag>
|
|
||||||
struct NewtonWriteConvergence<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr bool value = false; };
|
|
||||||
|
|
||||||
// Enable gravity
|
// Enable gravity
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EnableGravity<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr bool value = true; };
|
struct EnableGravity<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr bool value = true; };
|
||||||
@ -232,6 +228,15 @@ struct GridFile<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr auto
|
|||||||
|
|
||||||
} // namespace Opm::Properties
|
} // namespace Opm::Properties
|
||||||
|
|
||||||
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
|
// Write the Newton convergence behavior to disk?
|
||||||
|
template<class TypeTag>
|
||||||
|
struct NewtonWriteConvergence<TypeTag, Properties::TTag::Co2InjectionBaseProblem>
|
||||||
|
{ static constexpr bool value = false; };
|
||||||
|
|
||||||
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
/*!
|
/*!
|
||||||
* \ingroup TestProblems
|
* \ingroup TestProblems
|
||||||
|
@ -140,11 +140,6 @@ public:
|
|||||||
using type = EffMaterialLaw;
|
using type = EffMaterialLaw;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Write the Newton convergence behavior to disk?
|
|
||||||
template <class TypeTag>
|
|
||||||
struct NewtonWriteConvergence<TypeTag, TTag::CO2PTBaseProblem> {
|
|
||||||
static constexpr bool value = false; };
|
|
||||||
|
|
||||||
// Enable gravity false
|
// Enable gravity false
|
||||||
template <class TypeTag>
|
template <class TypeTag>
|
||||||
struct EnableGravity<TypeTag, TTag::CO2PTBaseProblem> { static constexpr bool value = false;
|
struct EnableGravity<TypeTag, TTag::CO2PTBaseProblem> { static constexpr bool value = false;
|
||||||
@ -297,8 +292,14 @@ struct EnableEnergy<TypeTag, TTag::CO2PTBaseProblem> {
|
|||||||
|
|
||||||
} // namespace Opm::Properties
|
} // namespace Opm::Properties
|
||||||
|
|
||||||
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
|
// Write the Newton convergence behavior to disk?
|
||||||
|
template <class TypeTag>
|
||||||
|
struct NewtonWriteConvergence<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
||||||
|
{ static constexpr bool value = false; };
|
||||||
|
|
||||||
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
/*!
|
/*!
|
||||||
|
@ -124,10 +124,6 @@ struct MaterialLaw<TypeTag, TTag::FingerBaseProblem>
|
|||||||
using type = ParkerLenhard;
|
using type = ParkerLenhard;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Write the solutions of individual newton iterations?
|
|
||||||
template<class TypeTag>
|
|
||||||
struct NewtonWriteConvergence<TypeTag, TTag::FingerBaseProblem> { static constexpr bool value = false; };
|
|
||||||
|
|
||||||
// Use forward differences instead of central differences
|
// Use forward differences instead of central differences
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct NumericDifferenceMethod<TypeTag, TTag::FingerBaseProblem> { static constexpr int value = +1; };
|
struct NumericDifferenceMethod<TypeTag, TTag::FingerBaseProblem> { static constexpr int value = +1; };
|
||||||
@ -192,6 +188,15 @@ struct InitialTimeStepSize<TypeTag, TTag::FingerBaseProblem>
|
|||||||
|
|
||||||
} // namespace Opm::Properties
|
} // namespace Opm::Properties
|
||||||
|
|
||||||
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
|
// Write the solutions of individual newton iterations?
|
||||||
|
template<class TypeTag>
|
||||||
|
struct NewtonWriteConvergence<TypeTag, Properties::TTag::FingerBaseProblem>
|
||||||
|
{ static constexpr bool value = false; };
|
||||||
|
|
||||||
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -74,10 +74,6 @@ struct FluidSystem<TypeTag, TTag::InfiltrationBaseProblem>
|
|||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EnableGravity<TypeTag, TTag::InfiltrationBaseProblem> { static constexpr bool value = true; };
|
struct EnableGravity<TypeTag, TTag::InfiltrationBaseProblem> { static constexpr bool value = true; };
|
||||||
|
|
||||||
// Write newton convergence?
|
|
||||||
template<class TypeTag>
|
|
||||||
struct NewtonWriteConvergence<TypeTag, TTag::InfiltrationBaseProblem> { static constexpr bool value = false; };
|
|
||||||
|
|
||||||
// -1 backward differences, 0: central differences, +1: forward differences
|
// -1 backward differences, 0: central differences, +1: forward differences
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct NumericDifferenceMethod<TypeTag, TTag::InfiltrationBaseProblem> { static constexpr int value = 1; };
|
struct NumericDifferenceMethod<TypeTag, TTag::InfiltrationBaseProblem> { static constexpr int value = 1; };
|
||||||
@ -123,6 +119,15 @@ struct GridFile<TypeTag, TTag::InfiltrationBaseProblem>
|
|||||||
|
|
||||||
} // namespace Opm::Properties
|
} // namespace Opm::Properties
|
||||||
|
|
||||||
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
|
// Write newton convergence?
|
||||||
|
template<class TypeTag>
|
||||||
|
struct NewtonWriteConvergence<TypeTag, Properties::TTag::InfiltrationBaseProblem>
|
||||||
|
{ static constexpr bool value = false; };
|
||||||
|
|
||||||
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
/*!
|
/*!
|
||||||
* \ingroup TestProblems
|
* \ingroup TestProblems
|
||||||
|
@ -129,10 +129,6 @@ public:
|
|||||||
using type = Opm::EffToAbsLaw<EffectiveLaw>;
|
using type = Opm::EffToAbsLaw<EffectiveLaw>;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Write the solutions of individual newton iterations?
|
|
||||||
template<class TypeTag>
|
|
||||||
struct NewtonWriteConvergence<TypeTag, TTag::LensBaseProblem> { static constexpr bool value = false; };
|
|
||||||
|
|
||||||
// Use forward differences instead of central differences
|
// Use forward differences instead of central differences
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct NumericDifferenceMethod<TypeTag, TTag::LensBaseProblem> { static constexpr int value = +1; };
|
struct NumericDifferenceMethod<TypeTag, TTag::LensBaseProblem> { static constexpr int value = +1; };
|
||||||
@ -239,6 +235,11 @@ template<class TypeTag>
|
|||||||
struct EnableStorageCache<TypeTag, Properties::TTag::LensBaseProblem>
|
struct EnableStorageCache<TypeTag, Properties::TTag::LensBaseProblem>
|
||||||
{ static constexpr bool value = true; };
|
{ static constexpr bool value = true; };
|
||||||
|
|
||||||
|
// Write the solutions of individual newton iterations?
|
||||||
|
template<class TypeTag>
|
||||||
|
struct NewtonWriteConvergence<TypeTag, Properties::TTag::LensBaseProblem>
|
||||||
|
{ static constexpr bool value = false; };
|
||||||
|
|
||||||
} // namespace Opm::Parameters
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
@ -100,10 +100,6 @@ public:
|
|||||||
using type = Opm::LinearMaterial<Traits>;
|
using type = Opm::LinearMaterial<Traits>;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Write the Newton convergence behavior to disk?
|
|
||||||
template<class TypeTag>
|
|
||||||
struct NewtonWriteConvergence<TypeTag, TTag::ReservoirBaseProblem> { static constexpr bool value = false; };
|
|
||||||
|
|
||||||
// Enable gravity
|
// Enable gravity
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EnableGravity<TypeTag, TTag::ReservoirBaseProblem> { static constexpr bool value = true; };
|
struct EnableGravity<TypeTag, TTag::ReservoirBaseProblem> { static constexpr bool value = true; };
|
||||||
@ -185,6 +181,15 @@ struct NewtonTolerance<TypeTag, TTag::ReservoirBaseProblem>
|
|||||||
|
|
||||||
} // namespace Opm::Properties
|
} // namespace Opm::Properties
|
||||||
|
|
||||||
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
|
// Write the Newton convergence behavior to disk?
|
||||||
|
template<class TypeTag>
|
||||||
|
struct NewtonWriteConvergence<TypeTag, Properties::TTag::ReservoirBaseProblem>
|
||||||
|
{ static constexpr bool value = false; };
|
||||||
|
|
||||||
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -115,10 +115,6 @@ struct NewtonMaxIterations<TypeTag, TTag::RichardsLensProblem> { static constexp
|
|||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct NewtonTargetIterations<TypeTag, TTag::RichardsLensProblem> { static constexpr int value = 18; };
|
struct NewtonTargetIterations<TypeTag, TTag::RichardsLensProblem> { static constexpr int value = 18; };
|
||||||
|
|
||||||
// Do not write the intermediate results of the newton method
|
|
||||||
template<class TypeTag>
|
|
||||||
struct NewtonWriteConvergence<TypeTag, TTag::RichardsLensProblem> { static constexpr bool value = false; };
|
|
||||||
|
|
||||||
// The default for the end time of the simulation
|
// The default for the end time of the simulation
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EndTime<TypeTag, TTag::RichardsLensProblem>
|
struct EndTime<TypeTag, TTag::RichardsLensProblem>
|
||||||
@ -141,6 +137,15 @@ struct GridFile<TypeTag, TTag::RichardsLensProblem> { static constexpr auto valu
|
|||||||
|
|
||||||
} // namespace Opm::Properties
|
} // namespace Opm::Properties
|
||||||
|
|
||||||
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
|
// Do not write the intermediate results of the newton method
|
||||||
|
template<class TypeTag>
|
||||||
|
struct NewtonWriteConvergence<TypeTag, Properties::TTag::RichardsLensProblem>
|
||||||
|
{ static constexpr bool value = false; };
|
||||||
|
|
||||||
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -123,10 +123,6 @@ struct EnableGravity<TypeTag, TTag::WaterAirBaseProblem> { static constexpr bool
|
|||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct NumericDifferenceMethod<TypeTag, TTag::WaterAirBaseProblem> { static constexpr int value = +1; };
|
struct NumericDifferenceMethod<TypeTag, TTag::WaterAirBaseProblem> { static constexpr int value = +1; };
|
||||||
|
|
||||||
// Write newton convergence
|
|
||||||
template<class TypeTag>
|
|
||||||
struct NewtonWriteConvergence<TypeTag, TTag::WaterAirBaseProblem> { static constexpr bool value = false; };
|
|
||||||
|
|
||||||
// The default for the end time of the simulation (1 year)
|
// The default for the end time of the simulation (1 year)
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EndTime<TypeTag, TTag::WaterAirBaseProblem>
|
struct EndTime<TypeTag, TTag::WaterAirBaseProblem>
|
||||||
@ -164,6 +160,15 @@ struct PreconditionerOrder<TypeTag, TTag::WaterAirBaseProblem> { static constexp
|
|||||||
|
|
||||||
} // namespace Opm::Properties
|
} // namespace Opm::Properties
|
||||||
|
|
||||||
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
|
// Write newton convergence
|
||||||
|
template<class TypeTag>
|
||||||
|
struct NewtonWriteConvergence<TypeTag, Properties::TTag::WaterAirBaseProblem>
|
||||||
|
{ static constexpr bool value = false; };
|
||||||
|
|
||||||
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
/*!
|
/*!
|
||||||
* \ingroup TestProblems
|
* \ingroup TestProblems
|
||||||
|
@ -77,8 +77,6 @@ struct NewtonMethod<TypeTag, TTag::NewtonMethod> { using type = ::Opm::NewtonMet
|
|||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct NewtonConvergenceWriter<TypeTag, TTag::NewtonMethod> { using type = NullConvergenceWriter<TypeTag>; };
|
struct NewtonConvergenceWriter<TypeTag, TTag::NewtonMethod> { using type = NullConvergenceWriter<TypeTag>; };
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct NewtonWriteConvergence<TypeTag, TTag::NewtonMethod> { static constexpr bool value = false; };
|
|
||||||
template<class TypeTag>
|
|
||||||
struct NewtonTolerance<TypeTag, TTag::NewtonMethod>
|
struct NewtonTolerance<TypeTag, TTag::NewtonMethod>
|
||||||
{
|
{
|
||||||
using type = GetPropType<TypeTag, Scalar>;
|
using type = GetPropType<TypeTag, Scalar>;
|
||||||
@ -105,6 +103,10 @@ template<class TypeTag>
|
|||||||
struct NewtonVerbose<TypeTag, Properties::TTag::NewtonMethod>
|
struct NewtonVerbose<TypeTag, Properties::TTag::NewtonMethod>
|
||||||
{ static constexpr bool value = true; };
|
{ static constexpr bool value = true; };
|
||||||
|
|
||||||
|
template<class TypeTag>
|
||||||
|
struct NewtonWriteConvergence<TypeTag, Properties::TTag::NewtonMethod>
|
||||||
|
{ static constexpr bool value = false; };
|
||||||
|
|
||||||
} // namespace Opm::Parameters
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
@ -161,7 +163,7 @@ public:
|
|||||||
Parameters::registerParam<TypeTag, Parameters::NewtonVerbose>
|
Parameters::registerParam<TypeTag, Parameters::NewtonVerbose>
|
||||||
("Specify whether the Newton method should inform "
|
("Specify whether the Newton method should inform "
|
||||||
"the user about its progress or not");
|
"the user about its progress or not");
|
||||||
Parameters::registerParam<TypeTag, Properties::NewtonWriteConvergence>
|
Parameters::registerParam<TypeTag, Parameters::NewtonWriteConvergence>
|
||||||
("Write the convergence behaviour of the Newton "
|
("Write the convergence behaviour of the Newton "
|
||||||
"method to a VTK file");
|
"method to a VTK file");
|
||||||
Parameters::registerParam<TypeTag, Properties::NewtonTargetIterations>
|
Parameters::registerParam<TypeTag, Properties::NewtonTargetIterations>
|
||||||
@ -549,7 +551,7 @@ protected:
|
|||||||
{
|
{
|
||||||
numIterations_ = 0;
|
numIterations_ = 0;
|
||||||
|
|
||||||
if (Parameters::get<TypeTag, Properties::NewtonWriteConvergence>())
|
if (Parameters::get<TypeTag, Parameters::NewtonWriteConvergence>())
|
||||||
convergenceWriter_.beginTimeStep();
|
convergenceWriter_.beginTimeStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -766,7 +768,7 @@ protected:
|
|||||||
void writeConvergence_(const SolutionVector& currentSolution,
|
void writeConvergence_(const SolutionVector& currentSolution,
|
||||||
const GlobalEqVector& solutionUpdate)
|
const GlobalEqVector& solutionUpdate)
|
||||||
{
|
{
|
||||||
if (Parameters::get<TypeTag, Properties::NewtonWriteConvergence>()) {
|
if (Parameters::get<TypeTag, Parameters::NewtonWriteConvergence>()) {
|
||||||
convergenceWriter_.beginIteration();
|
convergenceWriter_.beginIteration();
|
||||||
convergenceWriter_.writeFields(currentSolution, solutionUpdate);
|
convergenceWriter_.writeFields(currentSolution, solutionUpdate);
|
||||||
convergenceWriter_.endIteration();
|
convergenceWriter_.endIteration();
|
||||||
@ -838,7 +840,7 @@ protected:
|
|||||||
*/
|
*/
|
||||||
void end_()
|
void end_()
|
||||||
{
|
{
|
||||||
if (Parameters::get<TypeTag, Properties::NewtonWriteConvergence>())
|
if (Parameters::get<TypeTag, Parameters::NewtonWriteConvergence>())
|
||||||
convergenceWriter_.endTimeStep();
|
convergenceWriter_.endTimeStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,11 @@ namespace Opm::Parameters {
|
|||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct NewtonVerbose { using type = Properties::UndefinedProperty; };
|
struct NewtonVerbose { using type = Properties::UndefinedProperty; };
|
||||||
|
|
||||||
|
//! Specifies whether the convergence rate and the global residual
|
||||||
|
//! gets written out to disk for every Newton iteration
|
||||||
|
template<class TypeTag, class MyTypeTag>
|
||||||
|
struct NewtonWriteConvergence { using type = Properties::UndefinedProperty; };
|
||||||
|
|
||||||
} // end namespace Opm::Parameters
|
} // end namespace Opm::Parameters
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -39,11 +39,6 @@ struct Linearizer { using type = UndefinedProperty; };
|
|||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct NewtonConvergenceWriter { using type = UndefinedProperty; };
|
struct NewtonConvergenceWriter { using type = UndefinedProperty; };
|
||||||
|
|
||||||
//! Specifies whether the convergence rate and the global residual
|
|
||||||
//! gets written out to disk for every Newton iteration
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
|
||||||
struct NewtonWriteConvergence { using type = UndefinedProperty; };
|
|
||||||
|
|
||||||
//! Specifies whether the convergence rate and the global residual
|
//! Specifies whether the convergence rate and the global residual
|
||||||
//! gets written out to disk for every Newton iteration
|
//! gets written out to disk for every Newton iteration
|
||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
|
Loading…
Reference in New Issue
Block a user