Merge pull request #4444 from akva2/adaptivetimesteppingebos_cleanups

AdaptiveTimeSteppingEbos: some cleanups
This commit is contained in:
Bård Skaflestad 2023-02-08 16:41:46 +01:00 committed by GitHub
commit 4148df3752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,8 +3,12 @@
#ifndef OPM_ADAPTIVE_TIME_STEPPING_EBOS_HPP #ifndef OPM_ADAPTIVE_TIME_STEPPING_EBOS_HPP
#define OPM_ADAPTIVE_TIME_STEPPING_EBOS_HPP #define OPM_ADAPTIVE_TIME_STEPPING_EBOS_HPP
#include <iostream> #include <dune/common/version.hh>
#include <utility> #if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 8)
#include <dune/istl/istlexception.hh>
#else
#include <dune/istl/ilu.hh>
#endif
#include <opm/common/Exceptions.hpp> #include <opm/common/Exceptions.hpp>
#include <opm/common/ErrorMacros.hpp> #include <opm/common/ErrorMacros.hpp>
@ -17,12 +21,28 @@
#include <opm/input/eclipse/Schedule/ScheduleState.hpp> #include <opm/input/eclipse/Schedule/ScheduleState.hpp>
#include <opm/input/eclipse/Units/Units.hpp> #include <opm/input/eclipse/Units/Units.hpp>
#include <opm/models/utils/basicproperties.hh>
#include <opm/models/utils/parametersystem.hh>
#include <opm/models/utils/propertysystem.hh>
#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/AdaptiveSimulatorTimer.hpp> #include <opm/simulators/timestepping/AdaptiveSimulatorTimer.hpp>
#include <opm/simulators/timestepping/TimeStepControlInterface.hpp> #include <opm/simulators/timestepping/TimeStepControlInterface.hpp>
#include <opm/simulators/timestepping/TimeStepControl.hpp> #include <opm/simulators/timestepping/TimeStepControl.hpp>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <memory>
#include <ostream>
#include <set>
#include <sstream>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>
namespace Opm::Properties { namespace Opm::Properties {
namespace TTag { namespace TTag {
@ -412,7 +432,7 @@ namespace Opm {
} }
SimulatorReportSingle substepReport; SimulatorReportSingle substepReport;
std::string causeOfFailure = ""; std::string causeOfFailure;
try { try {
substepReport = solver.step(substepTimer); substepReport = solver.step(substepTimer);
if (solverVerbose_) { if (solverVerbose_) {
@ -762,7 +782,7 @@ namespace Opm {
return failing_wells; return failing_wells;
} }
typedef std::unique_ptr<TimeStepControlInterface> TimeStepControlType; using TimeStepControlType = std::unique_ptr<TimeStepControlInterface>;
TimeStepControlType timeStepControl_; //!< time step control object TimeStepControlType timeStepControl_; //!< time step control object
double restartFactor_; //!< factor to multiply time step with when solver fails to converge double restartFactor_; //!< factor to multiply time step with when solver fails to converge