65#ifndef expressions_patchExprDriver_H
66#define expressions_patchExprDriver_H
92 public parsing::genericRagelLemonDriver,
93 public expressions::fvExprDriver
97 static const fvPatch& getFvPatch
100 const dictionary&
dict
139 void operator=(
const parseDriver&) =
delete;
155 const parseDriver& driver,
156 const dictionary&
dict
183 virtual label
size()
const
201 using genericRagelLemonDriver::content;
207 const std::string& expr,
209 size_t len = std::string::npos
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Generic templated field type.
label nPoints() const
Number of points supporting patch faces.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
The field association for mesh (patch/volume) values.
static Type weightedAverage(const scalarField &weights, const Field< Type > &fld)
The (global) weighted average of a field, with stabilisation.
static Type weightedSum(const scalarField &weights, const Field< Type > &fld)
The (global) weighted sum (integral) of a field.
const exprResult & result() const noexcept
Const access to expression result.
const dictionary & dict() const noexcept
The dictionary with all input data/specification.
void setResult(Field< Type > *, bool wantPointData=false)
Set result field, taking ownership of the pointer.
Base driver for parsing value expressions associated with an fvMesh.
Driver for patch expressions.
virtual label size() const
The natural field size for the expression.
tmp< Field< Type > > getVariableIfAvailable(const word &fldName) const
Retrieve variable as field if possible.
tmp< boolField > field_faceZone(const word &name) const
Face selection (zone)
tmp< Field< Type > > patchNormalField(const word &fldName)
Return surface normal field (snGrad)
tmp< Field< Type > > faceToPoint(const Field< Type > &field) const
Interpolate face to point.
tmp< Field< Type > > patchNeighbourField(const word &fldName)
Return patchField on the opposite patch of a coupled patch.
ClassName("patchExpr::driver")
virtual label pointSize() const
The point field size for the expression.
tmp< boolField > field_cellZone(const word &name) const
Cell selection (zone)
tmp< vectorField > field_faceCentre() const
The face centres - (swak = pos)
tmp< Field< Type > > getVolField(const word &fldName)
Retrieve field (vol field)
tmp< Field< Type > > getPointField(const word &fldName)
Retrieve field (point field)
virtual unsigned parse(const std::string &expr, size_t pos=0, size_t len=std::string::npos)
Execute the parser.
void setResult(Field< Type > *ptr, bool pointVal=false)
Set result.
tmp< boolField > field_cellSet(const word &name) const
Cell selection (set)
void operator=(const parseDriver &)=delete
tmp< boolField > field_cellSelection(const word &name, enum topoSetSource::sourceType setType) const
Cell selections (as logical)
tmp< Field< Type > > pointToFace(const Field< Type > &field) const
Interpolate point to face values.
parseDriver(const parseDriver &)=delete
tmp< Field< Type > > getSurfaceField(const word &fldName)
Retrieve field (surface field)
tmp< boolField > field_faceSet(const word &name) const
Face selection (set)
tmp< scalarField > field_rand(label seed=0, bool gaussian=false) const
A uniform random field.
tmp< boolField > field_faceSelection(const word &name, enum topoSetSource::sourceType setType) const
Face selections (as logical)
tmp< Field< Type > > patchInternalField(const word &fldName)
Return internal field next to patch.
const fvPatch & patch_
The referenced patch.
Type areaAverage(const Field< Type > &fld) const
The area-weighted average of a field.
tmp< scalarField > field_faceArea() const
The face area magnitudes [magSf] - (swak = area)
tmp< vectorField > field_areaNormal() const
The face areas with their vector direction [Sf] - (swak = face)
tmp< vectorField > field_pointField() const
The patch point locations - (swak = pts)
virtual const fvMesh & mesh() const
The mesh we are attached to.
tmp< Field< Type > > getField(const word &fldName)
Return named field.
Type areaSum(const Field< Type > &fld) const
The area-weighted sum of a field.
tmp< scalarField > field_randGaussian(label seed=0) const
A Gaussian random field.
virtual ~parseDriver()=default
Destructor.
A topoSetPointSource to select all points based on usage in given faceSet(s).
const fvMesh & mesh() const noexcept
Return the mesh reference.
Mesh data needed to do the Finite Volume discretisation.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const scalarField & magSf() const
Return face area magnitudes.
const fvBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
const polyPatch & patch() const
Return the polyPatch.
Generic interface code for Ragel/Lemon combination Subclasses should implement one or more process() ...
A topoSetFaceSource to select faces with any point or any edge within a given pointSet(s).
A class for managing temporary objects.
sourceType
Enumeration defining the types of sources.
A class for handling words, derived from Foam::string.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
dimensionedScalar pos(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.