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:
@ -151,7 +151,7 @@ void decomposeUniform
|
||||
{
|
||||
fileHandler().ln
|
||||
(
|
||||
parentPath/runTime.timeName()/uniformDir,
|
||||
parentPath/runTime.name()/uniformDir,
|
||||
uniformDir
|
||||
);
|
||||
}
|
||||
@ -169,7 +169,7 @@ void writeDecomposition(const domainDecomposition& meshes)
|
||||
IOobject
|
||||
(
|
||||
"cellProc",
|
||||
meshes.completeMesh().time().timeName(),
|
||||
meshes.completeMesh().time().name(),
|
||||
meshes.completeMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
@ -453,7 +453,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
writeCellProc
|
||||
&& meshes.completeMesh().facesInstance()
|
||||
== runTimes.completeTime().timeName()
|
||||
== runTimes.completeTime().name()
|
||||
)
|
||||
{
|
||||
writeDecomposition(meshes);
|
||||
@ -497,7 +497,7 @@ int main(int argc, char *argv[])
|
||||
IOobject
|
||||
(
|
||||
"",
|
||||
procRunTime.timeName(),
|
||||
procRunTime.name(),
|
||||
procRunTime
|
||||
),
|
||||
word::null
|
||||
@ -523,7 +523,7 @@ int main(int argc, char *argv[])
|
||||
IOobjectList objects
|
||||
(
|
||||
meshes.completeMesh(),
|
||||
runTimes.completeTime().timeName()
|
||||
runTimes.completeTime().name()
|
||||
);
|
||||
|
||||
// Construct the vol fields
|
||||
@ -643,7 +643,7 @@ int main(int argc, char *argv[])
|
||||
IOobjectList sprayObjs
|
||||
(
|
||||
meshes.completeMesh(),
|
||||
runTimes.completeTime().timeName(),
|
||||
runTimes.completeTime().name(),
|
||||
cloud::prefix/cloudDirs[i],
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -736,7 +736,7 @@ int main(int argc, char *argv[])
|
||||
IOobjectList lagrangianObjects
|
||||
(
|
||||
meshes.completeMesh(),
|
||||
runTimes.completeTime().timeName(),
|
||||
runTimes.completeTime().name(),
|
||||
cloud::prefix/cloudDirs[cloudI],
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
|
||||
@ -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
|
||||
@ -45,7 +45,7 @@ Foam::dimFieldDecomposer::decomposeField
|
||||
IOobject
|
||||
(
|
||||
field.name(),
|
||||
procMesh_.time().timeName(),
|
||||
procMesh_.time().name(),
|
||||
procMesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
|
||||
@ -113,7 +113,7 @@ Foam::fvFieldDecomposer::decomposeField
|
||||
IOobject
|
||||
(
|
||||
field.name(),
|
||||
procMesh_.time().timeName(),
|
||||
procMesh_.time().name(),
|
||||
procMesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -258,7 +258,7 @@ Foam::fvFieldDecomposer::decomposeField
|
||||
IOobject
|
||||
(
|
||||
field.name(),
|
||||
procMesh_.time().timeName(),
|
||||
procMesh_.time().name(),
|
||||
procMesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
|
||||
@ -135,7 +135,7 @@ Foam::lagrangianFieldDecomposer::decomposeField
|
||||
IOobject
|
||||
(
|
||||
field.name(),
|
||||
procMesh_.time().timeName(),
|
||||
procMesh_.time().name(),
|
||||
cloud::prefix/cloudName,
|
||||
procMesh_,
|
||||
IOobject::NO_READ,
|
||||
@ -167,7 +167,7 @@ Foam::lagrangianFieldDecomposer::decomposeFieldField
|
||||
IOobject
|
||||
(
|
||||
field.name(),
|
||||
procMesh_.time().timeName(),
|
||||
procMesh_.time().name(),
|
||||
cloud::prefix/cloudName,
|
||||
procMesh_,
|
||||
IOobject::NO_READ,
|
||||
|
||||
@ -80,7 +80,7 @@ Foam::pointFieldDecomposer::decomposeField
|
||||
IOobject
|
||||
(
|
||||
field.name(),
|
||||
procMesh_().time().timeName(),
|
||||
procMesh_().time().name(),
|
||||
procMesh_(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
|
||||
@ -110,7 +110,7 @@ Foam::fvFieldReconstructor::reconstructFvVolumeInternalField
|
||||
IOobject
|
||||
(
|
||||
fieldIoObject.name(),
|
||||
procMeshes_[proci].time().timeName(),
|
||||
procMeshes_[proci].time().name(),
|
||||
procMeshes_[proci],
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -126,7 +126,7 @@ Foam::fvFieldReconstructor::reconstructFvVolumeInternalField
|
||||
IOobject
|
||||
(
|
||||
fieldIoObject.name(),
|
||||
completeMesh_.time().timeName(),
|
||||
completeMesh_.time().name(),
|
||||
completeMesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -274,7 +274,7 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField
|
||||
IOobject
|
||||
(
|
||||
fieldIoObject.name(),
|
||||
procMeshes_[proci].time().timeName(),
|
||||
procMeshes_[proci].time().name(),
|
||||
procMeshes_[proci],
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -290,7 +290,7 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField
|
||||
IOobject
|
||||
(
|
||||
fieldIoObject.name(),
|
||||
completeMesh_.time().timeName(),
|
||||
completeMesh_.time().name(),
|
||||
completeMesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -437,7 +437,7 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField
|
||||
IOobject
|
||||
(
|
||||
fieldIoObject.name(),
|
||||
procMeshes_[proci].time().timeName(),
|
||||
procMeshes_[proci].time().name(),
|
||||
procMeshes_[proci],
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -453,7 +453,7 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField
|
||||
IOobject
|
||||
(
|
||||
fieldIoObject.name(),
|
||||
completeMesh_.time().timeName(),
|
||||
completeMesh_.time().name(),
|
||||
completeMesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
|
||||
@ -47,7 +47,7 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
|
||||
IOobject
|
||||
(
|
||||
fieldIoObject.name(),
|
||||
procMeshes_[proci]().time().timeName(),
|
||||
procMeshes_[proci]().time().name(),
|
||||
procMeshes_[proci](),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
@ -125,7 +125,7 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
|
||||
IOobject
|
||||
(
|
||||
fieldIoObject.name(),
|
||||
completeMesh_().time().timeName(),
|
||||
completeMesh_().time().name(),
|
||||
completeMesh_(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
|
||||
@ -46,7 +46,7 @@ Foam::tmp<Foam::IOField<Type>> Foam::reconstructLagrangianField
|
||||
IOobject
|
||||
(
|
||||
fieldName,
|
||||
mesh.time().timeName(),
|
||||
mesh.time().name(),
|
||||
cloud::prefix/cloudName,
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
@ -63,7 +63,7 @@ Foam::tmp<Foam::IOField<Type>> Foam::reconstructLagrangianField
|
||||
typeIOobject<IOField<Type>> localIOobject
|
||||
(
|
||||
fieldName,
|
||||
meshes[i].time().timeName(),
|
||||
meshes[i].time().name(),
|
||||
cloud::prefix/cloudName,
|
||||
meshes[i],
|
||||
IOobject::MUST_READ,
|
||||
@ -106,7 +106,7 @@ Foam::reconstructLagrangianFieldField
|
||||
IOobject
|
||||
(
|
||||
fieldName,
|
||||
mesh.time().timeName(),
|
||||
mesh.time().name(),
|
||||
cloud::prefix/cloudName,
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
@ -123,7 +123,7 @@ Foam::reconstructLagrangianFieldField
|
||||
IOobject localIOobject
|
||||
(
|
||||
fieldName,
|
||||
meshes[i].time().timeName(),
|
||||
meshes[i].time().name(),
|
||||
cloud::prefix/cloudName,
|
||||
meshes[i],
|
||||
IOobject::MUST_READ,
|
||||
|
||||
@ -71,7 +71,7 @@ void writeDecomposition(const domainDecomposition& meshes)
|
||||
IOobject
|
||||
(
|
||||
"cellProc",
|
||||
meshes.completeMesh().time().timeName(),
|
||||
meshes.completeMesh().time().name(),
|
||||
meshes.completeMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
@ -312,7 +312,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
writeCellProc
|
||||
&& meshes.completeMesh().facesInstance()
|
||||
== runTimes.completeTime().timeName()
|
||||
== runTimes.completeTime().name()
|
||||
)
|
||||
{
|
||||
writeDecomposition(meshes);
|
||||
@ -323,7 +323,7 @@ int main(int argc, char *argv[])
|
||||
IOobjectList objects
|
||||
(
|
||||
meshes.procMeshes()[0],
|
||||
runTimes.procTimes()[0].timeName()
|
||||
runTimes.procTimes()[0].name()
|
||||
);
|
||||
|
||||
if (!noFields)
|
||||
@ -527,7 +527,7 @@ int main(int argc, char *argv[])
|
||||
IOobjectList sprayObjs
|
||||
(
|
||||
meshes.procMeshes()[proci],
|
||||
runTimes.procTimes()[proci].timeName(),
|
||||
runTimes.procTimes()[proci].name(),
|
||||
cloud::prefix/cloudDirs[i]
|
||||
);
|
||||
|
||||
|
||||
@ -170,7 +170,7 @@ void writeDecomposition
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
mesh.time().timeName(),
|
||||
mesh.time().name(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE,
|
||||
@ -276,7 +276,7 @@ void readFields
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
mesh.thisDb().time().timeName(),
|
||||
mesh.thisDb().time().name(),
|
||||
mesh.thisDb(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
@ -461,7 +461,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
// Get original objects (before incrementing time!)
|
||||
IOobjectList objects(mesh, runTime.timeName());
|
||||
IOobjectList objects(mesh, runTime.name());
|
||||
// We don't want to map the decomposition (mapping already tested when
|
||||
// mapping the cell centre field)
|
||||
IOobjectList::iterator iter = objects.find("decomposition");
|
||||
@ -661,7 +661,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
mesh.setInstance(masterInstDir);
|
||||
}
|
||||
Info<< "Writing redistributed mesh to " << runTime.timeName() << nl << endl;
|
||||
Info<< "Writing redistributed mesh to " << runTime.name() << nl << endl;
|
||||
mesh.write();
|
||||
|
||||
|
||||
@ -676,7 +676,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< nl
|
||||
<< "You can pick up the redecomposed mesh from the polyMesh directory"
|
||||
<< " in " << runTime.timeName() << "." << nl
|
||||
<< " in " << runTime.name() << "." << nl
|
||||
<< "If you redecomposed the mesh to less processors you can delete"
|
||||
<< nl
|
||||
<< "the processor directories with 0 sized meshes in them." << nl
|
||||
@ -694,7 +694,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
fileName timeDir = procDir/runTime.timeName()/meshSubDir;
|
||||
fileName timeDir = procDir/runTime.name()/meshSubDir;
|
||||
fileName constDir = procDir/runTime.constant()/meshSubDir;
|
||||
|
||||
Info<< " rm -r " << constDir.c_str() << nl
|
||||
|
||||
Reference in New Issue
Block a user