Merge pull request #1045 from qilicun/time-messages-to-PRT-file

Change adaptive time stepping message type to OpmLog::note
This commit is contained in:
Atgeirr Flø Rasmussen 2016-06-30 09:19:49 +02:00 committed by GitHub
commit 9c6eeae068
3 changed files with 18 additions and 7 deletions

View File

@ -157,8 +157,8 @@ namespace Opm {
if( timestep_verbose_ )
{
std::ostringstream ss;
ss <<"Substep( " << substepTimer.currentStepNum() << " ), try with stepsize "
<< unit::convert::to(substepTimer.currentStepLength(), unit::day) << " (days)." << std::endl;
ss <<"Adaptive time step (" << substepTimer.currentStepNum() << "), stepsize "
<< unit::convert::to(substepTimer.currentStepLength(), unit::day) << " days.";
OpmLog::info(ss.str());
}
@ -169,7 +169,7 @@ namespace Opm {
if( solver_verbose_ ) {
// report number of linear iterations
OpmLog::info("Overall linear iterations used: " + std::to_string(linearIterations));
OpmLog::note("Overall linear iterations used: " + std::to_string(linearIterations));
}
}
catch (const Opm::NumericalProblem& e) {
@ -215,9 +215,12 @@ namespace Opm {
if( timestep_verbose_ )
{
std::ostringstream ss;
ss << "Substep( " << substepTimer.currentStepNum()-1 // it was already advanced by ++
<< " ) finished at time " << unit::convert::to(substepTimer.simulationTimeElapsed(),unit::day) << " (days)." << std::endl << std::endl;
std::ostringstream ss;
if (solver.wellIterations() != std::numeric_limits<int>::min()) {
ss << "well iterations = " << solver.wellIterations() << ", ";
}
ss << "non-linear iterations = " << solver.nonlinearIterations()
<< ", total linear iterations = " << solver.linearIterations();
OpmLog::info(ss.str());
}
@ -267,7 +270,7 @@ namespace Opm {
std::ostringstream ss;
substepTimer.report(ss);
ss << "Suggested next step size = " << unit::convert::to( suggested_next_timestep_, unit::day ) << " (days)" << std::endl;
OpmLog::info(ss.str());
OpmLog::note(ss.str());
}
if( ! std::isfinite( suggested_next_timestep_ ) ) { // check for NaN

View File

@ -108,6 +108,11 @@ namespace Opm
}
boost::posix_time::ptime SimulatorTimer::currentDateTime() const
{
return startDateTime() + boost::posix_time::seconds( (int) simulationTimeElapsed());
}
/// Total time.
double SimulatorTimer::totalTime() const
{

View File

@ -85,6 +85,9 @@ namespace Opm
/// Return start date of simulation
boost::posix_time::ptime startDateTime() const;
/// Return current date.
boost::posix_time::ptime currentDateTime() const;
/// Set total time.
/// This is primarily intended for multi-epoch schedules,
/// where a timer for a given epoch does not have