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"
331 FieldField* fieldPtr =
tf.ptr();
332 PtrList<Field<Type>>::transfer(*fieldPtr);
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>
390 os << static_cast<const PtrList<Field<Type>>&>(
f);
395 template<
template<
class>
class Field,
class Type>
#define COMPUTED_ASSIGNMENT(TYPE, op)
#define forAll(list, i)
Loop across all elements in list.
tmp< FieldField< Field, Type > > T() const
Return the field transpose (only defined for second rank tensors)
FieldField()
Construct null.
tmp< FieldField< Field, Type > > clone() const
Clone.
static tmp< FieldField< Field, Type > > NewCalculatedType(const FieldField< Field, Type2 > &ff)
Return a pointer to a new calculatedFvPatchFieldField created on.
void replace(const direction, const FieldField< Field, cmptType > &)
Replace a component field of the field.
pTraits< Type >::cmptType cmptType
Component type.
void operator=(const FieldField< Field, Type > &)
void negate()
Negate this field.
tmp< FieldField< Field, cmptType > > component(const direction) const
Return a component field of the field.
Pre-declare SubField and related Field type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void clear()
Clear the list, i.e. set size to zero.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool set(const label) const
Is element set.
Reference counter for various OpenFOAM components.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
volScalarField sf(fieldObject, mesh)
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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)
errorManip< error > abort(error &err)
void checkFields(const FieldField< Field, Type1 > &, const FieldField< Field, Type2 > &, const char *op)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.