timeName correction

This commit is contained in:
hamidrezanorouzi 2023-03-17 16:35:57 +03:30
parent f1052acc39
commit 473dbd4497
7 changed files with 19 additions and 8 deletions

View File

@ -95,7 +95,7 @@ public:
realx3 transferPoint(const realx3& p, real dt)
{
if(!inTimeRange()) return p;
return p + 0.5*dt*(velocity0_+velocity_);
return p + static_cast<real>(0.5)*dt*(velocity0_+velocity_);
}
// - IO operation

View File

@ -19,8 +19,8 @@ Licence:
-----------------------------------------------------------------------------*/
#ifndef __Timer_hpp__
#define __Timer_hpp__
#ifndef __Timerr_hpp__
#define __Timerr_hpp__
#include <chrono>

View File

@ -22,8 +22,10 @@ Licence:
#define __Timerss_hpp__
#include "Timer.hpp"
#include "List.hpp"
#include "Timer.hpp"
namespace pFlow
{

View File

@ -85,7 +85,7 @@ bool pFlow::Time::write
{
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 true;

View File

@ -67,8 +67,7 @@ public:
//// - Methods
virtual fileSystem localPath()const
{
word lp = currentTimeWord();
return lp;
return timeName();
}
// - geometry repository

View File

@ -100,6 +100,14 @@ pFlow::timeControl::timeControl(
checkForOutputToFile();
}
pFlow::word pFlow::timeControl::timeName()const
{
if(managedExternaly_)
return timeName_;
else
return currentTimeWord();
}
bool pFlow::timeControl::finalTime()const
{
if( currentTime_ >= endTime_ ) return true;
@ -171,7 +179,7 @@ bool pFlow::timeControl::operator ++(int)
currentIter_++;
currentTime_ += dt_;
if(screenReport())
if(screenReport() && !managedExternaly_)
{
REPORT(0)<<"Time (s): "<<cyanText( currentTimeWord() )<<endREPORT;
}

View File

@ -126,6 +126,8 @@ public:
return startTime_;
}
word timeName()const;
real currentTime() const
{
return currentTime_;