40 #ifndef Foam_SubField_H 41 #define Foam_SubField_H 52 template<
class Type>
class SubField;
93 const
UList<Type>& list,
100 const
UList<Type>& list,
110 const
UList<Type>& list,
119 const
UList<Type>& list
135 inline operator const
Foam::
Field<Type>&() const;
138 inline
void operator=(const
SubField<Type>&);
141 inline
void operator=(const
Field<Type>&);
144 inline
void operator=(const Type& val);
147 inline
void operator=(const
Foam::
zero);
151 inline
void operator=(const
VectorSpace<Form, Type, Ncmpts>& rhs);
154 inline
void operator+=(const Type& val);
157 inline
void operator-=(const Type& val);
160 inline
void operator*=(const scalar&
s);
163 inline
void operator/=(const scalar&
s);
173 #include "SubFieldI.H" 197 return SubField<Type>(*
this, len,
pos);
205 return SubField<Type>(*
this,
range);
213 return SubField<Type>(*
this,
range);
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
tmp< Field< Type > > T() const
Return the field transpose (only defined for second rank tensors)
A range or interval of labels defined by a start and a size.
A traits class, which is primarily used for primitives and vector-space.
SubField is a Field obtained as a section of another Field, without its own allocation. SubField is derived from a SubList rather than a List.
SubField() noexcept=default
Default construct, zero-sized and nullptr.
dimensionedScalar pos(const dimensionedScalar &ds)
A List obtained as a section of another List.
Generic templated field type.
pTraits< Type >::cmptType cmptType
Component type.
SubField< Type > slice(const label pos, label len=-1)
Return SubField slice (non-const access) - no range checking.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const noexcept
The number of elements in the container.
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;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A class for managing temporary objects.
static const SubField< Type > & null()
Return nullObject reference SubField.
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 non-counting (dummy) refCount.