49 bool Foam::coordinateSystems::readIOcontents()
75 <<
"--> FOAM IOWarning :" <<
nl 77 <<
"' instead of '" << typeName <<
"'" <<
nl;
89 <<
" expected " << typeName
91 <<
" while reading object " <<
name()
116 obr.time().constant(),
133 if (!readIOcontents())
143 PtrList<coordinateSystem>&& content
147 PtrList<coordinateSystem>(
std::move(content))
233 <<
"Global coordinate system: " 250 <<
"Could not find coordinate system: " <<
name <<
nl 251 <<
"available coordinate systems: " 288 const PtrList<coordinateSystem>& list = *
this;
292 for (
const coordinateSystem& csys : list)
295 csys.writeEntry(csys.name(),
os);
307 const bool writeOnProc
Base class for coordinate system specification, the default coordinate system type is cartesian ...
wordList names() const
A list of the coordinate-system names.
const T * test(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie...
labelList findMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
Extract list indices for all items with 'name()' that matches.
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
List of names generated by calling name() for each list item and filtered for matches.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const word & name() const noexcept
Return the object name.
constexpr char nl
The newline '\n' character (0x0a)
A centralized collection of named coordinate systems.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool headerOk()
Read and check header info. Does not check the headerClassName.
bool store()
Register object with its registry and transfer ownership to the registry.
Begin list [isseparator].
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
Functions to operate on Pointer Lists.
A simple container for options an IOstream can normally have.
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write using stream options.
void readIstream(Istream &is, const INew &inew)
Read from Istream using Istream constructor class.
bool isReadOptional() const noexcept
True if (LAZY_READ) bits are set [same as READ_IF_PRESENT].
static bool warnAboutAge(const int version) noexcept
Test if an age warning should be emitted.
defineTypeName(manifoldCellsMeshObject)
label findIndex(const wordRe &key) const
Find and return index for the first match, return -1 if not found.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
static bool master(const label communicator=-1)
Like Pstream::master but with a Pstream::parRun guard in case Pstream has not yet been initialised...
coordinateSystems(const coordinateSystems &)=delete
No copy construct.
void close()
Close Istream.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
static const char * headerTypeCompat
Header name for 1806 and earlier.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings...
int debug
Static debugging option.
OBJstream os(runTime.globalPath()/outputName)
bool isReadRequired() const noexcept
True if (MUST_READ | READ_MODIFIED) bits are set.
const coordinateSystem & lookup(const word &name) const
Return reference to named coordinateSystem or FatalErrror.
List< word > wordList
List of word.
const word & headerClassName() const noexcept
Return name of the class name read from header.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
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.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc=true) const
Write using stream options.
const coordinateSystem * cfind(const word &name) const
Return pointer to named coordinateSystem or nullptr on error.
bool found(const wordRe &key) const
Search if given key exists.
label findIndex(const ListType &input, typename ListType::const_reference val, const label start=0)
Deprecated(2017-10) search for first occurrence of the given element.
List< label > labelList
A List of labels.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Registry of regIOobjects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
static const coordinateSystems & New(const objectRegistry &obr)
Return previously registered or read construct from "constant".
bool writeData(Ostream &os) const
Write data.
Istream & readStream(const word &, const bool readOnProc=true)
Return Istream and check object type against that given.
labelList indices(const wordRe &key) const
Find and return indices for all matches.
label firstMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
Find first list item with 'name()' that matches, -1 on failure.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
#define InfoInFunction
Report an information message using Foam::Info.