33 Foam::processorRunTimes::processorRunTimes::procRunTimes
35 const Time& completeRunTime,
42 case nProcsFrom::decomposeParDict:
44 decompositionMethod::decomposeParDict(completeRunTime)
45 .lookup<
int>(
"numberOfSubdomains");
54 PtrList<Time> result(nProcs);
63 Time::controlDictName,
64 completeRunTime.rootPath(),
65 completeRunTime.caseName()
66 /fileName(word(
"processor") +
Foam::name(proci)),
71 result[proci].setTime(completeRunTime);
80 const Time& completeRunTime,
81 const PtrList<Time>& processorRunTimes
91 completeRunTime.rootPath(),
92 completeRunTime.caseName()
107 const bool enableFunctionObjects,
111 completeRunTime_(
name,
args, enableFunctionObjects),
112 procRunTimes_(procRunTimes(completeRunTime_, npf)),
113 proc0RunTime_(proc0RunTime(completeRunTime_, procRunTimes_))
122 const bool enableFunctionObjects,
126 completeRunTime_(
name, rootPath, caseName, enableFunctionObjects),
127 procRunTimes_(procRunTimes(completeRunTime_, npf)),
128 proc0RunTime_(proc0RunTime(completeRunTime_, procRunTimes_))
146 completeRunTime_.setTime(inst, newIndex);
148 proc0TimeRef().setTime(inst, newIndex);
150 for (
label proci = 1; proci < nProcs(); proci ++)
152 procRunTimes_[proci].setTime(inst, newIndex);
162 proc0TimeRef().setTime(completeRunTime_);
164 for (
label proci = 1; proci < nProcs(); proci ++)
166 procRunTimes_[proci].setTime(completeRunTime_);
178 completeRunTime_.setTime(proc0TimeRef());
180 for (
label proci = 1; proci < nProcs(); proci ++)
182 procRunTimes_[proci].setTime(proc0TimeRef());
#define forAll(list, i)
Loop across all elements in list.
static word controlDictName
The default control dictionary name (normally "controlDict")
Extract command arguments and options from the supplied argc and argv parameters.
A class for handling file names.
virtual label nProcs(const fileName &dir, const fileName &local="") const
Get number of processor directories/results. Used for e.g.
An instant of time. Contains the time value and name.
instantList selectComplete(const argList &args)
Select the time.
~processorRunTimes()
Destructor.
nProcsFrom
Enumeration for how the number of processors is determined.
instantList selectProc(const argList &args)
Select the time.
processorRunTimes(const word &name, const argList &args, const bool enableFunctionObjects=true, const nProcsFrom=nProcsFrom::decomposeParDict)
Construct from name and arguments.
void setTime(const instant &inst, const label newIndex)
Set the time.
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options.
static instantList selectIfPresent(Time &runTime, const argList &args)
If any time option provided return the set of times (as select0)
A class for handling words, derived from string.
static instantList timeDirs
const fileOperation & fileHandler()
Get current file handler.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Foam::argList args(argc, argv)