mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
AdaptiveTimeSteppingEbos: avoid boost include in header
This commit is contained in:
parent
30d4cbc2f2
commit
fce3247c56
@ -46,8 +46,9 @@ list (APPEND MAIN_SOURCE_FILES
|
||||
opm/simulators/utils/PartiallySupportedFlowKeywords.cpp
|
||||
opm/simulators/utils/readDeck.cpp
|
||||
opm/simulators/utils/UnsupportedFlowKeywords.cpp
|
||||
opm/simulators/timestepping/TimeStepControl.cpp
|
||||
opm/simulators/timestepping/AdaptiveSimulatorTimer.cpp
|
||||
opm/simulators/timestepping/AdaptiveTimeSteppingEbos.cpp
|
||||
opm/simulators/timestepping/TimeStepControl.cpp
|
||||
opm/simulators/timestepping/SimulatorTimer.cpp
|
||||
opm/simulators/timestepping/gatherConvergenceReport.cpp
|
||||
opm/simulators/utils/DeferredLogger.cpp
|
||||
|
27
opm/simulators/timestepping/AdaptiveTimeSteppingEbos.cpp
Normal file
27
opm/simulators/timestepping/AdaptiveTimeSteppingEbos.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
#include <opm/parser/eclipse/Units/Units.hpp>
|
||||
#include <opm/simulators/timestepping/AdaptiveSimulatorTimer.hpp>
|
||||
#include <boost/date_time.hpp>
|
||||
#include <sstream>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void logTimer(const AdaptiveSimulatorTimer& substepTimer)
|
||||
{
|
||||
std::ostringstream ss;
|
||||
boost::posix_time::time_facet* facet = new boost::posix_time::time_facet("%d-%b-%Y");
|
||||
ss.imbue(std::locale(std::locale::classic(), facet));
|
||||
ss <<"\nStarting time step " << substepTimer.currentStepNum() << ", stepsize "
|
||||
<< unit::convert::to(substepTimer.currentStepLength(), unit::day) << " days,"
|
||||
<< " at day " << (double)unit::convert::to(substepTimer.simulationTimeElapsed(), unit::day)
|
||||
<< "/" << (double)unit::convert::to(substepTimer.totalTime(), unit::day)
|
||||
<< ", date = " << substepTimer.currentDateTime();
|
||||
OpmLog::info(ss.str());
|
||||
}
|
||||
|
||||
}
|
@ -18,8 +18,6 @@
|
||||
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
||||
#include <opm/common/Exceptions.hpp>
|
||||
|
||||
#include <boost/date_time.hpp>
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
@ -224,6 +222,7 @@ struct MinTimeStepBasedOnNewtonIterations<TypeTag, TTag::FlowTimeSteppingParamet
|
||||
namespace Opm {
|
||||
// AdaptiveTimeStepping
|
||||
//---------------------
|
||||
void logTimer(const AdaptiveSimulatorTimer& substepTimer);
|
||||
|
||||
template<class TypeTag>
|
||||
class AdaptiveTimeSteppingEbos
|
||||
@ -391,15 +390,7 @@ namespace Opm {
|
||||
// get current delta t
|
||||
const double dt = substepTimer.currentStepLength() ;
|
||||
if (timestepVerbose_) {
|
||||
std::ostringstream ss;
|
||||
boost::posix_time::time_facet* facet = new boost::posix_time::time_facet("%d-%b-%Y");
|
||||
ss.imbue(std::locale(std::locale::classic(), facet));
|
||||
ss <<"\nStarting time step " << substepTimer.currentStepNum() << ", stepsize "
|
||||
<< unit::convert::to(substepTimer.currentStepLength(), unit::day) << " days,"
|
||||
<< " at day " << (double)unit::convert::to(substepTimer.simulationTimeElapsed(), unit::day)
|
||||
<< "/" << (double)unit::convert::to(substepTimer.totalTime(), unit::day)
|
||||
<< ", date = " << substepTimer.currentDateTime();
|
||||
OpmLog::info(ss.str());
|
||||
logTimer(substepTimer);
|
||||
}
|
||||
|
||||
SimulatorReportSingle substepReport;
|
||||
|
Loading…
Reference in New Issue
Block a user