62 { fileOperation::NOTFOUND,
"notFound" },
63 { fileOperation::ABSOLUTE,
"absolute" },
64 { fileOperation::OBJECT,
"objectPath" },
65 { fileOperation::WRITEOBJECT,
"writeObject" },
66 { fileOperation::PROCUNCOLLATED,
"uncollatedProc" },
67 { fileOperation::PROCBASEOBJECT,
"globalProc" },
68 { fileOperation::PROCOBJECT,
"localProc" },
69 { fileOperation::PARENTOBJECT,
"parentObjectPath" },
70 { fileOperation::FINDINSTANCE,
"findInstance" },
71 { fileOperation::PROCUNCOLLATEDINSTANCE,
"uncollatedProcInstance" },
72 { fileOperation::PROCBASEINSTANCE,
"globalProcInstance" },
73 { fileOperation::PROCINSTANCE,
"localProcInstance" }
82int Foam::fileOperation::nProcsFilter_(-1);
109static bool parseProcsNumRange
111 const std::string str,
116 const char * nptr = str.c_str();
117 char *endptr =
nullptr;
121 intmax_t parsed = std::strtoimax(nptr, &endptr, 10);
122 if (errno || nptr == endptr)
return false;
124 const int nProcs = int(parsed);
134 if (*endptr !=
'_')
return false;
140 parsed = std::strtoimax(nptr, &endptr, 10);
141 if (errno || nptr == endptr)
return false;
143 const int firstProc = int(parsed);
146 if (*endptr !=
'-')
return false;
152 parsed = std::strtoimax(nptr, &endptr, 10);
153 if (errno || nptr == endptr)
return false;
155 const int lastProc = int(parsed);
165 && (nProcs >= 0 && firstProc >= 0 && firstProc <= lastProc)
171 group.reset(firstProc, lastProc-firstProc+1);
204 Foam::stringOps::natural_sort::compare
223 const word& constantName
227 bool haveConstant =
false;
229 if (!constantName.empty())
231 for (
const fileName& dirName : dirEntries)
233 if (dirName == constantName)
246 times[nTimes].value() = 0;
247 times[nTimes].name() = constantName;
252 for (
const fileName& dirName : dirEntries)
254 if (readScalar(dirName, times[nTimes].value()))
256 times[nTimes].name() = dirName;
267 std::sort(×[1], times.
end(), instant::less());
272 std::sort(times.
begin(), times.
end(), instant::less());
286 const auto& object0 =
names[0];
288 for (label i = 1; i <
names.size(); ++i)
290 if (object0 !=
names[i])
307 fileName masterName(
name);
336 const UList<instant>& extraTimes,
337 const word& constantName,
341 if (extraTimes.size())
343 const bool haveConstant =
346 && times[0].
name() == constantName
349 const bool haveExtraConstant =
352 && extraTimes[0].
name() == constantName
356 instantList combinedTimes(times.size()+extraTimes.size());
359 if (haveExtraConstant)
364 combinedTimes[sz++] = extraTimes[0];
369 combinedTimes[sz++] = times[i];
371 for (; extrai < extraTimes.size(); extrai++)
373 combinedTimes[sz++] = extraTimes[extrai];
375 combinedTimes.setSize(sz);
376 times.transfer(combinedTimes);
379 if (times.size() > 1)
382 if (times[0].
name() == constantName)
386 std::sort(×[starti], times.end(), instant::less());
389 label newi = starti+1;
390 for (label i = newi; i < times.size(); i++)
392 if (times[i].value() != times[i-1].value())
396 times[newi] = times[i];
439 const label targetNProcs
451 splitProcessorPath(fName,
path, pDir,
local, group, numProcs);
457 if (cacheLevel() > 0)
459 const auto iter = procsDirs_.cfind(procPath);
476 const bool readDirMasterOnly
485 if (readDirMasterOnly)
495 <<
"readDir on master: send " << dirEntries.
size()
496 <<
" names to sub-processes" <<
endl;
508 Pout<<
"readDir without special master/send treatment"
520 for (
const fileName& dirN : dirEntries)
524 const label readProci =
531 if (proci == readProci)
534 pathTypeIdx.
first() = pathType::PROCUNCOLLATED;
538 if (targetNProcs > 1 && (targetNProcs != rNum))
558 if (proci < rNum || (nProcsFilter_ == 0))
563 pathTypeIdx.
first() = pathType::PROCBASEOBJECT;
564 pathTypeIdx.
second() = proci;
567 else if (group.contains(proci) || (nProcsFilter_ == 0))
572 pathTypeIdx.
first() = pathType::PROCOBJECT;
573 pathTypeIdx.
second() = (proci - group.start());
577 if (pathTypeIdx.
first() != pathType::NOTFOUND)
584 sortProcessorDirs(procDirs);
593 unsigned int procDirsStatus = (procDirs.
empty() ? 1u : 2u);
597 Pout<<
"fileOperation::lookupProcessorsPath " << procPath
605 if (procDirsStatus == 3u)
616 int flavour(pathType::PROCUNCOLLATED);
617 for (
const dirIndex& pDir : procDirs)
619 flavour =
Foam::max(flavour,
int(pDir.second().first()));
625 if (procDirs.empty())
631 pathTypeIdx.
first() == pathType::PROCBASEOBJECT
636 pathTypeIdx.
second() = proci;
638 procDirs.emplace_back
650 procDirs.emplace_back
659 Pout<<
"fileOperation::lookupProcessorsPath "
661 <<
" synthetic:" << procDirs <<
endl;
675 if (procDirsStatus & 2u)
677 if (cacheLevel() > 0)
679 procsDirs_.insert(procPath, procDirs);
682 return procsDirs_[procPath];
709 if (
io.name().empty())
719 &&
io.typeHeaderOk<regIOobject>(
false)
727 fileName originalPath(filePath(
io.objectPath()));
728 if (originalPath != objPath)
731 if (
io.name().empty())
733 ok =
isDir(originalPath);
756 const bool distributedRoots
759 comm_(commAndIORanks.first()),
770 const bool distributedRoots
775 distributed_(distributedRoots),
788 return io.objectPath();
796 const bool writeOnProc
803 mkDir(pathName.path());
812 OSstream&
os = *osPtr;
815 const_cast<regIOobject&
>(
io).updateMetaData();
822 &&
io.writeHeader(
os)
839 const fileName& fName,
840 const bool checkGzip,
841 const bool followLink
846 Pout<<
"fileOperation::filePath :" <<
" fName:" << fName <<
endl;
853 splitProcessorPath(fName,
path, pDir,
local, group, numProcs);
866 for (
const dirIndex& dirIdx : procDirs())
868 const fileName& procDir = dirIdx.first();
871 if (
exists(collatedName, checkGzip, followLink))
875 Pout<<
"fileOperation::filePath : " << collatedName <<
endl;
877 foundName = collatedName;
883 if (foundName.empty())
887 if (
exists(fName, checkGzip, followLink))
889 if (foundName.empty())
896 if (!foundName.empty())
900 Pout<<
"fileOperation::filePath : " << foundName <<
endl;
907 Pout<<
"fileOperation::filePath : Not found" <<
endl;
916 return monitor().addWatch(fName);
922 return monitor().removeWatch(watchIndex);
934 if (getFile(watchIndices[i]) == fName)
949 const labelList& watchIndices = rio.watchIndices();
951 DynamicList<label> newWatchIndices;
954 for (
const fileName&
f : files)
956 const label index = findWatch(watchIndices,
f);
960 newWatchIndices.append(addWatch(
f));
965 newWatchIndices.append(watchIndices[index]);
966 removedWatches.erase(index);
971 for (
const label index : removedWatches)
973 removeWatch(watchIndices[index]);
976 rio.watchIndices() = newWatchIndices;
982 return monitor().getFile(watchIndex);
988 const bool masterOnly,
1001 return monitor().getState(watchFd);
1007 monitor().setUnmodified(watchFd);
1014 const word& constantName
1019 Pout<<
"fileOperation::findTimes : Finding times in directory "
1020 << directory <<
endl;
1028 instantList times = sortTimes(dirEntries, constantName);
1032 refPtr<dirIndexList> procDirs(lookupProcessorsPath(directory));
1033 for (
const dirIndex& dirIdx : procDirs())
1035 const fileName& procDir = dirIdx.first();
1036 fileName collDir(processorsPath(directory, procDir));
1037 if (!collDir.empty() && collDir != directory)
1049 sortTimes(extraEntries, constantName),
1058 Pout<<
"fileOperation::findTimes : Found times:" <<
flatOutput(times)
1067 const IOobject& startIO,
1068 const scalar startValue,
1069 const word& stopInstance,
1070 const bool constant_fallback
1073 const Time& time = startIO.
time();
1074 IOobject
io(startIO);
1085 <<
"Found exact match for \"" <<
io.name()
1086 <<
"\" in " <<
io.instance()/
io.local()
1093 const bool exitIfMissing = startIO.isReadRequired();
1095 enum failureCodes { FAILED_STOPINST = 1, FAILED_CONSTINST = 2 };
1109 label instIndex = ts.size()-1;
1112 for (; instIndex >= 0; --instIndex)
1114 if (ts[instIndex] <= startValue)
1121 for (; instIndex >= 0; --instIndex)
1123 io.instance() = ts[instIndex].name();
1129 io.instance() == startIO.instance()
1130 &&
io.instance() != stopInstance
1139 <<
"Found exact match for \"" <<
io.name()
1140 <<
"\" in " <<
io.instance()/
io.local()
1147 if (
io.instance() == stopInstance)
1150 <<
"Hit stopInstance " << stopInstance <<
endl;
1154 failed = failureCodes::FAILED_STOPINST;
1181 && (ts.empty() || ts[0].name() != time.constant() || startValue < 0)
1184 io.instance() = time.constant();
1189 <<
"Found constant match for \"" <<
io.name()
1190 <<
"\" in " <<
io.instance()/
io.local()
1203 failed = failureCodes::FAILED_CONSTINST;
1205 else if (constant_fallback)
1207 io.instance() = time.constant();
1211 io.instance().clear();
1223 if (!
io.name().empty())
1226 <<
" file \"" <<
io.name() <<
"\" in";
1231 <<
io.local() <<
" in times "
1232 << startIO.instance() <<
" down to ";
1234 if (failed == failureCodes::FAILED_STOPINST)
1261 Pout<<
"fileOperation::readObjects :"
1263 <<
" instance" << instance
1264 <<
" local:" <<
local
1265 <<
" layout:" << int(layout) <<
endl;
1276 if (obr.
dbDir().empty())
1287 newInstance.clear();
1292 newInstance = instance;
1300 if (!procsPath.empty())
1302 newInstance = instance;
1312 const fileName& dir,
1313 const fileName&
local,
1338 foundDirs.resize(wanted);
1343 for (
const fileName& dirN : dirNames)
1346 procRangeType
group;
1349 const label readProci =
1350 splitProcessorPath(dirN,
rp, rd, rl, group, rNum);
1352 maxProc =
Foam::max(maxProc, readProci);
1365 foundDirs.resize(rNum);
1369 else if (readProci >= 0)
1372 foundDirs.set(readProci);
1379 const label gapIndex = foundDirs.find_first_not();
1382 nProcs = gapIndex-1;
1385 if (nProcs == 0 &&
Foam::isDir(dir/processorsBaseDir))
1388 <<
"Defunct collated naming: " << processorsBaseDir <<
nl
1389 <<
"Manually rename with the decomposition number. Eg,"
1391 <<
" mv processors processors16" <<
nl <<
nl
1392 <<
"...returning 1" <<
endl;
1406 Pout<<
"fileOperation::flush : clearing processor directories cache"
1417 Pout<<
"fileOperation::sync : parallel synchronisation"
1433 const word& procsDir
1436 return io.rootPath()/
io.globalCaseName()/procsDir;
1443 const word& instance,
1444 const word& procsDir
1458 const word& procsDir
1468 if (!std::isdigit(caseName[9]))
1471 <<
" does not end in old-style processorDDD" <<
endl;
1474 return dir.
path()/procsDir;
1493 label returnProci = -1;
1513 size_t slashLocal = string::npos;
1525 (
pos = objPath.find(
"processor",
pos)) != string::npos;
1529 if (
pos > 0 && objPath[
pos-1] !=
'/')
1536 size_t firstp =
pos + 9;
1541 const bool plural = (objPath[firstp] ==
's');
1547 else if (!std::isdigit(objPath[firstp]))
1554 slashLocal = objPath.find(
'/', firstp);
1557 const size_t lastp =
1558 (slashLocal == string::npos ? objPath.
length() : slashLocal);
1560 if (!std::isdigit(objPath[lastp-1]))
1584 objPath.substr(firstp, lastp-firstp),
1604 Foam::read(objPath.substr(firstp, lastp-firstp), proci)
1609 returnProci = proci;
1616 if (
pos != string::npos)
1623 path = objPath.substr(0,
pos-1);
1627 if (slashLocal != string::npos)
1629 procDir = objPath.substr(
pos, slashLocal-
pos);
1630 local = objPath.substr(slashLocal+1);
1634 procDir = objPath.substr(
pos);
1686 const auto& fp = *iproxy;
1688 os <<
"fileHandler:" << fp.type()
1689 <<
" nProcs:" << fp.nProcs()
1690 <<
" comm:" << fp.comm()
1691 <<
" distributed:" << fp.distributed()
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
T & emplace_back(Args &&... args)
Construct an element at the end of the list, return reference to the new list element.
void append(const T &val)
Copy append an element to the end of this list.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
bool erase(const iterator &iter)
Erase an entry specified by given iterator.
Layout
The layout of the case structure.
@ regular
Regular case layout, eg processor-local locations.
static bool isReadRequired(readOption opt) noexcept
True if (MUST_READ | READ_MODIFIED) bits are set.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
const fileName & rootPath() const noexcept
Return the Time::rootPath().
static Ostream & writeEndDivider(Ostream &os)
Write the standard end file divider.
static bool fileModificationChecking_masterOnly() noexcept
Test fileModificationChecking for master-only.
const fileName & instance() const noexcept
Read access to instance path component.
static fileCheckTypes fileModificationChecking
Type of file modification checking.
fileName path() const
The complete path for the object (with instance, local,...).
fileName objectPath() const
The complete path + object name.
const fileName & caseName() const noexcept
Return the Time::caseName().
A simple container for options an IOstream can normally have.
A helper class for outputting values to Ostream.
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
void setSize(label n)
Alias for resize().
void resize(const label len)
Adjust allocated size of list.
Generic output stream using a standard (STL) stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void resize(const label numElem, const unsigned int val=0u)
Reset addressable list size, does not shrink the allocated size.
static void broadcasts(const int communicator, Type &value, Args &&... values)
Broadcast multiple items to all communicator ranks. Does nothing in non-parallel.
const word & constant() const noexcept
Return constant name.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
fileName path() const
The path for the case = rootPath/caseName.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
const T1 & first() const noexcept
Access the first element.
const T2 & second() const noexcept
Access the second element.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
iterator begin() noexcept
Return an iterator to begin traversing the UList.
bool empty() const noexcept
True if List is empty (ie, size() is zero).
iterator end() noexcept
Return an iterator to end traversing the UList.
void size(const label n)
Older name for setAddressableSize.
Inter-processor communications stream.
static List< int > & procID(int communicator)
The list of ranks within a given communicator.
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator). It is 1 for serial run.
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
@ broadcast
broadcast [MPI]
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void set(const bitSet &bitset)
Set specified bits from another bitset.
label find_first_not() const
Locate the first bit that is unset.
Checking for changes to files.
fileState
Enumeration defining the file state.
A class for handling file names.
static std::string path(const std::string &str)
Return directory path name (part before last /).
static std::string name(const std::string &str)
Return basename (part beyond last /), including its extension.
An encapsulation of filesystem-related operations.
virtual void addWatches(regIOobject &, const fileNameList &) const
Helper: add watches for list of regIOobjects.
static bool isFileOrDir(const bool isFile, const fileName &)
Helper: check for file (isFile) or directory (!isFile).
std::unique_ptr< fileMonitor > monitorPtr_
File-change monitor for all registered files.
virtual bool isFile(const fileName &, const bool checkGzip=true, const bool followLink=true) const =0
Does the name exist as a FILE in the file system?
virtual autoPtr< OSstream > NewOFstream(const fileName &pathname, IOstreamOption streamOpt=IOstreamOption(), const bool writeOnProc=true) const =0
Generate an OSstream that writes a file.
bool distributed() const noexcept
Distributed roots (parallel run).
virtual instantList findTimes(const fileName &directory, const word &constantName="constant") const
Get sorted list of times.
virtual label addWatch(const fileName &) const
Add watching of a file. Returns handle.
Tuple2< fileName, Tuple2< pathType, int > > dirIndex
Augment fileName with pathType and local offset.
refPtr< dirIndexList > lookupAndCacheProcessorsPath(const fileName &objectPath, const bool syncPar) const
Lookup name of processorsDDD using cache.
static instantList sortTimes(const fileNameList &dirEntries, const word &constantName="constant")
Sort directory entries according to time value,.
virtual void flush() const
Forcibly wait until all output done. Flush any cached data.
const labelList ioRanks_
The list of IO ranks (global ranks).
virtual bool removeWatch(const label) const
Remove watch on a file (using handle).
bool exists(IOobject &io) const
Does IOobject exist? Is either a directory (empty name()) or a file.
virtual fileNameList readObjects(const objectRegistry &db, const fileName &instance, const fileName &local, word &newInstance) const
Search directory for objects. Used in IOobjectList.
static word defaultFileHandler
Name of the default fileHandler.
virtual label findWatch(const labelList &watchIndices, const fileName &) const
Find index (or -1) of file in list of handles.
static void mergeTimes(const UList< instant > &extraTimes, const word &constantName, instantList ×)
Merge two times.
label nProcs() const noexcept
Overall number of processors, from UPstream::nProcs() or detected from directories/results.
fileName processorsPath(const IOobject &io, const word &instance, const word &procDir) const
Generate path (like io.path) with provided instance and any.
fileName processorsCasePath(const IOobject &io, const word &procDir) const
Generate path (like io.path) from root+casename with any.
virtual refPtr< dirIndexList > lookupProcessorsPath(const fileName &objectPath) const
Lookup name of processorsDDD using cache.
label nProcs_
Overall number of processors.
const labelList & ioRanks() const noexcept
The list of IO ranks (global ranks).
static label splitProcessorPath(const fileName &objectPath, fileName &path, fileName &procDir, fileName &local, procRangeType &group, label &nProcs)
Split objectPath into part before 'processor' and part after.
HashTable< dirIndexList > procsDirs_
Detected processors directories.
static label detectProcessorPath(const fileName &objPath)
Detect processor number from '/aa/bb/processorDDD/cc'.
pathType
Enumeration for the location of an IOobject.
@ PROCUNCOLLATED
objectPath exists in 'processorN'
@ PROCOBJECT
objectPath exists in 'processorsNN_first-last'
@ PROCBASEOBJECT
objectPath exists in 'processorsNN'
static int cacheLevel_
Cache level (eg, for caching time directories). Default: 1.
label comm_
Communicator to use.
virtual fileMonitor::fileState getState(const label) const
Get current state of file (using handle).
virtual void setUnmodified(const label) const
Set current state of file (using handle) to unmodified.
label comm() const noexcept
Communicator to use.
virtual void updateStates(const bool masterOnly, const bool syncPar) const
Update state of all files.
static bool uniformFile(const fileNameList &names)
True if the file names are identical. False on an empty list.
static int cacheLevel() noexcept
Return cache level.
virtual IOobject findInstance(const IOobject &io, const scalar startValue, const word &stopInstance="", const bool constant_fallback=true) const
Find time instance where IOobject is located. The name of the IOobject can be empty,...
fileOperation(const label comm, const labelUList &ioRanks=labelUList::null(), const bool distributedRoots=false)
Construct from communicator, optionally with specified io-ranks and/or distributed roots.
static const Enum< pathType > pathTypeNames_
virtual void sync()
Forcibly parallel sync.
bool distributed_
Distributed roots (parallel run).
fileMonitor & monitor() const
Get or create fileMonitor singleton.
virtual bool writeObject(const regIOobject &io, IOstreamOption streamOpt=IOstreamOption(), const bool writeOnProc=true) const
Writes a regIOobject (so header, contents and divider).
virtual fileName filePath(const bool checkGlobal, const IOobject &, const word &typeName, const bool search=true) const =0
Search for an object.
static word processorsBaseDir
Return the processors directory name (usually "processors").
UPstream::rangeType procRangeType
For addressing a range of processors (an int range).
virtual fileName getFile(const label) const
Get name of file being watched (using handle).
virtual fileName objectPath(const IOobject &io, const word &typeName) const
Generate disk file name for object. Opposite of filePath.
A range or interval of labels defined by a start and a size.
Registry of regIOobjects.
virtual const fileName & dbDir() const
Local directory path of this objectRegistry relative to the time.
A class for managing references or pointers (no reference counting).
static refPtr< T > New(Args &&... args)
Construct refPtr with forwarding arguments.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
const labelList & watchIndices() const noexcept
Read access to file-monitoring handles.
static std::string::size_type length(const char *s)
Length of the character sequence (with nullptr protection).
bool starts_with(char c) const
True if string starts with given character (cf. C++20).
A class for handling words, derived from Foam::string.
static const word null
An empty word.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
regionProperties rp(runTime)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define DebugInfo
Report an information message using Foam::Info.
#define WarningInFunction
Report a warning using Foam::Warning.
#define DebugInFunction
Report an information message using Foam::Info.
constexpr const char *const group
Group name for atomic constants.
Namespace for handling debugging switches.
dictionary & optimisationSwitches()
The OptimisationSwitches sub-dictionary in the central controlDict(s).
dimensionedScalar pos(const dimensionedScalar &ds)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
bool read(const char *buf, int32_t &val)
Same as readInt32.
bool exists(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist (as DIRECTORY or FILE) in the file system?
List< label > labelList
A List of labels.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
List< fileName > fileNameList
List of fileName.
List< instant > instantList
List of instants.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reduce(T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce).
bool returnReduceAnd(const bool value, const int communicator=UPstream::worldComm)
Perform logical (and) MPI Allreduce on a copy. Uses UPstream::reduceAnd.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
static T getOrAdd(dictionary &dict, const char *name, const T deflt)
bool isFile(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist as a FILE in the file system?
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
fileNameList readDir(const fileName &directory, const fileName::Type type=fileName::Type::FILE, const bool filtergz=true, const bool followLink=true)
Read a directory and return the entries as a fileName List.
constexpr char nl
The newline '\n' character (0x0a).
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
#define forAll(list, i)
Loop across all elements in list.
Specialized string sorting.