Go to the documentation of this file.
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>
144 template<
template<
class>
class Field,
class Type>
151 template<
template<
class>
class Field,
class Type>
158 template<
template<
class>
class Field,
class Type>
165 template<
template<
class>
class Field,
class Type>
172 template<
template<
class>
class Field,
class Type>
181 template<
template<
class>
class Field,
class Type>
188 template<
template<
class>
class Field,
class Type>
195 template<
template<
class>
class Field,
class Type>
196 template<
class Type2>
202 const label len =
ff.size();
205 auto& result = tresult.ref();
207 for (label i=0; i<len; ++i)
218 template<
template<
class>
class Field,
class Type>
223 this->operator[](i).negate();
228 template<
template<
class>
class Field,
class Type>
239 >::NewCalculatedType(*
this);
247 template<
template<
class>
class Field,
class Type>
256 this->operator[](i).replace(d, sf[i]);
261 template<
template<
class>
class Field,
class Type>
270 this->operator[](i).replace(d,
s);
275 template<
template<
class>
class Field,
class Type>
290 template<
template<
class>
class Field,
class Type>
302 this->operator[](i) =
ff[i];
307 template<
template<
class>
class Field,
class Type>
319 template<
template<
class>
class Field,
class Type>
323 if (
this == &(tf.
cref()))
333 auto* tptr = tf.
ptr();
334 PtrList<Field<Type>>::transfer(*tptr);
339 template<
template<
class>
class Field,
class Type>
344 this->operator[](i) = val;
349 #define COMPUTED_ASSIGNMENT(TYPE, op) \
351 template<template<class> class Field, class Type> \
352 void FieldField<Field, Type>::operator op(const FieldField<Field, TYPE>& f) \
356 this->operator[](i) op f[i]; \
360 template<template<class> class Field, class Type> \
361 void FieldField<Field, Type>::operator op \
363 const tmp<FieldField<Field, TYPE>>& tf \
370 template<template<class> class Field, class Type> \
371 void FieldField<Field, Type>::operator op(const TYPE& t) \
375 this->operator[](i) op t; \
384 #undef COMPUTED_ASSIGNMENT
389 template<
template<
class>
class Field,
class Type>
392 os << static_cast<const PtrList<Field<Type>>&>(
f);
397 template<
template<
class>
class Field,
class Type>
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
A class for handling words, derived from Foam::string.
A field of fields is a PtrList of fields with reference counting.
void clear() const noexcept
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A class for managing temporary objects.
void checkFields(const FieldField< Field, Type1 > &, const FieldField< Field, Type2 > &, const char *op)
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr FieldField() noexcept
Construct null.
#define forAll(list, i)
Loop across all elements in list.
Generic templated field type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
#define COMPUTED_ASSIGNMENT(TYPE, op)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
Ostream & operator<<(Ostream &os, const tmp< FieldField< Field, Type >> &tf)
errorManip< error > abort(error &err)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
pTraits< Type >::cmptType cmptType
Component type.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...