74 #ifndef Foam_sampledSurface_H 75 #define Foam_sampledSurface_H 106 const polyMesh& mesh_;
118 mutable scalar area_;
134 const Type& defaultValue = Type(
Zero)
212 const polyMesh& mesh_;
215 DynamicList<dictionary>& capture_;
225 autoPtr<sampledSurface>
operator()(Istream& is)
const 242 const bool interpolateToPoints =
false 320 virtual bool expire() = 0;
324 virtual bool update() = 0;
384 template<
class Type,
class GeoMeshType>
388 const word& fieldName,
395 template<
class Type,
class GeoMeshType>
399 const word& fieldName,
A surface mesh consisting of general polygon faces and capable of holding fields. ...
bool interpolate() const noexcept
Same as isPointData()
virtual ~sampledSurface()
Destructor - calls clearGeom()
virtual const scalarField & magSf() const =0
Face area magnitudes.
TypeName("sampledSurface")
Runtime type information.
virtual bool expire()=0
Mark the surface as needing an update.
static tmp< VolumeField< Type > > pointAverage(const PointField< Type > &pfld)
Create cell values by averaging the point values.
Forwards and collection of common volume field types.
const polyMesh & mesh() const noexcept
Access to the underlying mesh.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
An abstract class for surfaces with sampling.
autoPtr< sampledSurface > clone() const
Clone.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
virtual const vectorField & Sf() const =0
Face area vectors.
autoPtr< sampledSurface > operator()(Istream &is) const
static autoPtr< sampledSurface > New(const word &name, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected surface.
bool enabled() const noexcept
Surface is enabled.
iNewCapture(const polyMesh &mesh, DynamicList< dictionary > &capture)
const word & name() const noexcept
Name of surface.
virtual const faceList & faces() const =0
Faces of surface.
static tmp< Field< Type > > sampleOnPoints(const interpolation< Type > &interpolator, const labelUList &elements, const faceList &fcs, const pointField &pts)
Loop for interpolating volume elements to face points.
static tmp< Field< Type > > sampleOnFaces(const interpolation< Type > &sampler, const labelUList &elements, const faceList &fcs, const pointField &pts, const Type &defaultValue=Type(Zero))
Loop for sampling volume elements to faces.
virtual bool withSurfaceFields() const
Can it sample surface-fields?
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
virtual bool needsUpdate() const =0
Does the surface need an update?
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
virtual void clearGeom() const
Additional cleanup when clearing the geometry.
A class for handling words, derived from Foam::string.
declareRunTimeSelectionTable(autoPtr, sampledSurface, word,(const word &name, const polyMesh &mesh, const dictionary &dict),(name, mesh, dict))
Declare run-time constructor selection table.
bool invariant() const noexcept
Surface is invariant with geometry change (caution)
scalar area() const
The total surface area.
virtual bool update()=0
Update the surface as required.
sampledSurface(const word &name, std::nullptr_t)
Construct null.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
polySurface * getRegistrySurface(const objectRegistry &obr, word lookupName="") const
Get surface from registry if available.
iNew(const polyMesh &mesh)
virtual tmp< scalarField > sample(const interpolation< scalar > &sampler) const =0
Sample volume field onto surface faces.
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
virtual const vectorField & Cf() const =0
Face centres.
autoPtr< sampledSurface > operator()(Istream &is) const
bool storeRegistryField(const objectRegistry &obr, const word &fieldName, const dimensionSet &dims, const Field< Type > &values, word lookupName="") const
Copy/store sampled field onto registered surface (if it exists)
virtual const pointField & points() const =0
Points of surface.
virtual void print(Ostream &os, int level=0) const
Print information.
Abstract base class for volume field interpolation.
virtual void rename(const word &newName)
Rename.
bool removeRegistrySurface(objectRegistry &obr, word lookupName="") const
Remove surface from registry.
virtual bool hasFaceIds() const
If element ids/order of the original surface are available.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Registry of regIOobjects.
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))
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
polySurface * storeRegistrySurface(objectRegistry &obr, word lookupName="") const
Copy surface into registry.
PtrList read-construction helper.
bool isPointData() const noexcept
Using interpolation to surface points.
static constexpr const zero Zero
Global zero (0)