timeName correction
This commit is contained in:
parent
f1052acc39
commit
473dbd4497
|
@ -95,7 +95,7 @@ public:
|
||||||
realx3 transferPoint(const realx3& p, real dt)
|
realx3 transferPoint(const realx3& p, real dt)
|
||||||
{
|
{
|
||||||
if(!inTimeRange()) return p;
|
if(!inTimeRange()) return p;
|
||||||
return p + 0.5*dt*(velocity0_+velocity_);
|
return p + static_cast<real>(0.5)*dt*(velocity0_+velocity_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - IO operation
|
// - IO operation
|
||||||
|
|
|
@ -19,8 +19,8 @@ Licence:
|
||||||
-----------------------------------------------------------------------------*/
|
-----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __Timer_hpp__
|
#ifndef __Timerr_hpp__
|
||||||
#define __Timer_hpp__
|
#define __Timerr_hpp__
|
||||||
|
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
|
@ -22,8 +22,10 @@ Licence:
|
||||||
#define __Timerss_hpp__
|
#define __Timerss_hpp__
|
||||||
|
|
||||||
|
|
||||||
#include "Timer.hpp"
|
|
||||||
#include "List.hpp"
|
#include "List.hpp"
|
||||||
|
#include "Timer.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace pFlow
|
namespace pFlow
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,7 +85,7 @@ bool pFlow::Time::write
|
||||||
{
|
{
|
||||||
if(outputToFile())
|
if(outputToFile())
|
||||||
{
|
{
|
||||||
REPORT(0)<<"\nWriting to file at time: "<< cyanText(currentTimeWord())<<endREPORT;
|
REPORT(0)<<"\nWriting to file at time: "<< cyanText(timeName())<<endREPORT;
|
||||||
return repository::write(verbose);
|
return repository::write(verbose);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -67,8 +67,7 @@ public:
|
||||||
//// - Methods
|
//// - Methods
|
||||||
virtual fileSystem localPath()const
|
virtual fileSystem localPath()const
|
||||||
{
|
{
|
||||||
word lp = currentTimeWord();
|
return timeName();
|
||||||
return lp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - geometry repository
|
// - geometry repository
|
||||||
|
|
|
@ -100,6 +100,14 @@ pFlow::timeControl::timeControl(
|
||||||
checkForOutputToFile();
|
checkForOutputToFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pFlow::word pFlow::timeControl::timeName()const
|
||||||
|
{
|
||||||
|
if(managedExternaly_)
|
||||||
|
return timeName_;
|
||||||
|
else
|
||||||
|
return currentTimeWord();
|
||||||
|
}
|
||||||
|
|
||||||
bool pFlow::timeControl::finalTime()const
|
bool pFlow::timeControl::finalTime()const
|
||||||
{
|
{
|
||||||
if( currentTime_ >= endTime_ ) return true;
|
if( currentTime_ >= endTime_ ) return true;
|
||||||
|
@ -171,7 +179,7 @@ bool pFlow::timeControl::operator ++(int)
|
||||||
currentIter_++;
|
currentIter_++;
|
||||||
|
|
||||||
currentTime_ += dt_;
|
currentTime_ += dt_;
|
||||||
if(screenReport())
|
if(screenReport() && !managedExternaly_)
|
||||||
{
|
{
|
||||||
REPORT(0)<<"Time (s): "<<cyanText( currentTimeWord() )<<endREPORT;
|
REPORT(0)<<"Time (s): "<<cyanText( currentTimeWord() )<<endREPORT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,6 +126,8 @@ public:
|
||||||
return startTime_;
|
return startTime_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
word timeName()const;
|
||||||
|
|
||||||
real currentTime() const
|
real currentTime() const
|
||||||
{
|
{
|
||||||
return currentTime_;
|
return currentTime_;
|
||||||
|
|
Loading…
Reference in New Issue