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() \
175 scalarFields_(ptf.scalarFields_),
176 vectorFields_(ptf.vectorFields_),
177 sphericalTensorFields_(ptf.sphericalTensorFields_),
178 symmTensorFields_(ptf.symmTensorFields_),
179 tensorFields_(ptf.tensorFields_)
193 refCast<const genericPointPatchField<Type>>(ptf);
195 #define MapTypeFields(Type, nullArg) \
196 forAllIter(HashPtrTable<Field<Type>>, Type##Fields_, iter) \
198 HashPtrTable<Field<Type>>::const_iterator dptfIter = \
199 dptf.Type##Fields_.find(iter.key()); \
201 if (dptfIter != dptf.Type##Fields_.end()) \
203 mapper(*iter(), *dptfIter()); \
218 refCast<const genericPointPatchField<Type>>(ptf);
220 #define ResetTypeFields(Type, nullArg) \
221 forAllIter(HashPtrTable<Field<Type>>, Type##Fields_, iter) \
223 HashPtrTable<Field<Type>>::const_iterator dptfIter = \
224 dptf.Type##Fields_.find(iter.key()); \
226 if (dptfIter != dptf.Type##Fields_.end()) \
228 iter()->reset(*dptfIter()); \
232 #undef ResetTypeFields
243 if (iter().keyword() !=
"type")
248 && iter().stream().size()
249 && iter().stream()[0].isWord()
250 && iter().stream()[0].wordToken() ==
"nonuniform"
253 #define WriteTypeFieldEntry(Type, nullArg) \
254 else if (Type##Fields_.found(iter().keyword())) \
260 *Type##Fields_.find(iter().keyword())() \
264 #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 keyword definitions, which are a keyword followed by any number of values (e....
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 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)