49 void Foam::coordinateSystems::readFromStream(
const bool readOnProc)
66 <<
"--> FOAM IOWarning :" <<
nl 68 <<
"' instead of '" << typeName <<
"'" <<
nl;
80 <<
" expected " << typeName
82 <<
" while reading object " <<
name()
89 bool Foam::coordinateSystems::readContents()
91 if (isReadRequired() || (isReadOptional() && headerOk()))
103 Foam::coordinateSystems::coordinateSystems(
const IOobject&
io)
112 Foam::coordinateSystems::coordinateSystems(
const objectRegistry& obr)
119 obr.time().constant(),
128 Foam::coordinateSystems::coordinateSystems
144 Foam::coordinateSystems::coordinateSystems
147 PtrList<coordinateSystem>&& content
151 PtrList<coordinateSystem>(
std::move(content))
237 <<
"Global coordinate system: " 254 <<
"Could not find coordinate system: " <<
name <<
nl 255 <<
"available coordinate systems: " 292 const PtrList<coordinateSystem>& list = *
this;
296 for (
const coordinateSystem& csys : list)
299 csys.writeEntry(csys.name(),
os);
311 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 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.
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...
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)
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
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
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.