34 #ifndef readFieldsHander_H 35 #define readFieldsHander_H 65 template<
class FieldType>
68 if (
io.isHeaderClass<FieldType>())
71 Log <<
" Reading " <<
io.name()
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;
134 loadField<scalar>(
io)
135 || loadField<vector>(
io)
136 || loadField<sphericalTensor>(
io)
137 || loadField<symmTensor>(
io)
138 || loadField<tensor>(
io)
149 <<
"readFields : failed to load " << fieldName
160 static const bool debug =
false;
177 loadFields(fieldNames);
dimensionedScalar log(const dimensionedScalar &ds)
A simple field-loader, as per the readFields function object.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Generic GeometricField class.
Ignore writing from objectRegistry::writeObject()
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.
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
A class for handling words, derived from Foam::string.
readFieldsHandler(fvMesh &mesh, bool verbose=true)
Construct.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
#define DebugInfo
Report an information message using Foam::Info.
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time formatted with the given precision.
Mesh data needed to do the Finite Volume discretisation.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
bool execute(const UList< word > &fieldNames)
Defines the attributes of an object for which implicit objectRegistry management is supported...