115 return (
reinterpret_cast<const Field<Type>&
>(*
this)).component(d);
157template<
class Form, Foam::direction Ncmpts>
173 for (Type& lhs : *
this)
183 for (Type& lhs : *
this)
193 for (Type& lhs : *
this)
203 for (Type& lhs : *
this)
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
SubField is a Field obtained as a section of another Field, without its own allocation....
void operator*=(const scalar &s)
Multiply each entry by value.
void operator=(const SubField< Type > &)
Copy assign via UList operator. Takes linear time.
tmp< Field< Type > > T() const
Return the field transpose (only defined for second rank tensors).
SubField() noexcept=default
Default construct, zero-sized and nullptr.
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
void operator-=(const Type &val)
Subtract value from each entry.
void operator+=(const Type &val)
Add value to each entry.
void operator/=(const scalar &s)
Divide each entry by value.
A non-owning sub-view of a List (allocated or unallocated storage).
void operator=(const SubList< T > &list)
Copy assign entries (deep copy) from given sub-list. Sizes must match!
SubList() noexcept=default
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
scalar & operator[](const label i)
A range or interval of labels defined by a start and a size.
A class for managing temporary objects.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
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 rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
#define forAll(list, i)
Loop across all elements in list.