Go to the documentation of this file.
62 #ifndef expressions_patchExprDriver_H
63 #define expressions_patchExprDriver_H
88 public parsing::genericRagelLemonDriver,
89 public expressions::fvExprDriver
93 static const fvPatch& getFvPatch
96 const dictionary&
dict
162 virtual label
size()
const
180 using genericRagelLemonDriver::content;
184 virtual unsigned parse
186 const std::string& expr,
188 size_t len = std::string::npos
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< 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.
Base driver for parsing value expressions associated with an fvMesh.
const fvMesh & mesh() const
Return the mesh reference.
void operator=(const parseDriver &)=delete
const fvBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
virtual label size() const
The underlying field size for the expression.
FieldAssociation
The field association for patch expressions (mutually exclusive)
tmp< Field< Type > > getSurfaceField(const word &fldName)
Retrieve field (surface field)
Generic templated field type.
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 underlying point field size for the expression.
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< scalarField > field_rand(label seed=0, bool gaussian=false) const
A uniform random field.
label nPoints() const
Return 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.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const dictionary & dict() const
The dictionary with all input data/specification.
virtual const exprResult & result() const
Const access to expression result.
const polyPatch & patch() const
Return the polyPatch.
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.
virtual autoPtr< expressions::fvExprDriver > clone() const
Clone.
dimensionedScalar pos(const dimensionedScalar &ds)