userTime.diff (2,076 bytes)
diff --git a/src/functionObjects/utilities/timeStep/timeStepFunctionObject.C b/src/functionObjects/utilities/timeStep/timeStepFunctionObject.C
index 5249054..da6295a 100644
--- a/src/functionObjects/utilities/timeStep/timeStepFunctionObject.C
+++ b/src/functionObjects/utilities/timeStep/timeStepFunctionObject.C
@@ -55,7 +55,8 @@ Foam::functionObjects::timeStep::timeStep
)
:
regionFunctionObject(name, runTime, dict),
- logFiles(obr_, name)
+ logFiles(obr_, name),
+ userTime_(false)
{
read(dict);
}
@@ -73,6 +74,8 @@ bool Foam::functionObjects::timeStep::read(const dictionary& dict)
{
functionObject::read(dict);
+ dict.readIfPresent("userTime", userTime_);
+
resetName(typeName);
return true;
@@ -85,8 +88,12 @@ void Foam::functionObjects::timeStep::writeFileHeader(const label i)
{
writeHeader(file(), "Time step");
writeCommented(file(), "Time");
+ writeTabbed(file(), "deltaT");
- file() << tab << "deltaT";
+ if (userTime_)
+ {
+ writeTabbed(file(), "userDeltaT");
+ }
file() << endl;
}
@@ -109,6 +116,11 @@ bool Foam::functionObjects::timeStep::write()
file() << tab << time_.deltaTValue();
+ if (userTime_)
+ {
+ file() << tab << time_.timeToUserTime(time_.deltaTValue()) ;
+ }
+
file() << endl;
}
diff --git a/src/functionObjects/utilities/timeStep/timeStepFunctionObject.H b/src/functionObjects/utilities/timeStep/timeStepFunctionObject.H
index 79a9ba1..072978f 100644
--- a/src/functionObjects/utilities/timeStep/timeStepFunctionObject.H
+++ b/src/functionObjects/utilities/timeStep/timeStepFunctionObject.H
@@ -37,6 +37,7 @@ Description
writeControl timeStep;
writeInterval 1;
+ userTime no;
}
\endverbatim
@@ -74,6 +75,10 @@ class timeStep
public regionFunctionObject,
public logFiles
{
+ // Private member data
+
+ //- Additionally write userTime to the log
+ Switch userTime_;
protected: