34 template<
class Type,
class GeoMesh>
38 const word& fieldDictEntry
41 dimensions_.readEntry(
"dimensions", fieldDict);
47 if (oriented_.oriented() != orientedType::ORIENTED)
49 oriented_.read(fieldDict);
56 fld.resize_nocopy(GeoMesh::size(mesh_));
57 fld.assign(fieldDictEntry, fieldDict,
fld.size());
61 template<
class Type,
class GeoMesh>
64 const word& fieldDictEntry
67 if (this->isReadRequired() || (this->isReadOptional() && this->headerOk()))
69 readField(
dictionary(readStream(typeName)), fieldDictEntry);
76 template<
class Type,
class GeoMesh>
81 const word& fieldDictEntry
90 readField(
dictionary(readStream(typeName)), fieldDictEntry);
94 template<
class Type,
class GeoMesh>
100 const word& fieldDictEntry
109 readField(fieldDict, fieldDictEntry);
115 template<
class Type,
class GeoMesh>
119 const word& fieldDictEntry
122 os.writeEntry(
"dimensions", dimensions());
125 if (oriented_.writeEntry(
os))
130 Field<Type>::writeEntry(fieldDictEntry,
os);
137 template<
class Type,
class GeoMesh>
146 template<
class Type,
class GeoMesh>
150 const DimensionedField<Type, GeoMesh>& df
159 template<
class Type,
class GeoMesh>
163 const tmp<DimensionedField<Type, GeoMesh>>& tdf
A list of keyword definitions, which are a keyword followed by a number of values (eg...
DimensionedField(const IOobject &io, const Mesh &mesh, const dimensionSet &dims, const Field< Type > &field)
Construct from components, copy initial field content.
constexpr char nl
The newline '\n' character (0x0a)
const dimensionSet dimless
Dimensionless.
const bool writeData(pdfDictionary.get< bool >("writeData"))
void readField(const dictionary &fieldDict, const word &fieldDictEntry="value")
Resize to the mesh size and read the field from the dictionary. Internal implementation checks field ...
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
Generic templated field type.
bool writeData(Ostream &os, const word &fieldDictEntry) const
Write dimensions, oriented flag (if valid) and the field data as a dictionary entry with the specifie...
A class for handling words, derived from Foam::string.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
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)
Defines the attributes of an object for which implicit objectRegistry management is supported...