Time::timeName(): no longer needed, calls replaced by name()

The timeName() function simply returns the dimensionedScalar::name() which holds
the user-time name of the current time and now that timeName() is no longer
virtual the dimensionedScalar::name() can be called directly.  The timeName()
function implementation is maintained for backward-compatibility.
This commit is contained in:
Henry Weller
2022-11-30 15:53:51 +00:00
parent 262672ec10
commit ed7e703040
546 changed files with 1612 additions and 1613 deletions

View File

@ -456,7 +456,7 @@ int main(int argc, char *argv[])
IOobjectList sprayObjs
(
mesh,
runTime.timeName(),
runTime.name(),
cloud::prefix/cloudDirs[i]
);
@ -466,7 +466,7 @@ int main(int argc, char *argv[])
{
if (allCloudDirs.insert(cloudDirs[i]))
{
Info<< "At time: " << runTime.timeName()
Info<< "At time: " << runTime.name()
<< " detected cloud directory : " << cloudDirs[i]
<< endl;
}
@ -479,10 +479,10 @@ int main(int argc, char *argv[])
{
runTime.setTime(timeDirs[timeI], timeI);
Info<< "Time: " << runTime.timeName() << endl;
Info<< "Time: " << runTime.name() << endl;
word timeDesc =
useTimeName ? runTime.timeName() : Foam::name(runTime.timeIndex());
useTimeName ? runTime.name() : Foam::name(runTime.timeIndex());
// Check for new polyMesh/ and update mesh, fvMeshSubset and cell
// decomposition.
@ -549,7 +549,7 @@ int main(int argc, char *argv[])
// Search for list of objects for this time
IOobjectList objects(mesh, runTime.timeName());
IOobjectList objects(mesh, runTime.name());
HashSet<word> selectedFields;
bool specifiedFields = args.optionReadIfPresent
@ -1148,7 +1148,7 @@ int main(int argc, char *argv[])
IOobjectList sprayObjs
(
mesh,
runTime.timeName(),
runTime.name(),
cloud::prefix/cloudName
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,7 +40,7 @@ void Foam::lagrangianWriter::writeIOField(const wordList& objects)
IOobject header
(
object,
vMesh_.mesh().time().timeName(),
vMesh_.mesh().time().name(),
cloud::prefix/cloudName_,
vMesh_.mesh(),
IOobject::MUST_READ,

View File

@ -90,9 +90,9 @@ bool Foam::functionObjects::writeVTK::write()
{
Info<< type() << " " << name() << " output:" << nl;
Info<< "Time: " << time_.timeName() << endl;
Info<< "Time: " << time_.name() << endl;
word timeDesc = time_.timeName();
word timeDesc = time_.name();
// VTK/ directory in the case
fileName fvPath(time_.path()/"VTK");