30 template<
class Type,
class GeoMesh>
38 template<
class Type,
class GeoMesh>
50 this->set(iter.key(), iter()->
clone(iF).ptr());
55 template<
class Type,
class GeoMesh>
58 const DimensionedField<Type, GeoMesh>& iF,
59 const GeometricFieldSources<Type, GeoMesh>& mtf
62 GeometricFieldSources(iF, static_cast<const HashPtrTable<Source>&>(mtf))
66 template<
class Type,
class GeoMesh>
69 const DimensionedField<Type, GeoMesh>& iF,
70 const dictionary&
dict
73 HashPtrTable<Source>(),
80 template<
class Type,
class GeoMesh>
83 const DimensionedField<Type, GeoMesh>& iF,
84 const HashTable<word>& types
87 HashPtrTable<Source>(),
103 template<
class Type,
class GeoMesh>
111 template<
class Type,
class GeoMesh>
122 template<
class Type,
class GeoMesh>
133 template<
class Type,
class GeoMesh>
148 template<
class Type,
class GeoMesh>
173 template<
class Type,
class GeoMesh>
181 if (mtf.empty())
return;
184 (**mtf.HashPtrTable<Source>::begin()).internalField();
186 errorLocation_ = mtf.errorLocation_;
190 this->set(iter.key(), iter()->
clone(iF).ptr());
195 template<
class Type,
class GeoMesh>
217 "GeometricFieldSources<Type, GeoMesh>::"
218 "writeEntry(const word& keyword, Ostream& os) const"
225 template<
class Type,
class GeoMesh>
229 const word& sourceName
234 if (iter == this->end())
237 <<
"Cannot find fieldSource entry for " << sourceName
247 template<
class Type,
class GeoMesh>
254 typedef typename GeoMesh::template FieldSource<Type> Source;
255 os << static_cast<const HashPtrTable<Source>&>(bf);
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Part of a geometric field used for setting the values associated with optional sources.
GeometricFieldSources()
Construct null.
void readField(const Internal &field, const dictionary &dict)
Read the sources.
void writeEntry(const word &keyword, Ostream &os) const
Write sources as dictionary entry.
GeoMesh::template FieldSource< Type > Source
Type of the field source of which this field sources is composed.
HashTable< word > types() const
Return a map from the source name to the field source type.
const HashPtrTable< Source > & table() const
Access the underlying field table.
void reset(const GeometricFieldSources &)
Reset the boundary field contents to the given field.
~GeometricFieldSources()
Destructor.
A HashTable specialisation for hashing pointers.
An STL-conforming const_iterator.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by any number of values (e....
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Ostream & indent(Ostream &os)
Indent stream.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.