34#ifndef readFieldsHander_H
35#define readFieldsHander_H
65 template<
class FieldType>
72 <<
" (" << FieldType::typeName <<
')' <<
endl;
74 mesh_.objectRegistry::store(
new FieldType(
io, mesh_));
86 typedef typename VolFieldType::Internal IntVolFieldType;
92 loadAndStore<VolFieldType>(
io)
93 || loadAndStore<IntVolFieldType>(
io)
94 || loadAndStore<SurfaceFieldType>(
io)
104 for (
const word& fieldName : fieldSet_)
114 << ptr->name() <<
" (" << ptr->type()
115 <<
") already in database" <<
endl;
135 loadField<scalar>(
io)
136 || loadField<vector>(
io)
137 || loadField<sphericalTensor>(
io)
138 || loadField<symmTensor>(
io)
139 || loadField<tensor>(
io)
150 <<
"readFields : failed to load " << fieldName
161 static const bool debug =
false;
178 loadFields(fieldNames);
Generic GeometricField class.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
bool isHeaderClass() const
Check if headerClassName() equals Type::typeName.
const word & name() const noexcept
Return the object name.
bool typeHeaderOk(const bool checkType=true, const bool search=true, const bool verbose=true)
Read header (uses typeFilePath to find file) and check its info.
bool hasHeaderClass() const noexcept
True if headerClassName() is non-empty (after reading)
static word timeName(const scalar t, const int precision=precision_)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
const Type * cfindObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
A simple field-loader, as per the readFields function object.
bool execute(const UList< word > &fieldNames)
readFieldsHandler(fvMesh &mesh, bool verbose=true)
Construct.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for handling words, derived from Foam::string.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
#define DebugInfo
Report an information message using Foam::Info.
dimensionedScalar log(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.