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

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -91,14 +91,14 @@ bool Foam::functionObjects::XiReactionRate::write()
IOobject
(
"St",
time_.timeName(),
time_.name(),
mesh_
),
Xi*Su
);
Log << " Writing turbulent flame-speed field " << St.name()
<< " to " << time_.timeName() << endl;
<< " to " << time_.name() << endl;
St.write();
@ -107,14 +107,14 @@ bool Foam::functionObjects::XiReactionRate::write()
IOobject
(
"wdot",
time_.timeName(),
time_.name(),
mesh_
),
St*mag(fvc::grad(b))
);
Log << " Writing reaction-rate field " << wdot.name()
<< " to " << time_.timeName() << endl;
<< " to " << time_.name() << endl;
wdot.write();

View File

@ -139,7 +139,7 @@ bool Foam::functionObjects::age::execute()
IOobject
(
typeName,
mesh_.time().timeName(),
mesh_.time().name(),
mesh_,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -321,7 +321,7 @@ bool Foam::functionObjects::comfort::execute()
IOobject
(
"hc",
mesh_.time().timeName(),
mesh_.time().name(),
mesh_
),
mesh_,
@ -441,7 +441,7 @@ bool Foam::functionObjects::comfort::execute()
IOobject
(
"TI",
mesh_.time().timeName(),
mesh_.time().name(),
mesh_
),
mesh_,

View File

@ -128,7 +128,7 @@ void Foam::functionObjects::fieldAverage::initialise()
void Foam::functionObjects::fieldAverage::restart()
{
Log << " Restarting averaging at time " << obr_.time().timeName()
Log << " Restarting averaging at time " << obr_.time().name()
<< nl << endl;
totalIter_.clear();
@ -204,7 +204,7 @@ void Foam::functionObjects::fieldAverage::writeAveragingProperties() const
IOobject
(
name() + "Properties",
obr_.time().timeName(),
obr_.time().name(),
"uniform",
obr_,
IOobject::NO_READ,
@ -231,7 +231,7 @@ void Foam::functionObjects::fieldAverage::readAveragingProperties()
{
if ((restartOnRestart_ || restartOnOutput_) && log)
{
Info<< " Starting averaging at time " << obr_.time().timeName()
Info<< " Starting averaging at time " << obr_.time().name()
<< nl;
}
else
@ -250,7 +250,7 @@ void Foam::functionObjects::fieldAverage::readAveragingProperties()
if (!propsDictHeader.headerOk())
{
Log << " Starting averaging at time "
<< obr_.time().timeName() << nl;
<< obr_.time().name() << nl;
return;
}

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-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -59,7 +59,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::faceSign() const
inline Foam::fileName
Foam::functionObjects::fieldValues::surfaceFieldValue::outputDir() const
{
return baseFileDir()/name()/"surface"/obr_.time().timeName();
return baseFileDir()/name()/"surface"/obr_.time().name();
}

View File

@ -256,7 +256,7 @@ bool Foam::functionObjects::fieldValues::volFieldValue::writeValues
(
fieldName + '_' + regionTypeNames_[regionType_]
+ '-' + volRegion::regionName_,
obr_.time().timeName(),
obr_.time().name(),
obr_,
IOobject::NO_READ,
IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,7 +108,7 @@ bool Foam::functionObjects::histogram::write()
IOobject
(
fieldName_,
mesh_.time().timeName(),
mesh_.time().name(),
mesh_,
IOobject::MUST_READ,
IOobject::NO_WRITE

View File

@ -320,7 +320,7 @@ bool Foam::functionObjects::layerAverage::write()
/writeFile::outputPrefix
/(mesh_.name() != polyMesh::defaultRegion ? mesh_.name() : word())
/name()
/mesh_.time().timeName();
/mesh_.time().name();
mkDir(outputPath);
scalarField layerDistance(layerCentre_.size(), 0);

View File

@ -103,7 +103,7 @@ void Foam::functionObjects::nearWallFields::calcAddressing()
OBJstream str
(
mesh_.time().path()
/"wantedTracks_" + mesh_.time().timeName() + ".obj"
/"wantedTracks_" + mesh_.time().name() + ".obj"
);
InfoInFunction << "Dumping tracks to " << str.name() << endl;
@ -165,7 +165,7 @@ void Foam::functionObjects::nearWallFields::calcAddressing()
OBJstream str
(
mesh_.time().path()
/"obtainedTracks_" + mesh_.time().timeName() + ".obj"
/"obtainedTracks_" + mesh_.time().name() + ".obj"
);
InfoInFunction << "Dumping obtained to " << str.name() << endl;
@ -294,7 +294,7 @@ bool Foam::functionObjects::nearWallFields::execute()
Log << type() << " " << name()
<< " write:" << nl
<< " Sampling fields to " << time_.timeName()
<< " Sampling fields to " << time_.name()
<< endl;
sampleFields(vsf_);
@ -311,7 +311,7 @@ bool Foam::functionObjects::nearWallFields::write()
{
DebugInFunction << endl;
Log << " Writing sampled fields to " << time_.timeName()
Log << " Writing sampled fields to " << time_.name()
<< endl;
forAll(vsf_, i)

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-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,7 +64,7 @@ void Foam::functionObjects::nearWallFields::createFields
IOobject
(
sampleFldName,
time_.timeName(),
time_.name(),
mesh_
),
fld,

View File

@ -58,7 +58,7 @@ void Foam::functionObjects::readFields::loadField
IOobject fieldHeader
(
fieldName,
mesh_.time().timeName(),
mesh_.time().name(),
mesh_,
IOobject::MUST_READ,
IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -89,7 +89,7 @@ void Foam::functionObjects::regionSizeDistribution::writeAlphaFields
IOobject
(
alphaName_ + "_liquidCore",
obr_.time().timeName(),
obr_.time().name(),
obr_,
IOobject::NO_READ
),
@ -102,7 +102,7 @@ void Foam::functionObjects::regionSizeDistribution::writeAlphaFields
IOobject
(
alphaName_ + "_background",
obr_.time().timeName(),
obr_.time().name(),
obr_,
IOobject::NO_READ
),
@ -410,7 +410,7 @@ bool Foam::functionObjects::regionSizeDistribution::write()
IOobject
(
alphaName_,
mesh_.time().timeName(),
mesh_.time().name(),
mesh_,
IOobject::MUST_READ,
IOobject::NO_WRITE
@ -508,7 +508,7 @@ bool Foam::functionObjects::regionSizeDistribution::write()
IOobject
(
"region",
mesh_.time().timeName(),
mesh_.time().name(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE

View File

@ -538,7 +538,7 @@ bool Foam::functionObjects::streamlines::write()
/writeFile::outputPrefix
/(mesh_.name() != polyMesh::defaultRegion ? mesh_.name() : word())
/name()
/mesh_.time().timeName();
/mesh_.time().name();
mkDir(outputPath);
// Pass data to the formatter to write

View File

@ -61,7 +61,7 @@ void Foam::functionObjects::turbulenceFields::processField
IOobject
(
scopedName,
obr_.time().timeName(),
obr_.time().name(),
obr_,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -75,7 +75,7 @@ bool Foam::functionObjects::writeCellCentres::write()
IOobject
(
"C",
time_.timeName(),
time_.name(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
@ -86,7 +86,7 @@ bool Foam::functionObjects::writeCellCentres::write()
);
Log << " Writing cell-centre field " << C.name()
<< " to " << time_.timeName() << endl;
<< " to " << time_.name() << endl;
C.write();
@ -97,7 +97,7 @@ bool Foam::functionObjects::writeCellCentres::write()
IOobject
(
mesh_.C().name() + vector::componentNames[i],
time_.timeName(),
time_.name(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
@ -109,7 +109,7 @@ bool Foam::functionObjects::writeCellCentres::write()
Log << " Writing the "
<< vector::componentNames[i]
<< " component field of the cell-centres " << Ci.name()
<< " to " << time_.timeName() << endl;
<< " to " << time_.name() << endl;
Ci.write();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -75,7 +75,7 @@ bool Foam::functionObjects::writeCellVolumes::write()
IOobject
(
mesh_.V().name(),
time_.timeName(),
time_.name(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
@ -89,7 +89,7 @@ bool Foam::functionObjects::writeCellVolumes::write()
V.ref() = mesh_.V();
Log << " Writing cell-volumes field " << V.name()
<< " to " << time_.timeName() << endl;
<< " to " << time_.name() << endl;
V.write();