mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #1243 from blattms/write-initial-oip
Write the initial OIP values if requested.
This commit is contained in:
commit
babf06eade
@ -196,7 +196,7 @@ namespace Opm
|
||||
const data::Solution& simProps,
|
||||
const std::map<std::string, double>& miscSummaryData,
|
||||
const std::map<std::string, std::vector<double>>& extraRestartData,
|
||||
bool substep )
|
||||
bool substep)
|
||||
: writer_( writer ),
|
||||
timer_( timer.clone() ),
|
||||
state_( state ),
|
||||
@ -338,6 +338,11 @@ namespace Opm
|
||||
if (initConfig.restartRequested() && ((initConfig.getRestartStep()) == (timer.currentStepNum()))) {
|
||||
std::cout << "Skipping restart write in start of step " << timer.currentStepNum() << std::endl;
|
||||
} else {
|
||||
if ( timer.initialStep() )
|
||||
{
|
||||
// Set the initial OIP
|
||||
eclIO_->overwriteInitialOIP(simProps);
|
||||
}
|
||||
// ... insert "extra" data (KR, VISC, ...)
|
||||
eclIO_->writeTimeStep(timer.reportStepNum(),
|
||||
substep,
|
||||
|
@ -272,7 +272,7 @@ namespace Opm
|
||||
const data::Solution& simProps,
|
||||
const std::map<std::string, double>& miscSummaryData,
|
||||
const std::map<std::string, std::vector<double>>& extraRestartData,
|
||||
bool substep);
|
||||
bool substep );
|
||||
|
||||
/** \brief return output directory */
|
||||
const std::string& outputDirectory() const { return outputDir_; }
|
||||
|
@ -51,7 +51,12 @@ namespace Opm
|
||||
provideTimeStepEstimate( lastStepTaken );
|
||||
}
|
||||
|
||||
AdaptiveSimulatorTimer& AdaptiveSimulatorTimer::operator++ ()
|
||||
bool AdaptiveSimulatorTimer::initialStep () const
|
||||
{
|
||||
return ( report_step_ == 0 ) && ( current_step_ == 0 );
|
||||
}
|
||||
|
||||
AdaptiveSimulatorTimer& AdaptiveSimulatorTimer::operator++ ()
|
||||
{
|
||||
++current_step_;
|
||||
current_time_ += dt_;
|
||||
|
@ -56,6 +56,9 @@ namespace Opm
|
||||
/// \brief provide and estimate for new time step size
|
||||
void provideTimeStepEstimate( const double dt_estimate );
|
||||
|
||||
/// \brief Whether this is the first step
|
||||
bool initialStep () const;
|
||||
|
||||
/// \brief \copydoc SimulationTimer::currentStepNum
|
||||
int currentStepNum () const;
|
||||
|
||||
|
@ -83,6 +83,9 @@ namespace Opm
|
||||
/// Return true if timer indicates that simulation of timer interval is finished
|
||||
virtual bool done() const = 0;
|
||||
|
||||
/// Whether the current step is the first step.
|
||||
virtual bool initialStep() const = 0;
|
||||
|
||||
/// Return start date of simulation
|
||||
virtual boost::posix_time::ptime startDateTime() const = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user