mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
SimulatorTimer: avoid boost includes in headers
This commit is contained in:
parent
04e856f831
commit
fcb5d3dd82
@ -24,6 +24,9 @@
|
||||
#include <ostream>
|
||||
#include <numeric>
|
||||
|
||||
#include <boost/date_time/gregorian_calendar.hpp>
|
||||
#include <boost/date_time/posix_time/conversion.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
@ -31,7 +34,7 @@ namespace Opm
|
||||
SimulatorTimer::SimulatorTimer()
|
||||
: current_step_(0),
|
||||
current_time_(0.0),
|
||||
start_date_(2012,1,1) // A really arbitrary default starting value?!
|
||||
start_date_(std::make_shared<boost::gregorian::date>(2012,1,1)) // A really arbitrary default starting value?!
|
||||
{
|
||||
}
|
||||
|
||||
@ -58,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.
|
||||
@ -108,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_);
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include <iosfwd>
|
||||
#include <vector>
|
||||
|
||||
namespace boost { namespace gregorian { class date; } }
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
@ -122,7 +124,7 @@ namespace Opm
|
||||
int current_step_;
|
||||
double current_time_;
|
||||
double total_time_;
|
||||
boost::gregorian::date start_date_;
|
||||
std::shared_ptr<boost::gregorian::date> start_date_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user