mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Enable Time objects for writeObjects FO
This commit is contained in:
committed by
Andrew Heather
parent
73d6fc9e91
commit
053727d2d9
@ -60,6 +60,22 @@ Foam::functionObjects::writeObjects::writeOptionNames_
|
|||||||
{ writeOption::ANY_WRITE, "anyWrite" },
|
{ writeOption::ANY_WRITE, "anyWrite" },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const Foam::objectRegistry& setRegistry
|
||||||
|
(
|
||||||
|
const Foam::Time& runTime,
|
||||||
|
const Foam::dictionary& dict
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const Foam::word regionName =
|
||||||
|
dict.getOrDefault("region", Foam::polyMesh::defaultRegion);
|
||||||
|
|
||||||
|
if (regionName == "__TIME__")
|
||||||
|
{
|
||||||
|
return runTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
return runTime.lookupObject<Foam::objectRegistry>(regionName);
|
||||||
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -71,13 +87,7 @@ Foam::functionObjects::writeObjects::writeObjects
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
functionObject(name),
|
functionObject(name),
|
||||||
obr_
|
obr_(setRegistry(runTime, dict)),
|
||||||
(
|
|
||||||
runTime.lookupObject<objectRegistry>
|
|
||||||
(
|
|
||||||
dict.getOrDefault("region", polyMesh::defaultRegion)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
writeOption_(ANY_WRITE),
|
writeOption_(ANY_WRITE),
|
||||||
objectNames_()
|
objectNames_()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user