38 template<
template<
class>
class Field,
class Type1,
class Type2>
41 const FieldField<Field, Type1>& f1,
42 const FieldField<Field, Type2>& f2,
46 if (f1.size() != f2.size())
49 <<
" FieldField<" << pTraits<Type1>::typeName
50 <<
"> f1(" << f1.size() <<
')' 51 <<
" and FieldField<" << pTraits<Type2>::typeName
52 <<
"> f2(" << f2.size() <<
')' 53 <<
endl <<
" for operation " << op
58 template<
template<
class>
class Field,
class Type1,
class Type2,
class Type3>
61 const FieldField<Field, Type1>& f1,
62 const FieldField<Field, Type2>& f2,
63 const FieldField<Field, Type3>& f3,
67 if (f1.size() != f2.size() || f1.size() != f3.size())
70 <<
" FieldField<" << pTraits<Type1>::typeName
71 <<
"> f1(" << f1.size() <<
')' 72 <<
", FieldField<" <<pTraits<Type2>::typeName
73 <<
"> f2(" << f2.size() <<
')' 74 <<
" and FieldField<"<<pTraits<Type3>::typeName
75 <<
"> f3("<<f3.size() <<
')' 76 <<
endl <<
" for operation " << op
83 template<
template<
class>
class Field,
class Type1,
class Type2>
92 template<
template<
class>
class Field,
class Type1,
class Type2,
class Type3>
107 template<
template<
class>
class Field,
class Type>
114 template<
template<
class>
class Field,
class Type>
121 template<
template<
class>
class Field,
class Type>
137 template<
template<
class>
class Field,
class Type>
145 template<
template<
class>
class Field,
class Type>
152 template<
template<
class>
class Field,
class Type>
159 #ifndef NoConstructFromTmp 160 template<
template<
class>
class Field,
class Type>
174 template<
template<
class>
class Field,
class Type>
181 template<
template<
class>
class Field,
class Type>
188 template<
template<
class>
class Field,
class Type>
189 template<
class Type2>
211 template<
template<
class>
class Field,
class Type>
216 this->operator[](i).negate();
221 template<
template<
class>
class Field,
class Type>
231 NewCalculatedType(*
this)
240 template<
template<
class>
class Field,
class Type>
249 this->operator[](i).replace(d, sf[i]);
254 template<
template<
class>
class Field,
class Type>
263 this->operator[](i).replace(d, s);
268 template<
template<
class>
class Field,
class Type>
283 template<
template<
class>
class Field,
class Type>
289 <<
"attempted assignment to self" 295 this->operator[](i) = f[i];
300 template<
template<
class>
class Field,
class Type>
306 <<
"attempted assignment to self" 317 template<
template<
class>
class Field,
class Type>
322 this->operator[](i) = t;
327 #define COMPUTED_ASSIGNMENT(TYPE, op) \ 329 template<template<class> class Field, class Type> \ 330 void FieldField<Field, Type>::operator op(const FieldField<Field, TYPE>& f) \ 334 this->operator[](i) op f[i]; \ 338 template<template<class> class Field, class Type> \ 339 void FieldField<Field, Type>::operator op \ 341 const tmp<FieldField<Field, TYPE>>& tf \ 348 template<template<class> class Field, class Type> \ 349 void FieldField<Field, Type>::operator op(const TYPE& t) \ 353 this->operator[](i) op t; \ 362 #undef COMPUTED_ASSIGNMENT 367 template<
template<
class>
class Field,
class Type>
368 Ostream& operator<<(Ostream& os, const FieldField<Field, Type>&
f)
370 os << static_cast<const PtrList<Field<Type>>&>(
f);
375 template<
template<
class>
class Field,
class Type>
376 Ostream& operator<<(Ostream& os, const tmp<FieldField<Field, Type>>&
tf)
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void clear() const
If object pointer points to valid object:
bool set(const label) const
Is element set.
Reference counter for various OpenFOAM components.
#define COMPUTED_ASSIGNMENT(TYPE, op)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
T & ref() const
Return non-const reference or generate a fatal error.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Pre-declare SubField and related Field type.
void checkFields(const FieldField< Field, Type1 > &, const FieldField< Field, Type2 > &, const char *op)
A class for handling words, derived from string.
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
label size() const
Return the number of elements in the UPtrList.
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
pTraits< Type >::cmptType cmptType
Component type.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
T * ptr() const
Return tmp pointer for reuse.
A class for managing temporary objects.
FieldField()
Construct null.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)