38 const word& entryName,
42 patchFunction1Base(
pp, entryName, faceValues),
51 const word& entryName,
69 coordSys_(
rhs.coordSys_)
116 return coordSys_.localPosition(globalPos);
126 if (!coordSys_.active())
131 tmp<Field<Type>> tresult =
134 ? this->coordSys_.transform(this->patch_.faceCentres(), tfld())
135 : this->coordSys_.transform(this->patch_.localPoints(), tfld())
149 if (!coordSys_.active())
154 if (this->faceValues())
156 return this->coordSys_.transform(this->patch_.faceCentres(),
fld);
182 coordSys_.writeEntry(
os);
196 const PatchFunction1<Type>&
rhs
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))
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Abstract base class to hold the Field mapping addressing and weights.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
virtual tmp< Field< Type > > integrate(const scalar x1, const scalar x2) const
Integrate between two (scalar) values.
virtual bool uniform() const =0
Is value uniform (i.e. independent of coordinate).
virtual void rmap(const PatchFunction1< Type > &rhs, const labelList &addr)
Reverse map the given PatchFunction1 onto this PatchFunction1.
virtual void autoMap(const FieldMapper &mapper)
Map (and resize as needed) from self given a mapping object.
virtual void writeData(Ostream &os) const
Write in dictionary format.
coordinateScaling< Type > coordSys_
Optional local coordinate system and scaling.
virtual tmp< Field< Type > > value(const scalar x) const
Return value as a function of (scalar) independent variable.
virtual tmp< pointField > localPosition(const pointField &globalPos) const
Helper: optionally convert coordinates to local coordinates.
virtual tmp< Field< Type > > transform(const Field< Type > &fld) const
Apply optional transformation.
const polyPatch const word const word const dictionary const bool faceValues
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
const polyPatch & patch_
Reference to the patch.
const polyPatch & patch() const noexcept
Reference to the patch.
A patch is a list of labels that address the faces in the global face list.
A class for managing temporary objects.
void clear() const noexcept
If object pointer points to valid object: delete object and set pointer to nullptr.
A class for handling words, derived from Foam::string.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
OBJstream os(runTime.globalPath()/outputName)
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
const std::string patch
OpenFOAM patch number as a std::string.
List< label > labelList
A List of labels.
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.