Go to the documentation of this file.
48 namespace fileOperations
54 masterUncollatedFileOperation,
64 "maxMasterFileBufferSize",
73 masterUncollatedFileOperationInitialise,
90 if (mainRanks.empty())
98 if (!mainRanks.found(0))
101 <<
"Rank 0 (master) should be in the IO ranks. Currently "
107 const bitSet isIOrank(
n, mainRanks);
117 label rank = proci+1;
118 rank <
n && !isIOrank[rank];
147 if (t.
equal(timeDirs[i].value()))
149 return timeDirs[i].name();
160 const bool checkGlobal,
164 pathType& searchType,
166 word& newInstancePath
176 if (isFileOrDir(
isFile, objPath))
192 if (isFileOrDir(
isFile, writePath))
201 refPtr<dirIndexList> pDirs(lookupProcessorsPath(io.
objectPath()));
203 for (
const dirIndex& dirIdx : pDirs())
205 const fileName& pDir = dirIdx.first();
207 processorsPath(io, io.
instance(), pDir)
209 if (objPath != writePath && isFileOrDir(
isFile, objPath))
211 searchType = dirIdx.second().first();
223 localPath != writePath
224 && isFileOrDir(
isFile, localPath)
245 fileName parentPath =
249 if (isFileOrDir(
isFile, parentPath))
258 const auto pathFnd = times_.cfind(io.
time().
path());
260 if (
search && pathFnd.found())
262 newInstancePath = findInstancePath
268 if (newInstancePath.size() && newInstancePath != io.
instance())
271 refPtr<dirIndexList> pDirs
276 for (
const dirIndex& dirIdx : pDirs())
278 const fileName& pDir = dirIdx.first();
282 processorsPath(io, newInstancePath, pDir)
285 if (isFileOrDir(
isFile, fName))
287 switch (dirIdx.second().first())
320 if (isFileOrDir(
isFile, fName))
338 const pathType& searchType,
340 const word& instancePath
391 processorsPath(io, io.
instance(), procDir)
400 processorsPath(io, io.
instance(), processorsDir(io))
448 processorsPath(io, instancePath, procDir)
457 processorsPath(io, instancePath, processorsDir(io))
482 const fileName& object0 = filePaths[0];
484 for (label i = 1; i < filePaths.size(); i++)
486 if (filePaths[i] != object0)
497 const fileName& filePath,
499 PstreamBuffers& pBufs
507 <<
"Cannot open file " << filePath
513 Pout<<
"masterUncollatedFileOperation::readAndSend :"
514 <<
" compressed:" <<
bool(ifs.compression()) <<
" "
524 const std::string buf
526 std::istreambuf_iterator<char>(ifs.stdStream()),
527 std::istreambuf_iterator<char>()
530 for (
const label proci : procs)
532 UOPstream
os(proci, pBufs);
533 os.write(buf.data(), buf.length());
538 Pout<<
"masterUncollatedFileOperation::readStream :"
539 <<
" From " << filePath <<
" sent " << buf.size()
548 List<char> buf(
static_cast<label
>(
count));
549 ifs.stdStream().read(buf.data(),
count);
551 for (
const label proci : procs)
553 UOPstream
os(proci, pBufs);
559 Pout<<
"masterUncollatedFileOperation::readStream :"
560 <<
" From " << filePath <<
" sent " << buf.size()
577 autoPtr<ISstream> isPtr;
594 if (filePaths[0].empty())
597 <<
"cannot find file " << io.objectPath()
604 if (procValid[proci])
606 validProcs.append(proci);
614 Pout<<
"masterUncollatedFileOperation::readStream :"
615 <<
" For uniform file " << filePaths[0]
616 <<
" sending to " << validProcs
617 <<
" in comm:" << comm <<
endl;
619 readAndSend(filePaths[0], validProcs, pBufs);
626 if (filePaths[0].empty())
629 <<
"cannot find file " << io.objectPath()
634 isPtr.reset(
new IFstream(filePaths[0]));
637 if (!io.readHeader(*isPtr))
640 <<
"problem while reading header for object "
650 Pout<<
"masterUncollatedFileOperation::readStream :"
651 <<
" For processor " << proci
652 <<
" opening " << filePaths[proci] <<
endl;
655 const fileName& fPath = filePaths[proci];
657 if (procValid[proci] && !fPath.empty())
661 readAndSend(fPath,
labelList(one{}, proci), pBufs);
668 pBufs.finishedSends(recvSizes);
690 Pout<<
"masterUncollatedFileOperation::readStream :"
691 <<
" Done reading " << buf.size() <<
" bytes" <<
endl;
698 isPtr.reset(
new IListStream(std::move(buf)));
703 if (!io.readHeader(*isPtr))
706 <<
"problem while reading header for object "
713 isPtr.reset(
new dummyISstream());
743 <<
"I/O : " << typeName
753 <<
"Resetting fileModificationChecking to timeStamp" <<
endl;
762 <<
"Resetting fileModificationChecking to inotify"
785 <<
"I/O : " << typeName
795 <<
"Resetting fileModificationChecking to timeStamp" <<
endl;
804 <<
"Resetting fileModificationChecking to inotify"
832 return masterOp<mode_t, mkDirOp>
848 return masterOp<mode_t, chModOp>
861 const bool followLink
864 return masterOp<mode_t, modeOp>
877 const bool followLink
882 masterOp<label, typeOp>
896 const bool checkGzip,
897 const bool followLink
900 return masterOp<bool, existsOp>
903 existsOp(checkGzip, followLink),
913 const bool followLink
916 return masterOp<bool, isDirOp>
929 const bool checkGzip,
930 const bool followLink
933 return masterOp<bool, isFileOp>
936 isFileOp(checkGzip, followLink),
946 const bool followLink
949 return masterOp<off_t, fileSizeOp>
952 fileSizeOp(followLink),
962 const bool followLink
965 return masterOp<time_t, lastModifiedOp>
968 lastModifiedOp(followLink),
978 const bool followLink
981 return masterOp<double, lastModifiedHROp>
984 lastModifiedHROp(followLink),
994 const std::string& ext
997 return masterOp<bool, mvBakOp>
1012 return masterOp<bool, rmOp>
1028 return masterOp<bool, rmDirOp>
1042 const bool filtergz,
1043 const bool followLink
1046 return masterOp<fileNameList, readDirOp>
1049 readDirOp(
type, filtergz, followLink),
1060 const bool followLink
1063 return masterOp<bool, cpOp>
1080 return masterOp<bool, lnOp>
1095 const bool followLink
1098 return masterOp<bool, mvOp>
1111 const bool checkGlobal,
1113 const word& typeName,
1119 Pout<<
"masterUncollatedFileOperation::filePath :"
1121 <<
" checkGlobal:" << checkGlobal <<
endl;
1135 pathType searchType = NOTFOUND;
1137 word newInstancePath;
1161 Pout<<
"masterUncollatedFileOperation::filePath :"
1162 <<
" master objPath:" << objPath
1164 <<
" procsDir:" << procsDir <<
" instance:" << newInstancePath
1174 label masterType(searchType);
1176 searchType = pathType(masterType);
1186 || io.
local() ==
"uniform"
1219 objPath = localObjectPath
1235 objPath = masterOp<fileName, fileOrNullOp>
1249 Pout<<
"masterUncollatedFileOperation::filePath :"
1250 <<
" Returning from file searching:" <<
endl
1260 const bool checkGlobal,
1267 Pout<<
"masterUncollatedFileOperation::dirPath :"
1269 <<
" checkGlobal:" << checkGlobal <<
endl;
1279 pathType searchType = NOTFOUND;
1281 word newInstancePath;
1287 objPath = filePathInfo
1302 label masterType(searchType);
1304 searchType = pathType(masterType);
1314 || io.
local() ==
"uniform"
1347 objPath = localObjectPath
1363 objPath = masterOp<fileName, fileOrNullOp>
1366 fileOrNullOp(
false),
1377 Pout<<
"masterUncollatedFileOperation::dirPath :"
1378 <<
" Returning from file searching:" <<
endl
1388 const dirIndexList& pDirs,
1401 if (isFileOrDir(
isFile, writePath))
1409 for (
const dirIndex& dirIdx : pDirs)
1411 const fileName& pDir = dirIdx.first();
1413 processorsPath(io, io.
instance(), pDir)
1415 if (procPath != writePath && isFileOrDir(
isFile, procPath))
1425 if (localPath != writePath && isFileOrDir(
isFile, localPath))
1438 const scalar startValue,
1439 const word& stopInstance
1444 Pout<<
"masterUncollatedFileOperation::findInstance :"
1445 <<
" Starting searching for name:" << startIO.
name()
1446 <<
" local:" << startIO.
local()
1447 <<
" from instance:" << startIO.
instance()
1481 if (!foundInstance.empty())
1486 Pout<<
"masterUncollatedFileOperation::findInstance :"
1487 <<
" for name:" << io.
name() <<
" local:" << io.
local()
1488 <<
" found starting instance:" << io.
instance() <<
endl;
1505 for (instanceI = ts.size()-1; instanceI >= 0; --instanceI)
1507 if (ts[instanceI].value() <= startValue)
1514 for (; instanceI >= 0; --instanceI)
1529 Pout<<
"masterUncollatedFileOperation::findInstance :"
1530 <<
" for name:" << io.
name() <<
" local:" << io.
local()
1538 if (ts[instanceI].
name() == stopInstance)
1546 if (io.
name().empty())
1549 <<
"Cannot find directory "
1551 <<
" down to " << stopInstance
1557 <<
"Cannot find file \"" << io.
name()
1558 <<
"\" in directory " << io.
local()
1560 <<
" down to " << stopInstance
1567 Pout<<
"masterUncollatedFileOperation::findInstance :"
1568 <<
" name:" << io.
name() <<
" local:" << io.
local()
1576 if (foundInstance.empty())
1583 if (!ts.size() || ts[0].name() != time.
constant())
1594 Pout<<
"masterUncollatedFileOperation::findInstance :"
1595 <<
" name:" << io.
name()
1596 <<
" local:" << io.
local()
1604 if (foundInstance.empty())
1613 <<
"Cannot find file \"" << io.
name() <<
"\" in directory "
1631 Pout<<
"masterUncollatedFileOperation::findInstance :"
1632 <<
" name:" << io.
name() <<
" local:" << io.
local()
1650 Pout<<
"masterUncollatedFileOperation::readObjects :"
1652 <<
" local:" << local <<
" instance:" << instance <<
endl;
1676 if (newInstance.empty())
1692 const instant t(instance);
1695 if (t.
equal(timeDirs[i].value()))
1717 Pout<<
"masterUncollatedFileOperation::readObjects :"
1718 <<
" newInstance:" << newInstance
1719 <<
" objectNames:" << objectNames <<
endl;
1730 const word& typeName
1737 Pout<<
"masterUncollatedFileOperation::readHeader :" <<
endl
1739 <<
" filePath :" << fName <<
endl;
1746 bool uniform = uniformFile(filePaths);
1790 if (!filePaths[proci].empty())
1792 if (proci > 0 && filePaths[proci] == filePaths[proci-1])
1794 result[proci] = result[proci-1];
1795 headerClassName[proci] = headerClassName[proci-1];
1796 note[proci] = note[proci-1];
1800 IFstream is(filePaths[proci]);
1807 note[proci] = io.
note();
1825 Pout<<
"masterUncollatedFileOperation::readHeader :" <<
" ok:" << ok
1837 const word& typeName,
1843 Pout<<
"masterUncollatedFileOperation::readStream :"
1844 <<
" object : " << io.
name()
1845 <<
" global : " << io.
global()
1846 <<
" fName : " << fName <<
" valid:" << valid <<
endl;
1850 autoPtr<ISstream> isPtr;
1851 bool isCollated =
false;
1852 IOobject headerIO(io);
1866 isPtr.reset(
new IFstream(fName));
1871 headerIO.readHeader(*isPtr);
1881 Pout<<
"masterUncollatedFileOperation::readStream :"
1882 <<
" For object : " << io.
name()
1883 <<
" doing straight IFstream input from "
1905 Pout<<
"masterUncollatedFileOperation::readStream :"
1906 <<
" For object : " << io.
name()
1907 <<
" starting collating input from " << fName <<
endl;
1915 fileName
path, procDir, local;
1916 procRangeType
group;
1918 splitProcessorPath(fName,
path, procDir, local,
group, nProcs);
1925 label proci = detectProcessorPath(io.
objectPath());
1930 <<
"Could not detect processor number"
1938 proci = proci -
group.start();
1943 Pout<<
"masterUncollatedFileOperation::readStream :"
1944 <<
" For object : " << io.
name()
1945 <<
" starting input from block " << proci
1946 <<
" of " << isPtr->name() <<
endl;
1955 bool bigSize = sz > off_t(maxMasterFileBufferSize);
1960 label readComm = -1;
1968 isPtr.reset(
new IFstream(fName));
1973 IOobject headerIO(io);
1974 headerIO.readHeader(*isPtr);
2003 Pout<<
"masterUncollatedFileOperation::readStream :"
2004 <<
" For object : " << io.
name()
2005 <<
" starting separated input from " << fName <<
endl;
2032 const bool uniform = uniformFile(filePaths);
2043 const bool masterOnly,
2045 const word& typeName
2050 if (io.globalObject())
2054 Pout<<
"masterUncollatedFileOperation::read :"
2055 <<
" Reading global object " << io.
name() <<
endl;
2064 ok = io.readData(io.readStream(typeName));
2085 const List<Pstream::commsStruct>& comms =
2091 const Pstream::commsStruct& myComm =
2095 if (myComm.above() != -1)
2106 ok = io.readData(fromAbove);
2110 forAll(myComm.below(), belowI)
2115 myComm.below()[belowI],
2121 bool okWrite = io.writeData(toBelow);
2129 Pout<<
"masterUncollatedFileOperation::read :"
2130 <<
" Reading local object " << io.
name() <<
endl;
2133 ok = io.readData(io.readStream(typeName));
2152 Pout<<
"masterUncollatedFileOperation::writeObject :"
2153 <<
" io:" << pathName <<
" valid:" << valid <<
endl;
2160 const_cast<regIOobject&
>(io).updateMetaData();
2162 autoPtr<OSstream> osPtr(NewOFstream(pathName, streamOpt, valid));
2163 OSstream&
os = *osPtr;
2186 const word& constantName
2189 const auto iter = times_.cfind(directory);
2194 Pout<<
"masterUncollatedFileOperation::findTimes :"
2195 <<
" Found " << iter()->size() <<
" cached times" <<
endl;
2218 times_.set(directory, tPtr);
2222 Pout<<
"masterUncollatedFileOperation::findTimes :"
2223 <<
" Caching times:" << *tPtr <<
nl
2224 <<
" for directory:" << directory <<
endl;
2236 if (tm.subCycling())
2250 const instant timeNow(tm.value(), tm.timeName());
2253 const label skipConst =
2255 (!times.empty() && times[0].name() == tm.constant())
2264 SubList<instant>(times, times.size()-skipConst, skipConst),
2272 Pout<<
"masterUncollatedFileOperation::setTime :"
2273 <<
" Caching time " << tm.timeName()
2274 <<
" for case:" << tm.path() <<
endl;
2277 times.append(timeNow);
2278 SubList<instant> realTimes
2280 times, times.size()-skipConst, skipConst
2316 const bool uniform = uniformFile(filePaths);
2322 Pout<<
"masterUncollatedFileOperation::NewIFstream :"
2323 <<
" Opening global file " << filePath <<
endl;
2349 pBufs.finishedSends(recvSizes);
2360 Pout<<
"masterUncollatedFileOperation::NewIFstream :"
2361 <<
" Reading " << filePath
2368 is.read(buf.data(), buf.size());
2372 Pout<<
"masterUncollatedFileOperation::NewIFstream :"
2373 <<
" Done reading " << buf.size() <<
" bytes" <<
endl;
2380 isPtr.
reset(
new IListStream(std::move(buf)));
2383 isPtr->name() = filePath;
2389 isPtr.
reset(
new IFstream(filePath));
2432 watchFd = monitor().addWatch(fName);
2441 const label watchIndex
2447 ok = monitor().removeWatch(watchIndex);
2466 if (monitor().getFile(watchIndices[i]) == fName)
2491 const label index = findWatch(watchIndices,
f);
2495 newWatchIndices.
append(addWatch(
f));
2500 newWatchIndices.
append(watchIndices[index]);
2501 removedWatches.erase(index);
2506 for (
const label index : removedWatches)
2508 removeWatch(watchIndices[index]);
2517 const label watchIndex
2523 fName = monitor().getFile(watchIndex);
2532 const bool masterOnly,
2538 monitor().updateStates(
true,
false);
2552 state = monitor().getState(watchFd);
2566 monitor().setUnmodified(watchFd);
virtual void setUnmodified(const label) const
List< label > labelList
A List of labels.
virtual fileName::Type type(const fileName &, const bool followLink=true) const
virtual fileName getFile(const label) const
static const List< commsStruct > & linearCommunication(const label communicator=worldComm)
@ WRITEOBJECT
write path exists
const fileName & globalCaseName() const
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual bool cp(const fileName &src, const fileName &dst, const bool followLink=true) const
virtual void setTime(const Time &) const
virtual std::istream & stdStream()
static void readAndSend(const fileName &filePath, const labelUList &procs, PstreamBuffers &pBufs)
static constexpr int masterNo() noexcept
bool exists(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual fileName dirPath(const bool checkGlobal, const IOobject &io, const bool search) const
A class for handling words, derived from Foam::string.
An encapsulation of filesystem-related operations.
Output inter-processor communications stream operating on external buffer.
A class for handling file names.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
static bool uniformFile(const fileNameList &)
virtual fileNameList readDir(const fileName &, const fileName::Type=fileName::FILE, const bool filtergz=true, const bool followLink=true) const
constexpr const char *const group
@ PARENTOBJECT
parent of object path
const labelList & watchIndices() const
Input from file stream, using an ISstream.
An interval of (signed) integers defined by a start and a size.
Output inter-processor communications stream.
static Ostream & writeEndDivider(Ostream &os)
virtual bool writeData(Ostream &) const =0
Dummy input stream, which can be used as a placeholder for interfaces taking an Istream or ISstream....
A List obtained as a section of another List.
const fileName & rootPath() const
virtual mode_t mode(const fileName &, const bool followLink=true) const
static std::string name(const std::string &str)
bool processorCase() const noexcept
bool read(const char *buf, int32_t &val)
Buffers for inter-processor communications streams (UOPstream, UIPstream).
virtual bool isFile(const fileName &, const bool checkGzip=true, const bool followLink=true) const
static word timeName(const scalar t, const int precision=precision_)
@ OBJECT
io.objectPath() exists
static const Enum< pathType > pathTypeNames_
virtual void flush() const
static fileCheckTypes fileModificationChecking
virtual off_t fileSize(const fileName &, const bool followLink=true) const
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
static bool master(const label communicator=worldComm)
virtual bool global() const
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
List< bool > boolList
A List of bools.
bool isFile(const fileName &name, const bool checkGzip=true, const bool followLink=true)
An input stream that reads from a List and manages the List storage. Similar to IStringStream but wit...
addNamedToRunTimeSelectionTable(fileOperationInitialise, collatedFileOperationInitialise, word, collated)
void append(const T &val)
List< string > stringList
A List of strings.
Ostream & endl(Ostream &os)
const Type & value() const
bool equal(scalar val) const
virtual bool mv(const fileName &src, const fileName &dst, const bool followLink=false) const
static float maxMasterFileBufferSize
virtual bool chMod(const fileName &, const mode_t) const
@ ABSOLUTE
instance is absolute directory
const labelList & below() const noexcept
A HashTable with keys but without contents that is similar to std::unordered_set.
const Time & time() const
List< instant > instantList
List of instants.
runTimeSource setTime(sourceTimes[sourceTimeIndex], sourceTimeIndex)
static label read(const commsTypes commsType, const int fromProcNo, char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label communicator=UPstream::worldComm)
@ FINDINSTANCE
file found in time directory
virtual instantList findTimes(const fileName &, const word &) const
virtual ~masterUncollatedFileOperation()
void stableSort(UList< T > &a)
bool good() const noexcept
bool readHeader(Istream &is)
registerOptSwitch("maxThreadFileBufferSize", float, collatedFileOperation::maxThreadFileBufferSize)
List< word > wordList
A List of words.
Registry of regIOobjects.
mode_t mode(const fileName &name, const bool followLink=true)
virtual autoPtr< ISstream > readStream(regIOobject &, const fileName &, const word &typeName, const bool valid=true) const
word format(conversionProperties.get< word >("format"))
static autoPtr< ISstream > read(IOobject &io, const label comm, const bool uniform, const fileNameList &filePaths, const boolList &procValid)
virtual const fileName & dbDir() const
virtual const fileName & name() const
static rangeType subProcs(const label communicator=worldComm)
off_t fileSize(const fileName &name, const bool followLink=true)
virtual fileName filePath(const bool checkGlobal, const IOobject &io, const word &typeName, const bool search) const
Inter-processor communications stream.
const fileName & local() const noexcept
virtual const fileName & name() const
void setSize(const label n)
virtual void setTime(const Time &) const
DynamicList< T, SizeMin > & append(const T &val)
static bool readBlocks(const label comm, autoPtr< ISstream > &isPtr, List< char > &contentChars, const UPstream::commsTypes commsType)
virtual time_t lastModified(const fileName &, const bool followLink=true) const
virtual bool writeObject(const regIOobject &io, IOstreamOption streamOpt=IOstreamOption(), const bool valid=true) const
const fileName & caseName() const
addToRunTimeSelectionTable(fileOperation, collatedFileOperation, word)
bool globalObject() const noexcept
virtual label findWatch(const labelList &watchIndices, const fileName &) const
instantList times() const
The IOstreamOption is a simple container for options an IOstream can normally have.
@ PROCBASEOBJECT
objectPath exists in 'processorsNN'
bool exists(const dirIndexList &, IOobject &io) const
bool good() const noexcept
Generic output stream using a standard (STL) stream.
label findSortedIndex(const ListType &input, typename ListType::const_reference val, const label start=0)
static void freeCommunicator(const label communicator, const bool doPstream=true)
virtual double highResLastModified(const fileName &, const bool followLink=true) const
virtual bool removeWatch(const label) const
void finishedSends(const bool block=true)
masterUncollatedFileOperation(bool verbose)
virtual void updateStates(const bool masterOnly, const bool syncPar) const
const word & headerClassName() const noexcept
@ PROCUNCOLLATEDINSTANCE
as PROCUNCOLLATED but with instance
static bool isCollatedType(const word &objectType)
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
virtual bool rmDir(const fileName &dir, const bool silent=false) const
virtual bool mvBak(const fileName &, const std::string &ext="bak") const
General fileOperation initialiser. Handles -ioRanks option, using it to set the FOAM_IORANKS environm...
virtual fileNameList readObjects(const objectRegistry &db, const fileName &instance, const fileName &local, word &newInstance) const
static const fileName null
virtual fileName filePathInfo(const bool checkGlobal, const bool isFile, const IOobject &, const bool search, pathType &searchType, word &processorsDir, word &instance) const
static word findInstancePath(const instantList &timeDirs, const instant &t)
errorManipArg< error, int > exit(error &err, const int errNo=1)
readOption readOpt() const noexcept
virtual bool mkDir(const fileName &, mode_t=0777) const
virtual fileMonitor::fileState getState(const label) const
static int nProcsSimpleSum
@ PROCUNCOLLATED
objectPath exists in 'processorN'
List< fileName > fileNameList
A List of fileNames.
void reset(autoPtr< T > &&other) noexcept
const word & name() const noexcept
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual void flush() const
const word & system() const
#define FatalErrorInFunction
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
static rangeType allProcs(const label communicator=worldComm)
const string & note() const noexcept
float floatOptimisationSwitch(const char *name, const float deflt=0)
@ COMPRESSED
compression = true
static int & msgType() noexcept
static int myProcNo(const label communicator=worldComm)
virtual label addWatch(const fileName &) const
@ PROCINSTANCE
as PROCOBJECT but with instance
virtual bool rm(const fileName &) const
unsigned int count(const UList< bool > &bools, const bool val=true)
Inter-processor communications stream.
static bool & parRun() noexcept
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
fileName::Type type(const fileName &name, const bool followLink=true)
virtual autoPtr< ISstream > NewIFstream(const fileName &) const
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
labelList identity(const label len, label start=0)
static autoPtr< ISstream > readBlock(const label blocki, ISstream &is, IOobject &headerIO)
virtual fileNameList readObjects(const objectRegistry &db, const fileName &instance, const fileName &local, word &newInstance) const
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
fileName search(const word &file, const fileName &directory)
virtual bool readHeader(IOobject &, const fileName &, const word &typeName) const
virtual bool isDir(const fileName &, const bool followLink=true) const
static labelList ioRanks()
@ PROCOBJECT
objectPath exists in 'processorsNN_first-last'
const fileName & instance() const noexcept
label above() const noexcept
word name(const expressions::valueTypeCode typeCode)
#define forAllReverse(list, i)
fileName localObjectPath(const IOobject &, const pathType &searchType, const word &processorsDir, const word &instancePath) const
virtual bool readData(Istream &)
Input inter-processor communications stream.
bool writeHeader(Ostream &os) const
#define FatalIOErrorInFunction(ios)
An instant of time. Contains the time value and name.
static const List< commsStruct > & treeCommunication(const label communicator=worldComm)
virtual autoPtr< OSstream > NewOFstream(const fileName &pathname, IOstreamOption streamOpt=IOstreamOption(), const bool valid=true) const
Input inter-processor communications stream operating on external buffer.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
UList< label > labelUList
A UList of labels.
virtual instantList findTimes(const fileName &, const word &) const
fileName objectPath() const
compressionType compression() const noexcept
const word & constant() const
virtual bool ln(const fileName &src, const fileName &dst) const
@ PROCBASEINSTANCE
as PROCBASEOBJECT but with instance
typename parent_type::iterator iterator
virtual void addWatches(regIOobject &, const fileNameList &) const
#define WarningInFunction
static labelList subRanks(const label n)
static bool isAbsolute(const std::string &str)
Master-only drop-in replacement for OFstream.
const Time & time() const noexcept
static label nProcs(const label communicator=worldComm)
defineTypeNameAndDebug(collatedFileOperation, 0)
A class for managing references or pointers (no reference counting)
static bool readHeader(IOobject &io, Istream &is)
virtual IOobject findInstance(const IOobject &io, const scalar startValue, const word &stopInstance) const
const objectRegistry & db() const noexcept