mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-11 00:41:56 -06:00
SimulatorTimer: include boost header instead of forwarding
drop the pointer usage which was used to enable forwarding
This commit is contained in:
parent
c6632d5b83
commit
4786deeffc
@ -34,7 +34,7 @@ namespace Opm
|
||||
SimulatorTimer::SimulatorTimer()
|
||||
: current_step_(0),
|
||||
current_time_(0.0),
|
||||
start_date_(std::make_shared<boost::gregorian::date>(2012,1,1)) // A really arbitrary default starting value?!
|
||||
start_date_(2012,1,1) // A really arbitrary default starting value?!
|
||||
{
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ namespace Opm
|
||||
}
|
||||
|
||||
setCurrentStepNum(report_step);
|
||||
*start_date_ = boost::posix_time::from_time_t(schedule.getStartTime()).date();
|
||||
start_date_ = boost::posix_time::from_time_t(schedule.getStartTime()).date();
|
||||
}
|
||||
|
||||
/// Whether the current step is the first step.
|
||||
@ -111,7 +111,7 @@ namespace Opm
|
||||
|
||||
boost::posix_time::ptime SimulatorTimer::startDateTime() const
|
||||
{
|
||||
return boost::posix_time::ptime(*start_date_);
|
||||
return boost::posix_time::ptime(start_date_);
|
||||
}
|
||||
|
||||
|
||||
|
@ -23,10 +23,11 @@
|
||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||
#include <opm/simulators/timestepping/SimulatorTimerInterface.hpp>
|
||||
|
||||
#include <iosfwd>
|
||||
#include <vector>
|
||||
#include <boost/date_time/gregorian/gregorian_types.hpp>
|
||||
|
||||
namespace boost { namespace gregorian { class date; } }
|
||||
#include <iosfwd>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -114,14 +115,14 @@ namespace Opm
|
||||
bool lastStepFailed() const override { return false; }
|
||||
|
||||
/// return copy of object
|
||||
std::unique_ptr< SimulatorTimerInterface > clone() const override;
|
||||
std::unique_ptr<SimulatorTimerInterface> clone() const override;
|
||||
|
||||
private:
|
||||
std::vector<double> timesteps_;
|
||||
int current_step_;
|
||||
double current_time_;
|
||||
double total_time_;
|
||||
std::shared_ptr<boost::gregorian::date> start_date_;
|
||||
boost::gregorian::date start_date_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user