38template<
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 <<
"> f1(" << f1.size() <<
')'
52 <<
"> f2(" << f2.size() <<
')'
53 <<
endl <<
" for operation " << op
58template<
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())
71 <<
"> f1(" << f1.size() <<
')'
73 <<
"> f2(" << f2.size() <<
')'
75 <<
"> f3("<<f3.size() <<
')'
76 <<
endl <<
" for operation " << op
83template<
template<
class>
class Field,
class Type1,
class Type2>
92template<
template<
class>
class Field,
class Type1,
class Type2,
class Type3>
107template<
template<
class>
class Field,
class Type>
114template<
template<
class>
class Field,
class Type>
121template<
template<
class>
class Field,
class Type>
137template<
template<
class>
class Field,
class Type>
144template<
template<
class>
class Field,
class Type>
151template<
template<
class>
class Field,
class Type>
158template<
template<
class>
class Field,
class Type>
165template<
template<
class>
class Field,
class Type>
172template<
template<
class>
class Field,
class Type>
181template<
template<
class>
class Field,
class Type>
188template<
template<
class>
class Field,
class Type>
195template<
template<
class>
class Field,
class Type>
202 const label len = ff.size();
205 auto& result = tresult.ref();
207 for (label i=0; i<len; ++i)
218template<
template<
class>
class Field,
class Type>
223 this->operator[](i).negate();
228template<
template<
class>
class Field,
class Type>
233 this->operator[](i).normalise();
238template<
template<
class>
class Field,
class Type>
249 >::NewCalculatedType(*
this);
257template<
template<
class>
class Field,
class Type>
266 this->operator[](i).replace(d, sf[i]);
271template<
template<
class>
class Field,
class Type>
280 this->operator[](i).replace(d,
s);
285template<
template<
class>
class Field,
class Type>
300template<
template<
class>
class Field,
class Type>
312 this->operator[](i) = ff[i];
317template<
template<
class>
class Field,
class Type>
329template<
template<
class>
class Field,
class Type>
333 if (
this == &(tf.
cref()))
343 auto* tptr = tf.
ptr();
344 PtrList<Field<Type>>::transfer(*tptr);
349template<
template<
class>
class Field,
class Type>
354 this->operator[](i) = val;
359#define COMPUTED_ASSIGNMENT(TYPE, op) \
361template<template<class> class Field, class Type> \
362void FieldField<Field, Type>::operator op(const FieldField<Field, TYPE>& f) \
366 this->operator[](i) op f[i]; \
370template<template<class> class Field, class Type> \
371void FieldField<Field, Type>::operator op \
373 const tmp<FieldField<Field, TYPE>>& tf \
380template<template<class> class Field, class Type> \
381void FieldField<Field, Type>::operator op(const TYPE& t) \
385 this->operator[](i) op t; \
394#undef COMPUTED_ASSIGNMENT
399template<
template<
class>
class Field,
class Type>
402 os << static_cast<const PtrList<Field<Type>>&>(
f);
407template<
template<
class>
class Field,
class Type>
#define COMPUTED_ASSIGNMENT(TYPE, op)
A field of fields is a PtrList of fields with reference counting.
tmp< FieldField< Field, Type > > T() const
Return the field transpose (only defined for second rank tensors)
constexpr FieldField() noexcept
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 > &)
Copy assignment.
void negate()
Negate this field. See notes in Field.
void normalise()
Normalise this field. See notes in Field.
Generic templated 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 list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A class for managing temporary objects.
void clear() const noexcept
T * ptr() const
Return managed pointer for reuse, or clone() the object reference.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
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))
void checkFields(const FieldField< Field, Type1 > &, const FieldField< Field, Type2 > &, const char *op)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
#define forAll(list, i)
Loop across all elements in list.
static const char *const typeName
The type name used in ensight case files.