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())
50 "checkFields(const FieldField<Field, Type1>&, " 51 "const FieldField<Field, Type2>&, const char* op)" 52 ) <<
" incompatible fields" 53 <<
" FieldField<" << pTraits<Type1>::typeName
54 <<
"> f1(" << f1.size() <<
')' 55 <<
" and FieldField<" << pTraits<Type2>::typeName
56 <<
"> f2(" << f2.size() <<
')' 57 <<
endl <<
" for operation " << op
62 template<
template<
class>
class Field,
class Type1,
class Type2,
class Type3>
65 const FieldField<Field, Type1>& f1,
66 const FieldField<Field, Type2>& f2,
67 const FieldField<Field, Type3>& f3,
71 if (f1.size() != f2.size() || f1.size() != f3.size())
75 "checkFields(const FieldField<Field, Type1>&, " 76 "const FieldField<Field, Type2>&, " 77 "const FieldField<Field, Type3>&, " 79 ) <<
" incompatible fields" 80 <<
" FieldField<" << pTraits<Type1>::typeName
81 <<
"> f1(" << f1.size() <<
')' 82 <<
", FieldField<" <<pTraits<Type2>::typeName
83 <<
"> f2(" << f2.size() <<
')' 84 <<
" and FieldField<"<<pTraits<Type3>::typeName
85 <<
"> f3("<<f3.size() <<
')' 86 <<
endl <<
" for operation " << op
93 template<
template<
class>
class Field,
class Type1,
class Type2>
102 template<
template<
class>
class Field,
class Type1,
class Type2,
class Type3>
117 template<
template<
class>
class Field,
class Type>
124 template<
template<
class>
class Field,
class Type>
131 template<
template<
class>
class Field,
class Type>
147 template<
template<
class>
class Field,
class Type>
155 template<
template<
class>
class Field,
class Type>
159 PtrList<Field<Type> >(f, reUse)
163 template<
template<
class>
class Field,
class Type>
171 #ifndef NoConstructFromTmp 172 template<
template<
class>
class Field,
class Type>
186 template<
template<
class>
class Field,
class Type>
193 template<
template<
class>
class Field,
class Type>
200 template<
template<
class>
class Field,
class Type>
201 template<
class Type2>
223 template<
template<
class>
class Field,
class Type>
233 template<
template<
class>
class Field,
class Type>
252 template<
template<
class>
class Field,
class Type>
266 template<
template<
class>
class Field,
class Type>
280 template<
template<
class>
class Field,
class Type>
295 template<
template<
class>
class Field,
class Type>
302 "FieldField<Field, Type>::" 303 "operator=(const FieldField<Field, Type>&)" 304 ) <<
"attempted assignment to self" 315 template<
template<
class>
class Field,
class Type>
322 "FieldField<Field, Type>::operator=(const tmp<FieldField>&)" 323 ) <<
"attempted assignment to self" 334 template<
template<
class>
class Field,
class Type>
344 #define COMPUTED_ASSIGNMENT(TYPE, op) \ 346 template<template<class> class Field, class Type> \ 347 void FieldField<Field, Type>::operator op(const FieldField<Field, TYPE>& f) \ 351 this->operator[](i) op f[i]; \ 355 template<template<class> class Field, class Type> \ 356 void FieldField<Field, Type>::operator op \ 358 const tmp<FieldField<Field, TYPE> >& tf \ 365 template<template<class> class Field, class Type> \ 366 void FieldField<Field, Type>::operator op(const TYPE& t) \ 370 this->operator[](i) op t; \ 379 #undef COMPUTED_ASSIGNMENT 384 template<
template<
class>
class Field,
class Type>
385 Ostream& operator<<(Ostream& os, const FieldField<Field, Type>&
f)
387 os << static_cast<const PtrList<Field<Type> >&>(
f);
392 template<
template<
class>
class Field,
class Type>
393 Ostream& operator<<(Ostream& os, const tmp<FieldField<Field, Type> >&
tf)
tmp< FieldField< Field, Type > > clone() const
Clone.
tmp< FieldField< Field, cmptType > > component(const direction) const
Return a component field of the field.
T * ptr() const
Return tmp pointer for reuse.
void transfer(PtrList< Field< Type > > &)
Transfer the contents of the argument PtrList into this PtrList.
void replace(const direction, const FieldField< Field, cmptType > &)
Replace a component field of the field.
label size() const
Return the number of elements in the PtrList.
bool set(const label) const
Is element set.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< FieldField< Field, Type > > T() const
Return the field transpose (only defined for second rank tensors)
#define COMPUTED_ASSIGNMENT(TYPE, op)
static tmp< FieldField< Field, Type > > NewCalculatedType(const FieldField< Field, Type2 > &ff)
Return a pointer to a new calculatedFvPatchFieldField created on.
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
void resetRefCount()
Reset the reference count to zero.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
pTraits< Type >::cmptType cmptType
Component type.
Pre-declare SubField and related Field type.
errorManip< error > abort(error &err)
Reference counter for various OpenFOAM components.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
void negate()
Negate this field.
void operator=(const FieldField< Field, Type > &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void checkFields(const FieldField< Field, Type1 > &, const FieldField< Field, Type2 > &, const char *op)
A class for managing temporary objects.
FieldField()
Construct null.
const Field< Type > & operator[](const label) const
Return element const reference.