mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
AdaptiveSimulatorTimer: void boost includes in header
This commit is contained in:
parent
fcb5d3dd82
commit
30d4cbc2f2
@ -27,13 +27,15 @@
|
|||||||
#include <opm/parser/eclipse/Units/Units.hpp>
|
#include <opm/parser/eclipse/Units/Units.hpp>
|
||||||
#include <opm/simulators/timestepping/AdaptiveSimulatorTimer.hpp>
|
#include <opm/simulators/timestepping/AdaptiveSimulatorTimer.hpp>
|
||||||
|
|
||||||
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
AdaptiveSimulatorTimer::
|
AdaptiveSimulatorTimer::
|
||||||
AdaptiveSimulatorTimer( const SimulatorTimerInterface& timer,
|
AdaptiveSimulatorTimer( const SimulatorTimerInterface& timer,
|
||||||
const double lastStepTaken,
|
const double lastStepTaken,
|
||||||
const double maxTimeStep )
|
const double maxTimeStep )
|
||||||
: start_date_time_( timer.startDateTime() )
|
: start_date_time_( std::make_shared<boost::posix_time::ptime>(timer.startDateTime()) )
|
||||||
, start_time_( timer.simulationTimeElapsed() )
|
, start_time_( timer.simulationTimeElapsed() )
|
||||||
, total_time_( start_time_ + timer.currentStepLength() )
|
, total_time_( start_time_ + timer.currentStepLength() )
|
||||||
, report_step_( timer.reportStepNum() )
|
, report_step_( timer.reportStepNum() )
|
||||||
@ -160,7 +162,7 @@ AdaptiveSimulatorTimer& AdaptiveSimulatorTimer::operator++ ()
|
|||||||
|
|
||||||
boost::posix_time::ptime AdaptiveSimulatorTimer::startDateTime() const
|
boost::posix_time::ptime AdaptiveSimulatorTimer::startDateTime() const
|
||||||
{
|
{
|
||||||
return start_date_time_;
|
return *start_date_time_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// return copy of object
|
/// return copy of object
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <memory>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
#include <opm/simulators/timestepping/SimulatorTimerInterface.hpp>
|
#include <opm/simulators/timestepping/SimulatorTimerInterface.hpp>
|
||||||
@ -106,7 +107,7 @@ namespace Opm
|
|||||||
virtual std::unique_ptr< SimulatorTimerInterface > clone() const;
|
virtual std::unique_ptr< SimulatorTimerInterface > clone() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const boost::posix_time::ptime start_date_time_;
|
std::shared_ptr<boost::posix_time::ptime> start_date_time_;
|
||||||
const double start_time_;
|
const double start_time_;
|
||||||
const double total_time_;
|
const double total_time_;
|
||||||
const int report_step_;
|
const int report_step_;
|
||||||
|
Loading…
Reference in New Issue
Block a user