mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
AdaptiveTimeSteppingEbos: rename to AdaptiveTimeStepping
This commit is contained in:
parent
71b383d8e7
commit
cbb8cb29f5
@ -75,7 +75,7 @@ list (APPEND MAIN_SOURCE_FILES
|
|||||||
opm/simulators/linalg/PropertyTree.cpp
|
opm/simulators/linalg/PropertyTree.cpp
|
||||||
opm/simulators/linalg/setupPropertyTree.cpp
|
opm/simulators/linalg/setupPropertyTree.cpp
|
||||||
opm/simulators/timestepping/AdaptiveSimulatorTimer.cpp
|
opm/simulators/timestepping/AdaptiveSimulatorTimer.cpp
|
||||||
opm/simulators/timestepping/AdaptiveTimeSteppingEbos.cpp
|
opm/simulators/timestepping/AdaptiveTimeStepping.cpp
|
||||||
opm/simulators/timestepping/ConvergenceReport.cpp
|
opm/simulators/timestepping/ConvergenceReport.cpp
|
||||||
opm/simulators/timestepping/TimeStepControl.cpp
|
opm/simulators/timestepping/TimeStepControl.cpp
|
||||||
opm/simulators/timestepping/SimulatorTimer.cpp
|
opm/simulators/timestepping/SimulatorTimer.cpp
|
||||||
@ -525,7 +525,7 @@ list (APPEND PUBLIC_HEADER_FILES
|
|||||||
opm/simulators/linalg/getQuasiImpesWeights.hpp
|
opm/simulators/linalg/getQuasiImpesWeights.hpp
|
||||||
opm/simulators/linalg/setupPropertyTree.hpp
|
opm/simulators/linalg/setupPropertyTree.hpp
|
||||||
opm/simulators/timestepping/AdaptiveSimulatorTimer.hpp
|
opm/simulators/timestepping/AdaptiveSimulatorTimer.hpp
|
||||||
opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp
|
opm/simulators/timestepping/AdaptiveTimeStepping.hpp
|
||||||
opm/simulators/timestepping/ConvergenceReport.hpp
|
opm/simulators/timestepping/ConvergenceReport.hpp
|
||||||
opm/simulators/timestepping/TimeStepControl.hpp
|
opm/simulators/timestepping/TimeStepControl.hpp
|
||||||
opm/simulators/timestepping/TimeStepControlInterface.hpp
|
opm/simulators/timestepping/TimeStepControlInterface.hpp
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
#include <opm/output/eclipse/EclipseIO.hpp>
|
#include <opm/output/eclipse/EclipseIO.hpp>
|
||||||
|
|
||||||
#include <opm/simulators/flow/EclActionHandler.hpp>
|
#include <opm/simulators/flow/EclActionHandler.hpp>
|
||||||
#include <opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp>
|
#include <opm/simulators/timestepping/AdaptiveTimeStepping.hpp>
|
||||||
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
||||||
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
||||||
#include <opm/simulators/utils/ParallelSerialization.hpp>
|
#include <opm/simulators/utils/ParallelSerialization.hpp>
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#include <opm/simulators/flow/countGlobalCells.hpp>
|
#include <opm/simulators/flow/countGlobalCells.hpp>
|
||||||
#include <opm/simulators/flow/NonlinearSolverEbos.hpp>
|
#include <opm/simulators/flow/NonlinearSolverEbos.hpp>
|
||||||
#include <opm/simulators/flow/RSTConv.hpp>
|
#include <opm/simulators/flow/RSTConv.hpp>
|
||||||
#include <opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp>
|
#include <opm/simulators/timestepping/AdaptiveTimeStepping.hpp>
|
||||||
#include <opm/simulators/timestepping/ConvergenceReport.hpp>
|
#include <opm/simulators/timestepping/ConvergenceReport.hpp>
|
||||||
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
||||||
#include <opm/simulators/timestepping/SimulatorTimer.hpp>
|
#include <opm/simulators/timestepping/SimulatorTimer.hpp>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include <opm/simulators/flow/ExtraConvergenceOutputThread.hpp>
|
#include <opm/simulators/flow/ExtraConvergenceOutputThread.hpp>
|
||||||
#include <opm/simulators/flow/NonlinearSolverEbos.hpp>
|
#include <opm/simulators/flow/NonlinearSolverEbos.hpp>
|
||||||
#include <opm/simulators/flow/SimulatorSerializer.hpp>
|
#include <opm/simulators/flow/SimulatorSerializer.hpp>
|
||||||
#include <opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp>
|
#include <opm/simulators/timestepping/AdaptiveTimeStepping.hpp>
|
||||||
#include <opm/simulators/timestepping/ConvergenceReport.hpp>
|
#include <opm/simulators/timestepping/ConvergenceReport.hpp>
|
||||||
#include <opm/simulators/utils/moduleVersion.hpp>
|
#include <opm/simulators/utils/moduleVersion.hpp>
|
||||||
#include <opm/simulators/wells/WellState.hpp>
|
#include <opm/simulators/wells/WellState.hpp>
|
||||||
@ -166,7 +166,7 @@ public:
|
|||||||
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
|
||||||
using AquiferModel = GetPropType<TypeTag, Properties::EclAquiferModel>;
|
using AquiferModel = GetPropType<TypeTag, Properties::EclAquiferModel>;
|
||||||
|
|
||||||
typedef AdaptiveTimeSteppingEbos<TypeTag> TimeStepper;
|
using TimeStepper = AdaptiveTimeStepping<TypeTag>;
|
||||||
typedef BlackOilPolymerModule<TypeTag> PolymerModule;
|
typedef BlackOilPolymerModule<TypeTag> PolymerModule;
|
||||||
typedef BlackOilMICPModule<TypeTag> MICPModule;
|
typedef BlackOilMICPModule<TypeTag> MICPModule;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp>
|
#include <opm/simulators/timestepping/AdaptiveTimeStepping.hpp>
|
||||||
|
|
||||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
#ifndef OPM_ADAPTIVE_TIME_STEPPING_EBOS_HPP
|
#ifndef OPM_ADAPTIVE_TIME_STEPPING_HPP
|
||||||
#define OPM_ADAPTIVE_TIME_STEPPING_EBOS_HPP
|
#define OPM_ADAPTIVE_TIME_STEPPING_HPP
|
||||||
|
|
||||||
#include <dune/common/version.hh>
|
#include <dune/common/version.hh>
|
||||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 8)
|
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 8)
|
||||||
@ -217,14 +217,14 @@ std::set<std::string> consistentlyFailingWells(const std::vector<StepReport>& sr
|
|||||||
// AdaptiveTimeStepping
|
// AdaptiveTimeStepping
|
||||||
//---------------------
|
//---------------------
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
class AdaptiveTimeSteppingEbos
|
class AdaptiveTimeStepping
|
||||||
{
|
{
|
||||||
template <class Solver>
|
template <class Solver>
|
||||||
class SolutionTimeErrorSolverWrapperEbos : public RelativeChangeInterface
|
class SolutionTimeErrorSolverWrapper : public RelativeChangeInterface
|
||||||
{
|
{
|
||||||
const Solver& solver_;
|
const Solver& solver_;
|
||||||
public:
|
public:
|
||||||
SolutionTimeErrorSolverWrapperEbos(const Solver& solver)
|
SolutionTimeErrorSolverWrapper(const Solver& solver)
|
||||||
: solver_(solver)
|
: solver_(solver)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -245,11 +245,11 @@ std::set<std::string> consistentlyFailingWells(const std::vector<StepReport>& sr
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AdaptiveTimeSteppingEbos() = default;
|
AdaptiveTimeStepping() = default;
|
||||||
|
|
||||||
//! \brief contructor taking parameter object
|
//! \brief contructor taking parameter object
|
||||||
AdaptiveTimeSteppingEbos(const UnitSystem& unitSystem,
|
AdaptiveTimeStepping(const UnitSystem& unitSystem,
|
||||||
const bool terminalOutput = true)
|
const bool terminalOutput = true)
|
||||||
: timeStepControl_()
|
: timeStepControl_()
|
||||||
, restartFactor_(EWOMS_GET_PARAM(TypeTag, double, SolverRestartFactor)) // 0.33
|
, restartFactor_(EWOMS_GET_PARAM(TypeTag, double, SolverRestartFactor)) // 0.33
|
||||||
, growthFactor_(EWOMS_GET_PARAM(TypeTag, double, SolverGrowthFactor)) // 2.0
|
, growthFactor_(EWOMS_GET_PARAM(TypeTag, double, SolverGrowthFactor)) // 2.0
|
||||||
@ -275,10 +275,10 @@ std::set<std::string> consistentlyFailingWells(const std::vector<StepReport>& sr
|
|||||||
//! \brief contructor taking parameter object
|
//! \brief contructor taking parameter object
|
||||||
//! \param tuning Pointer to ecl TUNING keyword
|
//! \param tuning Pointer to ecl TUNING keyword
|
||||||
//! \param timeStep current report step
|
//! \param timeStep current report step
|
||||||
AdaptiveTimeSteppingEbos(double max_next_tstep,
|
AdaptiveTimeStepping(double max_next_tstep,
|
||||||
const Tuning& tuning,
|
const Tuning& tuning,
|
||||||
const UnitSystem& unitSystem,
|
const UnitSystem& unitSystem,
|
||||||
const bool terminalOutput = true)
|
const bool terminalOutput = true)
|
||||||
: timeStepControl_()
|
: timeStepControl_()
|
||||||
, restartFactor_(tuning.TSFCNV)
|
, restartFactor_(tuning.TSFCNV)
|
||||||
, growthFactor_(tuning.TFDIFF)
|
, growthFactor_(tuning.TFDIFF)
|
||||||
@ -454,7 +454,7 @@ std::set<std::string> consistentlyFailingWells(const std::vector<StepReport>& sr
|
|||||||
++substepTimer;
|
++substepTimer;
|
||||||
|
|
||||||
// create object to compute the time error, simply forwards the call to the model
|
// create object to compute the time error, simply forwards the call to the model
|
||||||
SolutionTimeErrorSolverWrapperEbos<Solver> relativeChange(solver);
|
SolutionTimeErrorSolverWrapper<Solver> relativeChange(solver);
|
||||||
|
|
||||||
// compute new time step estimate
|
// compute new time step estimate
|
||||||
const int iterations = useNewtonIteration_ ? substepReport.total_newton_iterations
|
const int iterations = useNewtonIteration_ ? substepReport.total_newton_iterations
|
||||||
@ -666,27 +666,27 @@ std::set<std::string> consistentlyFailingWells(const std::vector<StepReport>& sr
|
|||||||
serializer(minTimeStepBeforeShuttingProblematicWells_);
|
serializer(minTimeStepBeforeShuttingProblematicWells_);
|
||||||
}
|
}
|
||||||
|
|
||||||
static AdaptiveTimeSteppingEbos<TypeTag> serializationTestObjectHardcoded()
|
static AdaptiveTimeStepping<TypeTag> serializationTestObjectHardcoded()
|
||||||
{
|
{
|
||||||
return serializationTestObject_<HardcodedTimeStepControl>();
|
return serializationTestObject_<HardcodedTimeStepControl>();
|
||||||
}
|
}
|
||||||
|
|
||||||
static AdaptiveTimeSteppingEbos<TypeTag> serializationTestObjectPID()
|
static AdaptiveTimeStepping<TypeTag> serializationTestObjectPID()
|
||||||
{
|
{
|
||||||
return serializationTestObject_<PIDTimeStepControl>();
|
return serializationTestObject_<PIDTimeStepControl>();
|
||||||
}
|
}
|
||||||
|
|
||||||
static AdaptiveTimeSteppingEbos<TypeTag> serializationTestObjectPIDIt()
|
static AdaptiveTimeStepping<TypeTag> serializationTestObjectPIDIt()
|
||||||
{
|
{
|
||||||
return serializationTestObject_<PIDAndIterationCountTimeStepControl>();
|
return serializationTestObject_<PIDAndIterationCountTimeStepControl>();
|
||||||
}
|
}
|
||||||
|
|
||||||
static AdaptiveTimeSteppingEbos<TypeTag> serializationTestObjectSimple()
|
static AdaptiveTimeStepping<TypeTag> serializationTestObjectSimple()
|
||||||
{
|
{
|
||||||
return serializationTestObject_<SimpleIterationCountTimeStepControl>();
|
return serializationTestObject_<SimpleIterationCountTimeStepControl>();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(const AdaptiveTimeSteppingEbos<TypeTag>& rhs)
|
bool operator==(const AdaptiveTimeStepping<TypeTag>& rhs)
|
||||||
{
|
{
|
||||||
if (timeStepControlType_ != rhs.timeStepControlType_ ||
|
if (timeStepControlType_ != rhs.timeStepControlType_ ||
|
||||||
(timeStepControl_ && !rhs.timeStepControl_) ||
|
(timeStepControl_ && !rhs.timeStepControl_) ||
|
||||||
@ -728,9 +728,9 @@ std::set<std::string> consistentlyFailingWells(const std::vector<StepReport>& sr
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
template<class Controller>
|
template<class Controller>
|
||||||
static AdaptiveTimeSteppingEbos<TypeTag> serializationTestObject_()
|
static AdaptiveTimeStepping<TypeTag> serializationTestObject_()
|
||||||
{
|
{
|
||||||
AdaptiveTimeSteppingEbos<TypeTag> result;
|
AdaptiveTimeStepping<TypeTag> result;
|
||||||
|
|
||||||
result.restartFactor_ = 1.0;
|
result.restartFactor_ = 1.0;
|
||||||
result.growthFactor_ = 2.0;
|
result.growthFactor_ = 2.0;
|
||||||
@ -760,7 +760,7 @@ std::set<std::string> consistentlyFailingWells(const std::vector<StepReport>& sr
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
bool castAndComp(const AdaptiveTimeSteppingEbos<TypeTag>& Rhs) const
|
bool castAndComp(const AdaptiveTimeStepping<TypeTag>& Rhs) const
|
||||||
{
|
{
|
||||||
const T* lhs = static_cast<const T*>(timeStepControl_.get());
|
const T* lhs = static_cast<const T*>(timeStepControl_.get());
|
||||||
const T* rhs = static_cast<const T*>(Rhs.timeStepControl_.get());
|
const T* rhs = static_cast<const T*>(Rhs.timeStepControl_.get());
|
||||||
@ -846,4 +846,4 @@ std::set<std::string> consistentlyFailingWells(const std::vector<StepReport>& sr
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // OPM_ADAPTIVE_TIME_STEPPING_EBOS_HPP
|
#endif // OPM_ADAPTIVE_TIME_STEPPING_HPP
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#include <opm/models/blackoil/blackoilprimaryvariables.hh>
|
#include <opm/models/blackoil/blackoilprimaryvariables.hh>
|
||||||
|
|
||||||
#include <opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp>
|
#include <opm/simulators/timestepping/AdaptiveTimeStepping.hpp>
|
||||||
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
||||||
#include <opm/simulators/timestepping/SimulatorTimer.hpp>
|
#include <opm/simulators/timestepping/SimulatorTimer.hpp>
|
||||||
#include <opm/simulators/timestepping/TimeStepControl.hpp>
|
#include <opm/simulators/timestepping/TimeStepControl.hpp>
|
||||||
@ -112,11 +112,11 @@ TEST_FOR_TYPE(SimulatorReport)
|
|||||||
TEST_FOR_TYPE(SimulatorReportSingle)
|
TEST_FOR_TYPE(SimulatorReportSingle)
|
||||||
TEST_FOR_TYPE(SimulatorTimer)
|
TEST_FOR_TYPE(SimulatorTimer)
|
||||||
|
|
||||||
namespace Opm { using ATE = AdaptiveTimeSteppingEbos<Properties::TTag::EbosTypeTag>; }
|
namespace Opm { using ATS = AdaptiveTimeStepping<Properties::TTag::EbosTypeTag>; }
|
||||||
TEST_FOR_TYPE_NAMED_OBJ(ATE, AdaptiveTimeSteppingEbosHardcoded, serializationTestObjectHardcoded)
|
TEST_FOR_TYPE_NAMED_OBJ(ATS, AdaptiveTimeSteppingHardcoded, serializationTestObjectHardcoded)
|
||||||
TEST_FOR_TYPE_NAMED_OBJ(ATE, AdaptiveTimeSteppingEbosPID, serializationTestObjectPID)
|
TEST_FOR_TYPE_NAMED_OBJ(ATS, AdaptiveTimeSteppingPID, serializationTestObjectPID)
|
||||||
TEST_FOR_TYPE_NAMED_OBJ(ATE, AdaptiveTimeSteppingEbosPIDIt, serializationTestObjectPIDIt)
|
TEST_FOR_TYPE_NAMED_OBJ(ATS, AdaptiveTimeSteppingPIDIt, serializationTestObjectPIDIt)
|
||||||
TEST_FOR_TYPE_NAMED_OBJ(ATE, AdaptiveTimeSteppingEbosSimple, serializationTestObjectSimple)
|
TEST_FOR_TYPE_NAMED_OBJ(ATS, AdaptiveTimeSteppingSimple, serializationTestObjectSimple)
|
||||||
|
|
||||||
namespace Opm { using BPV = BlackOilPrimaryVariables<Properties::TTag::EbosTypeTag>; }
|
namespace Opm { using BPV = BlackOilPrimaryVariables<Properties::TTag::EbosTypeTag>; }
|
||||||
TEST_FOR_TYPE_NAMED(BPV, BlackoilPrimaryVariables)
|
TEST_FOR_TYPE_NAMED(BPV, BlackoilPrimaryVariables)
|
||||||
@ -445,7 +445,7 @@ struct AquiferFixture {
|
|||||||
"test_RestartSerialization",
|
"test_RestartSerialization",
|
||||||
"--ecl-deck-file-name=GLIFT1.DATA"
|
"--ecl-deck-file-name=GLIFT1.DATA"
|
||||||
};
|
};
|
||||||
Opm::AdaptiveTimeSteppingEbos<TT>::registerParameters();
|
Opm::AdaptiveTimeStepping<TT>::registerParameters();
|
||||||
Opm::setupParameters_<TT>(2, argv, /*registerParams=*/true);
|
Opm::setupParameters_<TT>(2, argv, /*registerParams=*/true);
|
||||||
Opm::EclGenericVanguard::setCommunication(std::make_unique<Opm::Parallel::Communication>());
|
Opm::EclGenericVanguard::setCommunication(std::make_unique<Opm::Parallel::Communication>());
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ struct EquilFixture {
|
|||||||
#endif
|
#endif
|
||||||
Opm::EclGenericVanguard::setCommunication(std::make_unique<Opm::Parallel::Communication>());
|
Opm::EclGenericVanguard::setCommunication(std::make_unique<Opm::Parallel::Communication>());
|
||||||
Opm::BlackoilModelParameters<TypeTag>::registerParameters();
|
Opm::BlackoilModelParameters<TypeTag>::registerParameters();
|
||||||
Opm::AdaptiveTimeSteppingEbos<TypeTag>::registerParameters();
|
Opm::AdaptiveTimeStepping<TypeTag>::registerParameters();
|
||||||
Opm::Parameters::registerParam<TypeTag, bool>("EnableTerminalOutput",
|
Opm::Parameters::registerParam<TypeTag, bool>("EnableTerminalOutput",
|
||||||
"EnableTerminalOutput",
|
"EnableTerminalOutput",
|
||||||
Opm::getPropValue<TypeTag, Opm::Properties::EnableTerminalOutput>(),
|
Opm::getPropValue<TypeTag, Opm::Properties::EnableTerminalOutput>(),
|
||||||
|
Loading…
Reference in New Issue
Block a user