Classes | |
class | chModOp |
class | cpOp |
class | existsOp |
class | fileOrNullOp |
class | fileSizeOp |
class | isDirOp |
class | isFileOp |
class | lastModifiedHROp |
class | lastModifiedOp |
class | lnOp |
class | mkDirOp |
class | modeOp |
class | mvBakOp |
class | mvOp |
class | readDirOp |
class | rmDirOp |
class | rmOp |
class | typeOp |
Public Member Functions | |
TypeName ("masterUncollated") | |
Runtime type information. More... | |
masterUncollatedFileOperation (const bool verbose) | |
Construct null. More... | |
masterUncollatedFileOperation (const label comm, const bool verbose) | |
Construct from communicator. More... | |
virtual | ~masterUncollatedFileOperation () |
Destructor. More... | |
virtual bool | mkDir (const fileName &, mode_t=0777) const |
Make directory. More... | |
virtual bool | chMod (const fileName &, const mode_t) const |
Set the file mode. More... | |
virtual mode_t | mode (const fileName &, const bool checkVariants=true, const bool followLink=true) const |
Return the file mode. More... | |
virtual fileType | type (const fileName &, const bool checkVariants=true, const bool followLink=true) const |
Return the file type: directory, file or link. More... | |
virtual bool | exists (const fileName &, const bool checkVariants=true, const bool followLink=true) const |
Does the name exist (as directory or file) in the file system? More... | |
virtual bool | isDir (const fileName &, const bool followLink=true) const |
Does the name exist as a directory in the file system? More... | |
virtual bool | isFile (const fileName &, const bool checkVariants=true, const bool followLink=true) const |
Does the name exist as a file in the file system? More... | |
virtual off_t | fileSize (const fileName &, const bool checkVariants=true, const bool followLink=true) const |
Return size of file. More... | |
virtual time_t | lastModified (const fileName &, const bool checkVariants=true, const bool followLink=true) const |
Return time of last file modification. More... | |
virtual double | highResLastModified (const fileName &, const bool checkVariants=true, const bool followLink=true) const |
Return time of last file modification. More... | |
virtual fileNameList | readDir (const fileName &, const fileType=fileType::file, const bool filterVariants=true, const bool followLink=true) const |
Read a directory and return the entries as a string list. More... | |
virtual bool | cp (const fileName &src, const fileName &dst, const bool followLink=true) const |
Copy, recursively if necessary, the source to the destination. More... | |
virtual bool | ln (const fileName &src, const fileName &dst) const |
Create a softlink. dst should not exist. Returns true if. More... | |
virtual bool | mv (const fileName &src, const fileName &dst, const bool followLink=false) const |
Rename src to dst. More... | |
virtual bool | mvBak (const fileName &, const std::string &ext="bak") const |
Rename to a corresponding backup file. More... | |
virtual bool | rm (const fileName &) const |
Remove a file, returning true if successful otherwise false. More... | |
virtual bool | rmDir (const fileName &) const |
Remove a directory and its contents. More... | |
virtual fileName | filePath (const bool globalFile, const IOobject &, const word &typeName) const |
Search for an object. globalFile : also check undecomposed case. More... | |
virtual fileName | dirPath (const bool globalFile, const IOobject &) const |
Search for a directory. globalFile : also check undecomposed. More... | |
virtual fileNameList | readObjects (const objectRegistry &db, const fileName &instance, const fileName &local, word &newInstance) const |
Search directory for objects. Used in IOobjectList. More... | |
virtual bool | readHeader (IOobject &, const fileName &, const word &typeName) const |
Read object header from supplied file. More... | |
virtual autoPtr< ISstream > | readStream (regIOobject &, const fileName &, const word &typeName, const bool read=true) const |
Reads header for regIOobject and returns an ISstream. More... | |
virtual bool | read (regIOobject &, const bool masterOnly, const IOstream::streamFormat defaultFormat, const word &typeName) const |
Top-level read. More... | |
virtual bool | writeObject (const regIOobject &, IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion, IOstream::compressionType compression=IOstream::UNCOMPRESSED, const bool write=true) const |
Writes a regIOobject (so header, contents and divider). More... | |
virtual autoPtr< ISstream > | NewIFstream (const fileName &filePath, IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion) const |
Generate an ISstream that reads a file. More... | |
virtual autoPtr< Ostream > | NewOFstream (const fileName &filePath, IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion, IOstream::compressionType compression=IOstream::UNCOMPRESSED, const bool write=true) const |
Generate an Ostream that writes a file. More... | |
virtual label | addWatch (const fileName &) const |
Add watching of a file. Returns handle. More... | |
virtual bool | removeWatch (const label) const |
Remove watch on a file (using handle) More... | |
virtual label | findWatch (const labelList &watchIndices, const fileName &) const |
Find index (or -1) of file in list of handles. More... | |
virtual void | addWatches (regIOobject &, const fileNameList &) const |
Helper: add watches for list of regIOobjects. More... | |
virtual fileName | getFile (const label) const |
Get name of file being watched (using handle) More... | |
virtual void | updateStates (const bool masterOnly, const bool syncPar) const |
Update state of all files. More... | |
virtual fileMonitor::fileState | getState (const label) const |
Get current state of file (using handle) More... | |
virtual void | setUnmodified (const label) const |
Set current state of file (using handle) to unmodified. More... | |
virtual instantList | findTimes (const fileName &, const word &) const |
Get sorted list of times. More... | |
virtual IOobject | findInstance (const IOobject &io, const scalar startValue, const word &stopInstance) const |
Find instance where IOobject is. Fails if cannot be found. More... | |
virtual void | setTime (const Time &) const |
Callback for time change. More... | |
virtual void | flush () const |
Forcibly wait until all output done. Flush any cached data. More... | |
const HashPtrTable< instantList > & | times () const |
Return cached times. More... | |
Public Member Functions inherited from fileOperation | |
TypeName ("fileOperation") | |
Runtime type information. More... | |
fileOperation (const label comm) | |
Construct null. More... | |
declareRunTimeSelectionTable (autoPtr, fileOperation, word,(const bool verbose),(verbose)) | |
virtual | ~fileOperation () |
Destructor. More... | |
virtual fileName | objectPath (const IOobject &io, const word &typeName) const |
Generate disk file name for object. Opposite of filePath. More... | |
virtual fileName | filePath (const fileName &) const |
Search for a file or directory. Use IOobject version in. More... | |
virtual word | processorsDir (const IOobject &io) const |
Actual name of processors dir (for use in mode PROCOBJECT,. More... | |
virtual word | processorsDir (const fileName &) const |
Actual name of processors dir (for use in mode PROCOBJECT,. More... | |
virtual void | setNProcs (const label nProcs) |
Set number of processor directories/results. Only used in. More... | |
virtual label | nProcs (const fileName &dir, const fileName &local="") const |
Get number of processor directories/results. Used for e.g. More... | |
fileName | processorsCasePath (const IOobject &, const word &procDir) const |
Generate path (like io.path) from root+casename with any. More... | |
fileName | processorsPath (const IOobject &, const word &instance, const word &procDir) const |
Generate path (like io.path) with provided instance and any. More... | |
fileName | processorsPath (const fileName &, const word &procDir) const |
Operating on fileName: replace processorXXX with procDir. More... | |
Static Public Member Functions | |
static bool | uniformFile (const fileNameList &) |
Same file? More... | |
Static Public Member Functions inherited from fileOperation | |
static autoPtr< fileOperation > | New (const word &type, const bool verbose) |
Select type. More... | |
static label | splitProcessorPath (const fileName &, fileName &path, fileName &procDir, fileName &local, label &groupStart, label &groupSize, label &nProcs) |
Split fileName into part before 'processor' and part after. More... | |
static label | detectProcessorPath (const fileName &) |
Detect processor number from '/aa/bb/processorDDD/cc'. More... | |
Static Public Attributes | |
static float | maxMasterFileBufferSize |
Max size of parallel communications. Switches from non-blocking. More... | |
Static Public Attributes inherited from fileOperation | |
static const NamedEnum< pathType, 12 > | pathTypeNames_ |
static word | processorsBaseDir = "processors" |
Return the processors directory name (usually "processors") More... | |
static word | defaultFileHandler |
Default fileHandler. More... | |
static autoPtr< fileOperation > | fileHandlerPtr_ |
Static fileOperation. More... | |
Protected Member Functions | |
template<class Type > | |
Type | scatterList (const UList< Type > &, const int, const label comm) const |
template<class Type , class fileOp > | |
Type | masterOp (const fileName &, const fileOp &fop, const int tag, const label comm) const |
template<class Type , class fileOp > | |
Type | masterOp (const fileName &, const fileName &, const fileOp &fop, const int tag, const label comm) const |
virtual fileName | filePathInfo (const bool globalFile, const bool isFile, const IOobject &, pathType &searchType, word &processorsDir, word &instance) const |
Search (locally!) for object; return info on how it was found. More... | |
fileName | relativeObjectPath (const IOobject &, const pathType &searchType, const word &processorsDir, const word &instancePath) const |
Construct filePath. More... | |
bool | exists (const dirIndexList &, IOobject &io) const |
Helper: check IO for local existence. Like filePathInfo but. More... | |
Protected Member Functions inherited from fileOperation | |
fileMonitor & | monitor () const |
void | cacheProcessorsPath (const fileName &fName) const |
Detect presence of processorsDDD. More... | |
tmpNrc< dirIndexList > | lookupProcessorsPath (const fileName &) const |
Lookup name of processorsDDD using cache. Return empty fileName. More... | |
bool | exists (IOobject &io) const |
Does ioobject exist. Is either a directory (empty name()) or. More... | |
Static Protected Member Functions | |
static labelList | subRanks (const label n) |
Get the list of processors that are part of this communicator. More... | |
static word | findInstancePath (const instantList &timeDirs, const instant &t) |
Equivalent of Time::findInstance. More... | |
static void | readAndSend (const fileName &fName, const labelUList &procs, PstreamBuffers &pBufs) |
Detect file (possibly compressed), read file contents and send. More... | |
static autoPtr< ISstream > | read (IOobject &io, const label comm, const bool uniform, const fileNameList &filePaths, const boolList &read) |
Read files on comms master. More... | |
Static Protected Member Functions inherited from fileOperation | |
static instantList | sortTimes (const fileNameList &, const word &) |
Sort directory entries according to time value. More... | |
static void | mergeTimes (const instantList &extraTimes, const word &constantName, instantList ×) |
Merge two times. More... | |
static bool | isFileOrDir (const bool isFile, const fileName &) |
Helper: check for file (isFile) or directory (!isFile) More... | |
Protected Attributes | |
const label | myComm_ |
Any communicator allocated by me. More... | |
HashPtrTable< instantList > | times_ |
Cached times for a given directory. More... | |
Protected Attributes inherited from fileOperation | |
const label | comm_ |
Communicator to use. More... | |
HashTable< dirIndexList > | procsDirs_ |
Detected processors directories. More... | |
autoPtr< fileMonitor > | monitorPtr_ |
file-change monitor for all registered files More... | |
Additional Inherited Members | |
Public Types inherited from fileOperation | |
enum | pathType { NOTFOUND , ABSOLUTE , OBJECT , WRITEOBJECT , PROCUNCOLLATED , PROCBASEOBJECT , PROCOBJECT , PARENTOBJECT , FINDINSTANCE , PROCUNCOLLATEDINSTANCE , PROCBASEINSTANCE , PROCINSTANCE } |
Enumeration for the location of an IOobject. More... | |
typedef Tuple2< fileName, Tuple2< pathType, label > > | dirIndex |
Description of processor directory naming: More... | |
typedef List< dirIndex > | dirIndexList |
Definition at line 80 of file masterUncollatedFileOperation.H.
masterUncollatedFileOperation | ( | const bool | verbose | ) |
Construct null.
Definition at line 707 of file masterUncollatedFileOperation.C.
References Foam::endl(), IOobject::fileModificationChecking, InfoHeader, IOobject::inotify, IOobject::inotifyMaster, masterUncollatedFileOperation::maxMasterFileBufferSize, IOobject::timeStamp, IOobject::timeStampMaster, and WarningInFunction.
masterUncollatedFileOperation | ( | const label | comm, |
const bool | verbose | ||
) |
Construct from communicator.
Definition at line 757 of file masterUncollatedFileOperation.C.
References Foam::endl(), IOobject::fileModificationChecking, InfoHeader, IOobject::inotify, IOobject::inotifyMaster, masterUncollatedFileOperation::maxMasterFileBufferSize, IOobject::timeStamp, IOobject::timeStampMaster, and WarningInFunction.
|
virtual |
Destructor.
Definition at line 833 of file masterUncollatedFileOperation.C.
References UPstream::freeCommunicator().
|
staticprotected |
Get the list of processors that are part of this communicator.
Definition at line 69 of file masterUncollatedFileOperation.C.
References List< T >::append(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), Foam::getEnv(), Foam::identityMap(), UPstream::myProcNo(), n, and PackedBoolList::set().
|
protected |
Definition at line 32 of file masterUncollatedFileOperationTemplates.C.
References PstreamBuffers::finishedSends(), UPstream::master(), UPstream::masterNo(), UPstream::myProcNo(), UPstream::nonBlocking, and UPstream::nProcs().
|
protected |
Definition at line 67 of file masterUncollatedFileOperationTemplates.C.
References Foam::endl(), Pstream::gatherList(), UPstream::master(), UPstream::myProcNo(), Foam::name(), UPstream::nProcs(), UPstream::parRun(), Foam::Pout, and List< T >::size().
|
protected |
Definition at line 110 of file masterUncollatedFileOperationTemplates.C.
References Foam::endl(), Pstream::gatherList(), UPstream::master(), UPstream::myProcNo(), UPstream::nProcs(), UPstream::parRun(), Foam::Pout, and List< T >::size().
|
staticprotected |
Equivalent of Time::findInstance.
Definition at line 122 of file masterUncollatedFileOperation.C.
References instant::equal(), forAllReverse, word::null, and timeDirs.
|
protectedvirtual |
Search (locally!) for object; return info on how it was found.
Does not do any parallel communication. globalFile : also check undecomposed case isFile : true:check for file false:check for directory searchType : how was found processorsDir : name of processor directory instance : instance
Definition at line 147 of file masterUncollatedFileOperation.C.
References fileOperation::ABSOLUTE, IOobject::caseName(), TimePaths::constant(), IOobject::db(), objectRegistry::dbDir(), fileOperation::FINDINSTANCE, Foam::first(), forAll, TimePaths::globalCaseName(), IOobject::headerClassName(), IOobject::instance(), fileName::isAbsolute(), Foam::isFile(), IOobject::local(), IOobject::name(), fileOperation::NOTFOUND, fileName::null, word::null, fileOperation::OBJECT, IOobject::objectPath(), fileOperation::PARENTOBJECT, Time::path(), fileOperation::PROCBASEINSTANCE, fileOperation::PROCBASEOBJECT, TimePaths::processorCase(), fileOperation::PROCINSTANCE, fileOperation::PROCOBJECT, fileOperation::PROCUNCOLLATED, fileOperation::PROCUNCOLLATEDINSTANCE, IOobject::rootPath(), Foam::second(), TimePaths::system(), IOobject::time(), and fileOperation::WRITEOBJECT.
|
protected |
Construct filePath.
Definition at line 329 of file masterUncollatedFileOperation.C.
References fileOperation::ABSOLUTE, IOobject::caseName(), IOobject::db(), objectRegistry::dbDir(), fileOperation::FINDINSTANCE, TimePaths::globalCaseName(), IOobject::headerClassName(), IOobject::instance(), IOobject::local(), UPstream::myProcNo(), IOobject::name(), Foam::name(), fileOperation::NOTFOUND, NotImplemented, fileName::null, fileOperation::OBJECT, fileOperation::PARENTOBJECT, UPstream::parRun(), IOobject::path(), fileOperation::PROCBASEINSTANCE, fileOperation::PROCBASEOBJECT, fileOperation::PROCINSTANCE, fileOperation::PROCOBJECT, fileOperation::PROCUNCOLLATED, fileOperation::PROCUNCOLLATEDINSTANCE, IOobject::rootPath(), IOobject::time(), UPstream::worldComm, and fileOperation::WRITEOBJECT.
Referenced by collatedFileOperation::objectPath().
|
staticprotected |
Detect file (possibly compressed), read file contents and send.
to processors
Definition at line 490 of file masterUncollatedFileOperation.C.
References UList< T >::begin(), Foam::count(), Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::fileSize(), forAll, FUNCTION_NAME, IOstream::good(), Foam::Pout, IFstream::stdStream(), and UOPstream::write().
|
staticprotected |
Read files on comms master.
Definition at line 549 of file masterUncollatedFileOperation.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), IOstream::BINARY, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, PstreamBuffers::finishedSends(), UPstream::master(), UPstream::masterNo(), UPstream::msgType(), UPstream::myProcNo(), IOobject::name(), UPstream::nonBlocking, UPstream::nProcs(), Foam::Pout, autoPtr< T >::ptr(), Foam::read(), UIPstream::read(), IOobject::readHeader(), autoPtr< T >::reset(), and autoPtr< T >::valid().
|
protected |
Helper: check IO for local existence. Like filePathInfo but.
without parent searching and instance searching
Definition at line 1396 of file masterUncollatedFileOperation.C.
References UList< T >::first(), forAll, IOobject::instance(), Foam::isFile(), IOobject::name(), word::null, IOobject::objectPath(), TimePaths::processorCase(), and IOobject::time().
TypeName | ( | "masterUncollated" | ) |
Runtime type information.
|
virtual |
Make directory.
Implements fileOperation.
Definition at line 845 of file masterUncollatedFileOperation.C.
References Foam::mode(), and UPstream::msgType().
|
virtual |
Set the file mode.
Implements fileOperation.
Definition at line 861 of file masterUncollatedFileOperation.C.
References Foam::mode(), and UPstream::msgType().
|
virtual |
Return the file mode.
Implements fileOperation.
Definition at line 877 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Return the file type: directory, file or link.
Implements fileOperation.
Definition at line 894 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Does the name exist (as directory or file) in the file system?
Optionally enable/disable check for gzip file.
Implements fileOperation.
Definition at line 914 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Does the name exist as a directory in the file system?
Implements fileOperation.
Definition at line 931 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Does the name exist as a file in the file system?
Optionally enable/disable check for gzip file.
Implements fileOperation.
Definition at line 947 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Return size of file.
Implements fileOperation.
Definition at line 964 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Return time of last file modification.
Implements fileOperation.
Definition at line 981 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Return time of last file modification.
Implements fileOperation.
Definition at line 998 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Read a directory and return the entries as a string list.
Implements fileOperation.
Definition at line 1061 of file masterUncollatedFileOperation.C.
References UPstream::msgType(), and Foam::type().
Copy, recursively if necessary, the source to the destination.
Implements fileOperation.
Definition at line 1079 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
Create a softlink. dst should not exist. Returns true if.
successful.
Implements fileOperation.
Definition at line 1097 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
Rename src to dst.
Implements fileOperation.
Definition at line 1114 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Rename to a corresponding backup file.
If the backup file already exists, attempt with "01" .. "99" suffix
Implements fileOperation.
Definition at line 1015 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Remove a file, returning true if successful otherwise false.
Implements fileOperation.
Definition at line 1031 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Remove a directory and its contents.
Implements fileOperation.
Definition at line 1046 of file masterUncollatedFileOperation.C.
References UPstream::msgType().
|
virtual |
Search for an object. globalFile : also check undecomposed case.
Implements fileOperation.
Definition at line 1132 of file masterUncollatedFileOperation.C.
References fileOperation::ABSOLUTE, TimePaths::constant(), Foam::endl(), fileOperation::FINDINSTANCE, IOobject::local(), UPstream::master(), UPstream::msgType(), fileOperation::NOTFOUND, fileOperation::OBJECT, IOobject::objectPath(), fileOperation::PARENTOBJECT, Time::path(), fileOperation::pathTypeNames_, Foam::Pout, fileOperation::PROCBASEINSTANCE, fileOperation::PROCBASEOBJECT, fileOperation::PROCINSTANCE, fileOperation::PROCOBJECT, fileOperation::PROCUNCOLLATED, fileOperation::PROCUNCOLLATEDINSTANCE, Pstream::scatter(), IOobject::time(), and fileOperation::WRITEOBJECT.
|
virtual |
Search for a directory. globalFile : also check undecomposed.
case
Implements fileOperation.
Definition at line 1275 of file masterUncollatedFileOperation.C.
References fileOperation::ABSOLUTE, Foam::endl(), fileOperation::FINDINSTANCE, IOobject::local(), UPstream::master(), UPstream::msgType(), fileOperation::NOTFOUND, fileOperation::OBJECT, IOobject::objectPath(), fileOperation::PARENTOBJECT, Foam::Pout, fileOperation::PROCBASEINSTANCE, fileOperation::PROCBASEOBJECT, fileOperation::PROCINSTANCE, fileOperation::PROCOBJECT, fileOperation::PROCUNCOLLATED, fileOperation::PROCUNCOLLATEDINSTANCE, Pstream::scatter(), and fileOperation::WRITEOBJECT.
|
virtual |
Search directory for objects. Used in IOobjectList.
Use non-time searching version
Reimplemented from fileOperation.
Definition at line 1645 of file masterUncollatedFileOperation.C.
References TimePaths::constant(), Foam::endl(), instant::equal(), fileOperation::findTimes(), forAllReverse, UPstream::master(), Foam::name(), word::null, regIOobject::objectPath(), UPstream::parRun(), Time::path(), Foam::Pout, fileOperation::readObjects(), Pstream::scatter(), objectRegistry::time(), and timeDirs.
Read object header from supplied file.
Implements fileOperation.
Definition at line 1732 of file masterUncollatedFileOperation.C.
References Foam::endl(), forAll, Pstream::gatherList(), IOstream::good(), IOobject::headerClassName(), UPstream::master(), UPstream::msgType(), UPstream::myProcNo(), IOobject::name(), Foam::nl, IOobject::note(), UPstream::nProcs(), Foam::Pout, IOobject::readHeader(), decomposedBlockData::readMasterHeader(), Pstream::scatter(), List< T >::setSize(), and UPstream::worldComm.
|
virtual |
Reads header for regIOobject and returns an ISstream.
to read the contents.
Implements fileOperation.
Definition at line 1857 of file masterUncollatedFileOperation.C.
References autoPtr< T >::clear(), Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::fileSize(), Pstream::gatherList(), regIOobject::global(), IOobject::headerClassName(), UPstream::master(), UPstream::msgType(), UPstream::myProcNo(), IOobject::name(), UPstream::nonBlocking, UPstream::nProcs(), regIOobject::objectPath(), UPstream::parRun(), Foam::Pout, Foam::read(), decomposedBlockData::readBlock(), decomposedBlockData::readBlocks(), IOobject::readHeader(), autoPtr< T >::reset(), Pstream::scatter(), UPstream::scheduled, OStringStream::str(), autoPtr< T >::valid(), and UPstream::worldComm.
|
virtual |
Top-level read.
Format set to ASCII if defaultFormat and file format are ASCII
Implements fileOperation.
Definition at line 2102 of file masterUncollatedFileOperation.C.
References UPstream::commsStruct::above(), IOstream::ASCII, UPstream::commsStruct::below(), regIOobject::close(), TimePaths::constant(), Foam::endl(), forAll, IOstream::format(), format(), regIOobject::global(), IOobject::headerClassName(), UPstream::linearCommunication(), UPstream::master(), UPstream::msgType(), UPstream::myProcNo(), IOobject::name(), IOobject::note(), UPstream::nProcs(), UPstream::nProcsSimpleSum, regIOobject::objectPath(), UPstream::parRun(), Time::path(), Foam::Pout, regIOobject::readData(), Pstream::scatter(), UPstream::scheduled, IOobject::time(), UPstream::treeCommunication(), UPstream::worldComm, and regIOobject::writeData().
|
virtual |
Writes a regIOobject (so header, contents and divider).
Returns success state.
Reimplemented from fileOperation.
Reimplemented in collatedFileOperation.
Definition at line 2225 of file masterUncollatedFileOperation.C.
References Foam::endl(), IOstream::good(), regIOobject::objectPath(), Foam::Pout, setTime(), IOobject::time(), Foam::vtkWriteOps::write(), regIOobject::writeData(), IOobject::writeEndDivider(), and IOobject::writeHeader().
|
virtual |
Generate an ISstream that reads a file.
Implements fileOperation.
Definition at line 2392 of file masterUncollatedFileOperation.C.
References IOstream::BINARY, Foam::endl(), PstreamBuffers::finishedSends(), format(), Pstream::gatherList(), UPstream::master(), UPstream::masterNo(), UPstream::msgType(), UPstream::myProcNo(), UPstream::nonBlocking, UPstream::nProcs(), UPstream::parRun(), Foam::Pout, UIPstream::read(), and UPstream::worldComm.
|
virtual |
Generate an Ostream that writes a file.
Implements fileOperation.
Definition at line 2503 of file masterUncollatedFileOperation.C.
References format(), and Foam::vtkWriteOps::write().
|
virtual |
Add watching of a file. Returns handle.
Reimplemented from fileOperation.
Definition at line 2534 of file masterUncollatedFileOperation.C.
References UPstream::master(), and Pstream::scatter().
|
virtual |
Remove watch on a file (using handle)
Reimplemented from fileOperation.
Definition at line 2549 of file masterUncollatedFileOperation.C.
References UPstream::master(), and Pstream::scatter().
|
virtual |
Find index (or -1) of file in list of handles.
Reimplemented from fileOperation.
Definition at line 2564 of file masterUncollatedFileOperation.C.
References forAll, UPstream::master(), and Pstream::scatter().
|
virtual |
Helper: add watches for list of regIOobjects.
Reimplemented from fileOperation.
Definition at line 2588 of file masterUncollatedFileOperation.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), HashTable< T, Key, Hash >::erase(), f(), forAll, forAllConstIter, and regIOobject::watchIndices().
|
virtual |
Get name of file being watched (using handle)
Reimplemented from fileOperation.
Definition at line 2626 of file masterUncollatedFileOperation.C.
References UPstream::master(), and Pstream::scatter().
|
virtual |
Update state of all files.
Reimplemented from fileOperation.
Definition at line 2641 of file masterUncollatedFileOperation.C.
References UPstream::master().
|
virtual |
Get current state of file (using handle)
Reimplemented from fileOperation.
Definition at line 2655 of file masterUncollatedFileOperation.C.
References UPstream::master(), Pstream::scatter(), and fileMonitor::UNMODIFIED.
|
virtual |
Set current state of file (using handle) to unmodified.
Reimplemented from fileOperation.
Definition at line 2670 of file masterUncollatedFileOperation.C.
References UPstream::master().
|
static |
Same file?
Definition at line 472 of file masterUncollatedFileOperation.C.
References List< T >::size().
Referenced by masterOFstream::~masterOFstream().
|
virtual |
Get sorted list of times.
Reimplemented from fileOperation.
Definition at line 2281 of file masterUncollatedFileOperation.C.
References Foam::directory, Foam::endl(), fileOperation::findTimes(), UPstream::master(), Foam::nl, UPstream::parRun(), Foam::Pout, and Pstream::scatter().
|
virtual |
Find instance where IOobject is. Fails if cannot be found.
and readOpt() is MUST_READ/MUST_READ_IF_MODIFIED. Otherwise returns stopInstance.
Reimplemented from fileOperation.
Definition at line 1445 of file masterUncollatedFileOperation.C.
References TimePaths::constant(), Foam::endl(), Foam::exists(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOobject::instance(), IOobject::local(), UPstream::master(), UPstream::msgType(), IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED, IOobject::name(), dimensioned< Type >::name(), Foam::name(), IOobject::objectPath(), Foam::Pout, IOobject::readOpt(), Pstream::scatter(), List< T >::size(), IOobject::time(), Time::times(), and UPstream::worldComm.
|
virtual |
Callback for time change.
Reimplemented from fileOperation.
Definition at line 2328 of file masterUncollatedFileOperation.C.
References List< T >::append(), TimePaths::constant(), Foam::endl(), Foam::findSortedIndex(), dimensioned< Type >::name(), Time::path(), Foam::Pout, fileOperation::setTime(), List< T >::size(), Foam::stableSort(), Time::subCycling(), and dimensioned< Type >::value().
|
virtual |
Forcibly wait until all output done. Flush any cached data.
Reimplemented from fileOperation.
Reimplemented in collatedFileOperation.
Definition at line 2527 of file masterUncollatedFileOperation.C.
References fileOperation::flush().
Referenced by collatedFileOperation::flush().
|
inline |
Return cached times.
Definition at line 787 of file masterUncollatedFileOperation.H.
References masterUncollatedFileOperation::times_.
|
protected |
Any communicator allocated by me.
Definition at line 89 of file masterUncollatedFileOperation.H.
|
mutableprotected |
Cached times for a given directory.
Definition at line 92 of file masterUncollatedFileOperation.H.
Referenced by masterUncollatedFileOperation::times().
|
static |
Max size of parallel communications. Switches from non-blocking.
to scheduled when reading/writing files. Read as float to enable easy specification of large sizes.
Definition at line 498 of file masterUncollatedFileOperation.H.
Referenced by masterUncollatedFileOperation::masterUncollatedFileOperation().