ENH: provide Time::NewGlobalTime factory methods (#3007)

- avoids clutter of argList::envGlobalPath() ...

ENH: allow temporary overwriting of output writeFormat

- allows switching for particular output routines

COMP: explicitly use TimePaths methods with Time

- this simplifies any overloading done at a later stage
This commit is contained in:
Mark Olesen
2023-10-27 13:15:12 +02:00
parent 07dcdefa02
commit 269be2f4ea
16 changed files with 317 additions and 163 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2022 OpenCFD Ltd.
Copyright (C) 2022-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -122,11 +122,10 @@ int main(int argc, char *argv[])
// Fallback (eg, no runTime)
if (!timePtr.good())
{
timePtr.reset(Time::New(argList::envGlobalPath()));
timePtr.reset(Time::NewGlobalTime());
}
const auto& tm = timePtr();
const auto& tm = *timePtr;
fileName resolvedName(inputName);
resolvedName.toAbsolute();