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))
70 result[proci].setTime(completeRunTime);
79 const Time& completeRunTime,
80 const PtrList<Time>& processorRunTimes
90 completeRunTime.rootPath(),
91 completeRunTime.caseName()
105 const bool enableFunctionObjects,
109 completeRunTime_(
name,
args, enableFunctionObjects),
110 procRunTimes_(procRunTimes(completeRunTime_, npf)),
111 proc0RunTime_(proc0RunTime(completeRunTime_, procRunTimes_))
120 const bool enableFunctionObjects,
124 completeRunTime_(
name, rootPath, caseName, enableFunctionObjects),
125 procRunTimes_(procRunTimes(completeRunTime_, npf)),
126 proc0RunTime_(proc0RunTime(completeRunTime_, procRunTimes_))
144 completeRunTime_.setTime(inst, newIndex);
146 proc0TimeRef().setTime(inst, newIndex);
148 for (
label proci = 1; proci < nProcs(); proci ++)
150 procRunTimes_[proci].setTime(inst, newIndex);
160 proc0TimeRef().setTime(completeRunTime_);
162 for (
label proci = 1; proci < nProcs(); proci ++)
164 procRunTimes_[proci].setTime(completeRunTime_);
176 completeRunTime_.setTime(proc0TimeRef());
178 for (
label proci = 1; proci < nProcs(); proci ++)
180 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)