45 if (iter().keyword() !=
"type")
50 && iter().stream().
size()
83 <<
"\n token following 'nonuniform' "
94 #define ReadTypeField(Type, nullArg) \
97 fieldToken.compoundToken().type() \
98 == token::Compound<List<Type>>::typeName \
101 Field<Type>* fPtr = new Field<Type>; \
104 dynamicCast<token::Compound<List<Type>>> \
106 fieldToken.transferCompoundToken(is) \
110 if (fPtr->size() != this->size()) \
112 FatalIOErrorInFunction(dict) \
113 << "\n size of field " \
114 << iter().keyword() \
115 << " (" << fPtr->size() << ')' \
116 << " is not the same size as the patch (" \
117 << this->size() << ')' \
119 << this->patch().name() \
121 << this->internalField().name() \
123 << this->internalField().objectPath() \
124 << exit(FatalIOError); \
127 Type##Fields_.insert(iter().keyword(), fPtr); \
151 #define MapTypeFields(Type, nullArg) \
152 forAllConstIter(HashPtrTable<Field<Type>>, ptf.Type##Fields_, iter) \
154 Type##Fields_.insert \
157 mapper(*iter()).ptr() \
176 , Type##Fields_(ptf.Type##Fields_)
192 refCast<const genericPointPatchField<Type>>(ptf);
194 #define MapTypeFields(Type, nullArg) \
195 forAllIter(HashPtrTable<Field<Type>>, Type##Fields_, iter) \
197 HashPtrTable<Field<Type>>::const_iterator dptfIter = \
198 dptf.Type##Fields_.find(iter.key()); \
200 if (dptfIter != dptf.Type##Fields_.end()) \
202 mapper(*iter(), *dptfIter()); \
217 refCast<const genericPointPatchField<Type>>(ptf);
219 #define ResetTypeFields(Type, nullArg) \
220 forAllIter(HashPtrTable<Field<Type>>, Type##Fields_, iter) \
222 HashPtrTable<Field<Type>>::const_iterator dptfIter = \
223 dptf.Type##Fields_.find(iter.key()); \
225 if (dptfIter != dptf.Type##Fields_.end()) \
227 iter()->reset(*dptfIter()); \
231 #undef ResetTypeFields
242 if (iter().keyword() !=
"type")
247 && iter().stream().size()
248 && iter().stream()[0].isWord()
249 && iter().stream()[0].wordToken() ==
"nonuniform"
252 #define WriteTypeFieldEntry(Type, nullArg) \
253 else if (Type##Fields_.found(iter().keyword())) \
259 *Type##Fields_.find(iter().keyword())() \
263 #undef WriteTypeFieldEntry
#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...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A calculated boundary condition for pointField.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Abstract base class for field mapping.
Base class for generic field types. Facilitates down-casting so that the actual type can be queried.
This boundary condition provides a generic version of the calculated condition, useful as a fallback ...
virtual void write(Ostream &) const
Write.
virtual void reset(const pointPatchField< Type > &)
Reset the pointPatchField to the given pointPatchField.
virtual void map(const pointPatchField< Type > &, const fieldMapper &)
Map the given pointPatchField onto this pointPatchField.
genericPointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
Abstract base class for point-mesh patch fields.
const DimensionedField< Type, pointMesh > & internalField() const
Return dimensioned internal field reference.
const pointPatch & patch() const
Return patch.
label size() const
Return size.
Basic pointPatch represents a set of points from the mesh.
virtual const word & name() const =0
Return name.
A token holds items read from Istream.
const word & wordToken() const
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define WriteTypeFieldEntry(Type, nullArg)
#define ResetTypeFields(Type, nullArg)
#define CopyTypeFields(Type, nullArg)
#define MapTypeFields(Type, nullArg)
#define ReadTypeField(Type, nullArg)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)