Commit 2662042d authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: improve controls for Time (issue #910)

- relocate some standard functionality to TimePaths to allow a lighter
  means of managing time directories without using the entire Time
  mechanism.

- optional enableLibs for Time construction (default is on)
  and a corresponding argList::noLibs() and "-no-libs" option

STYLE:

- mark Time::outputTime() as deprecated MAY-2016

- use pre-increment for runTime, although there is no difference in
  behaviour or performance.
parent e8c1ae3c
if (runTime.outputTime())
if (runTime.writeTime())
{
volVectorField gradT(fvc::grad(T));
......
......@@ -115,7 +115,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
++runTime;
Info<< "\n\nTime = " << runTime.timeName() << endl;
#include "rhoEqn.H"
......
......@@ -101,8 +101,8 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
// Indicators for refinement. Note: before runTime++
// only for post-processing reasons.
// Indicators for refinement.
// Note: before ++runTime only for post-processing reasons.
tmp<volScalarField> tmagGradP = mag(fvc::grad(p));
volScalarField normalisedGradP
(
......@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
normalisedGradP.writeOpt() = IOobject::AUTO_WRITE;
tmagGradP.clear();
runTime++;
++runTime;
Info<< "\n\nTime = " << runTime.timeName() << endl;
......
......@@ -107,7 +107,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
......
......@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
++runTime;
Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl;
......
......@@ -92,7 +92,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "rhoEqn.H"
......
......@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
#include "setDeltaT.H"
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "solveChemistry.H"
......
......@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
++runTime;
Info<< "Engine time = " << runTime.theta() << runTime.unit()
<< endl;
......
......@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
#include "setMultiRegionDeltaT.H"
#include "setDeltaT.H"
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
......
......@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
#include "setDeltaT.H"
}
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
......
......@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
#include "setDeltaT.H"
}
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
......
......@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
#include "setDeltaT.H"
}
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
......
......@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
#include "readTimeControls.H"
#include "setDeltaT.H"
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
......
......@@ -160,7 +160,7 @@ int main(int argc, char *argv[])
#include "setDeltaT.H"
}
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
......
......@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
......
......@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
#include "setDeltaT.H"
}
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
......
......@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
#include "setDeltaT.H"
}
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
......
......@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
......
......@@ -78,7 +78,7 @@ int main(int argc, char *argv[])
Info<< "Calculating the magnetic field potential" << endl;
runTime++;
++runTime;
while (simple.correctNonOrthogonal())
{
......
......@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
#include "capillaryCourantNo.H"
#include "setDeltaT.H"
runTime++;
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
......@@ -138,7 +138,7 @@ int main(int argc, char *argv[])
Us.correctBoundaryConditions();
}
if (runTime.outputTime())
if (runTime.writeTime())
{
vsm.mapToVolume(h, H.boundaryFieldRef());
vsm.mapToVolume(Us, U.boundaryFieldRef());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment