36void Foam::IOobjectList::checkObjectOrder
38 const UPtrList<const IOobject>& objs,
46 auto iter = objectNames.begin();
48 for (
const IOobject&
io : objs)
54 checkNameOrder(objectNames, syncPar);
59void Foam::IOobjectList::checkNameOrder
70 masterNames = objectNames;
77 <<
"Objects not synchronised across processors." <<
nl
87void Foam::IOobjectList::syncNames(
wordList& objNames)
116 for (
const auto& objName : objNames)
128 const bool oldThrowingIOerr =
FatalIOError.throwing(
true);
133 ok = objectPtr->typeHeaderOk<
regIOobject>(
false,
false);
144 insert(objectPtr->name(), std::move(objectPtr));
164 else if (
auto iter = cfind(objName); iter.good())
222 return count(
static_cast<word>(clsName));
243 return names(
static_cast<word>(clsName));
270 checkNameOrder(objNames, syncPar);
300 [](
const word&
k){
return k.ends_with(
"_0"); },
321 checkNameOrder(objNames, syncPar);
335 << iter.val()->headerClassName() <<
nl;
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
A HashTable similar to std::unordered_map.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
List< Key > toc() const
The table of contents (the keys) in unsorted order.
const_iterator cfind(const Key &key) const
Find and return an const_iterator set at the hashed entry.
void reserve(label numEntries)
Reserve space for at least the specified number of elements (not the number of buckets) and regenerat...
label filterKeys(const UnaryPredicate &pred, const bool pruning=false)
Generalized means to filter table entries based on their keys.
label size() const noexcept
The number of elements in table.
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable,...
const IOobject * findObject(const word &objName) const
Return const pointer to the object found by name.
wordList sortedNames() const
The sorted names of the IOobjects.
const IOobject * cfindObject(const word &objName) const
Return const pointer to the object found by name.
IOobject * getObject(const word &objName) const
Return non-const pointer to the object found by name, using a const-cast to have it behave like a mut...
HashTable< wordHashSet > classes() const
A summary hash of classes used and their associated object names.
void checkNames(const bool syncPar=true) const
Verify that object names are synchronised across processors.
IOobjectList lookupClass(const char *clsName) const
The list of IOobjects with the given headerClassName.
IOobjectList() noexcept=default
Default construct: empty without allocation (capacity=0).
label prune_0()
Remove objects with names ending with "_0" (restart fields).
wordList allNames() const
The sorted names of all objects (synchronised across processors).
label count() const
The number of objects with headerClassName == Type::typeName.
IOobjectList lookupClass() const
The list of IOobjects with headerClassName == Type::typeName.
wordList names() const
The unsorted names of the IOobjects.
label count(const char *clsName) const
The number of objects of the given headerClassName.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static void combineReduce(T &value, CombineOp cop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce) applying cop to inplace combine value from different processors.
void size(const label n)
Older name for setAddressableSize.
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Negative if the process is not a...
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
static bool is_parallel(const label communicator=worldComm)
True if parallel algorithm or exchange is required.
@ broadcast
broadcast [MPI]
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
A class for handling file names.
Registry of regIOobjects.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
@ BEGIN_LIST
Begin list [isseparator].
@ END_LIST
End list [isseparator].
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define InfoInFunction
Report an information message using Foam::Info.
List< word > wordList
List of word.
List< fileName > fileNameList
List of fileName.
refPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler - forwards to fileOperation::handler().
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Ostream & endl(Ostream &os)
Add newline and flush stream.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
void sort(UList< T > &list)
Sort the list.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
messageStream Warning
Warning stream (stdout output on master, null elsewhere), with additional 'FOAM Warning' header text.
constexpr char nl
The newline '\n' character (0x0a).
nonInt insert("surfaceSum(((S|magSf)*S)")
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.
List helper to append y unique elements onto the end of x.
Unary and binary predicates that always return true, useful for templating.