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>
153 template<
template<
class>
class Field,
class Type>
160 template<
template<
class>
class Field,
class Type>
167 template<
template<
class>
class Field,
class Type>
180 template<
template<
class>
class Field,
class Type>
187 template<
template<
class>
class Field,
class Type>
194 template<
template<
class>
class Field,
class Type>
195 template<
class Type2>
217 template<
template<
class>
class Field,
class Type>
222 this->operator[](i).negate();
227 template<
template<
class>
class Field,
class Type>
237 NewCalculatedType(*
this)
246 template<
template<
class>
class Field,
class Type>
255 this->operator[](i).replace(d, sf[i]);
260 template<
template<
class>
class Field,
class Type>
269 this->operator[](i).replace(d, s);
274 template<
template<
class>
class Field,
class Type>
289 template<
template<
class>
class Field,
class Type>
295 <<
"attempted assignment to self" 301 this->operator[](i) = f[i];
306 template<
template<
class>
class Field,
class Type>
312 <<
"attempted assignment to self" 320 template<
template<
class>
class Field,
class Type>
326 <<
"attempted assignment to self" 337 template<
template<
class>
class Field,
class Type>
342 this->operator[](i) = t;
347 #define COMPUTED_ASSIGNMENT(TYPE, op) \ 349 template<template<class> class Field, class Type> \ 350 void FieldField<Field, Type>::operator op(const FieldField<Field, TYPE>& f) \ 354 this->operator[](i) op f[i]; \ 358 template<template<class> class Field, class Type> \ 359 void FieldField<Field, Type>::operator op \ 361 const tmp<FieldField<Field, TYPE>>& tf \ 368 template<template<class> class Field, class Type> \ 369 void FieldField<Field, Type>::operator op(const TYPE& t) \ 373 this->operator[](i) op t; \ 382 #undef COMPUTED_ASSIGNMENT 387 template<
template<
class>
class Field,
class Type>
388 Ostream& operator<<(Ostream& os, const FieldField<Field, Type>&
f)
390 os << static_cast<const PtrList<Field<Type>>&>(
f);
395 template<
template<
class>
class Field,
class Type>
396 Ostream& operator<<(Ostream& os, const tmp<FieldField<Field, Type>>&
tf)
#define forAll(list, i)
Loop across all elements in list.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
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.
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)