53 Istream& is = readStream(typeName);
66 polyBoundaryMeshEntries reader(
io);
68 return PtrList<entry>(std::move(
static_cast<PtrList<entry>&
>(reader)));
106 label nNonProcessor = entries.size();
112 const word pType =
dict.
get<word>(
"type");
113 if (pType == processorPolyPatch::typeName)
115 nNonProcessor = patchi;
120 entries.resize(nNonProcessor);
127 const UPtrList<entry>& entries
130 os << entries.size();
143 const auto&
key = entries[patchi].keyword();
144 const auto&
dict = entries[patchi].dict();
161 return extract<word>(
"type", entries,
"patch");
170 return extract<label>(
"startFace", entries, 0);
179 return extract<label>(
"nFaces", entries, 0);
187 removeProcPatches(*
this);
193 return extract<word>(
"type", *
this,
"patch");
199 return extract<label>(
"startFace", *
this, 0);
205 return extract<label>(
"nFaces", *
this, 0);
211 writeEntries(
os, *
this);
223 if (!keyword.empty())
229 writeEntries(
os, entries);
237 return writeEntries(
os, *
this);
244 const bool writeOnProc
void writeEntry(Ostream &os) const
Write sub-dictionary with its dictName as its header.
polyBoundaryMeshEntries(const IOobject &io)
Read construct from IOobject. Never register!
void removeProcPatches()
Truncate at the first processor patch entry.
virtual Ostream & write(const char c) override
Write character.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual bool check(const char *operation) const
Check IOstream status for given operation.
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc=true) const
Write using stream options, forces UNCOMPRESSED.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
bool headerOk()
Read and check header info. Does not check the headerClassName.
Begin list [isseparator].
A simple container for options an IOstream can normally have.
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write using stream options.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
wordList types() const
Return a list of patch types, uses the "patch" entry.
bool isReadOptional() const noexcept
True if (LAZY_READ) bits are set [same as READ_IF_PRESENT].
static List< T > extract(const word &key, const UPtrList< entry > &entries, const T &initValue)
#define forAll(list, i)
Loop across all elements in list.
static bool writeEntries(Ostream &os, const UPtrList< entry > &entries)
Write list of entries.
defineTypeName(manifoldCellsMeshObject)
void close()
Close Istream.
A class for handling words, derived from Foam::string.
static PtrList< entry > readContents(const IOobject &io)
Read and return contents. The IOobject is never registered.
label size() const noexcept
The number of entries in the list.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
labelList patchSizes() const
Return a list of patch sizes, uses "nFaces" entry.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void writeEntry(Ostream &os) const
Write as a plain list of entries.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
OBJstream os(runTime.globalPath()/outputName)
compressionType compression() const noexcept
Get the stream compression.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
bool isReadRequired() const noexcept
True if (MUST_READ | READ_MODIFIED) bits are set.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
bool empty() const noexcept
True if the list is empty (ie, size() is zero)
labelList patchStarts() const
Return a list of patch start face indices, uses "startFace" entry.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
bool good() const noexcept
True if next operation might succeed.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual bool writeData(Ostream &os) const
The writeData member function required by regIOobject.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
virtual Ostream & endEntry()
Write end entry (';') followed by newline.
Read and store dictionary entries for boundary patches The object is *never* registered to avoid regi...
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Defines the attributes of an object for which implicit objectRegistry management is supported...