Go to the documentation of this file.
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
156 const dictionary&
dict
183 virtual label
size()
const
201 using genericRagelLemonDriver::content;
205 virtual unsigned parse
207 const std::string& expr,
209 size_t len = std::string::npos
233 tmp<Field<Type>>
getField(
const word& fldName);
sourceType
Enumeration defining the types of sources.
tmp< vectorField > field_pointField() const
The patch point locations - (swak = pts)
ClassName("patchExpr::driver")
A class for handling words, derived from Foam::string.
void setResult(Field< Type > *ptr, bool pointVal=false)
Set result.
A class for managing temporary objects.
tmp< Field< Type > > getVariableIfAvailable(const word &fldName) const
Retrieve variable as field if possible.
virtual unsigned parse(const std::string &expr, size_t pos=0, size_t len=std::string::npos)
Execute the parser.
tmp< boolField > field_faceSelection(const word &name, enum topoSetSource::sourceType setType) const
Face selections (as logical)
tmp< scalarField > field_faceArea() const
The face area magnitudes [magSf] - (swak = area)
Type areaAverage(const Field< Type > &fld) const
The area-weighted average of a field.
tmp< Field< Type > > getField(const word &fldName)
Return named field.
tmp< boolField > field_cellZone(const word &name) const
Cell selection (zone)
const exprResult & result() const noexcept
Const access to expression result.
Base driver for parsing value expressions associated with an fvMesh.
const fvMesh & mesh() const noexcept
Return the mesh reference.
void operator=(const parseDriver &)=delete
const fvBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
virtual label size() const
The natural field size for the expression.
tmp< Field< Type > > getSurfaceField(const word &fldName)
Retrieve field (surface field)
Generic templated field type.
tmp< boolField > field_cellSet(const word &name) const
Cell selection (set)
static Type weightedAverage(const scalarField &weights, const Field< Type > &fld)
The (global) weighted average of a field, with stabilisation.
Generic interface code for Ragel/Lemon combination Subclasses should implement one or more process() ...
tmp< vectorField > field_areaNormal() const
The face areas with their vector direction [Sf] - (swak = face)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual label pointSize() const
The point field size for the expression.
tmp< boolField > field_faceZone(const word &name) const
Face selection (zone)
tmp< boolField > field_faceSet(const word &name) const
Face selection (set)
tmp< Field< Type > > patchInternalField(const word &fldName)
Return internal field next to patch.
tmp< Field< Type > > patchNormalField(const word &fldName)
Return surface normal field (snGrad)
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))
tmp< Field< Type > > patchNeighbourField(const word &fldName)
Return patchField on the opposite patch of a coupled patch.
tmp< scalarField > field_rand(label seed=0, bool gaussian=false) const
A uniform random field.
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,...
tmp< vectorField > field_faceCentre() const
The face centres - (swak = pos)
Mesh data needed to do the Finite Volume discretisation.
Driver for patch expressions.
tmp< Field< Type > > pointToFace(const Field< Type > &field) const
Interpolate point to face values.
tmp< boolField > field_cellSelection(const word &name, enum topoSetSource::sourceType setType) const
Cell selections (as logical)
const dictionary & dict() const noexcept
The dictionary with all input data/specification.
const polyPatch & patch() const
Return the polyPatch.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
tmp< Field< Type > > getVolField(const word &fldName)
Retrieve field (vol field)
Type areaSum(const Field< Type > &fld) const
The area-weighted sum of a field.
void setResult(Field< Type > *, bool wantPointData=false)
Set result field, taking ownership of the pointer.
tmp< Field< Type > > faceToPoint(const Field< Type > &field) const
Interpolate face to point.
tmp< Field< Type > > getPointField(const word &fldName)
Retrieve field (point field)
virtual ~parseDriver()=default
Destructor.
const scalarField & magSf() const
Return face area magnitudes.
parseDriver(const parseDriver &)=delete
const fvPatch & patch_
The referenced patch.
static Type weightedSum(const scalarField &weights, const Field< Type > &fld)
The (global) weighted sum (integral) of a field.
virtual const fvMesh & mesh() const
The mesh we are attached to.
tmp< scalarField > field_randGaussian(label seed=0) const
A Gaussian random field.
The field association for mesh (patch/volume) values.
dimensionedScalar pos(const dimensionedScalar &ds)