Go to the documentation of this file.
74 #ifndef sampledSurface_H
75 #define sampledSurface_H
117 const polyMesh& mesh_;
129 mutable scalar area_;
145 const Type& defaultValue = Type(
Zero)
253 const bool interpolateToPoints =
false
331 virtual bool expire() = 0;
335 virtual bool update() = 0;
395 template<
class Type,
class GeoMeshType>
399 const word& fieldName,
406 template<
class Type,
class GeoMeshType>
410 const word& fieldName,
435 template<
class Type,
class GeoMeshType>
438 const word& fieldName,
445 template<
class Type,
class GeoMeshType>
448 const word& fieldName,
574 bool interpolate() const noexcept {
return isPointData_; }
polySurface * getRegistrySurface(const objectRegistry &obr, word lookupName="") const
Get surface from registry if available.
iNewCapture(const polyMesh &mesh, DynamicList< dictionary > &capture)
static autoPtr< sampledSurface > New(const word &name, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected surface.
autoPtr< sampledSurface > operator()(Istream &is) const
A class for handling words, derived from Foam::string.
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))
virtual const faceList & faces() const =0
Faces of surface.
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.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
declareRunTimeSelectionTable(autoPtr, sampledSurface, word,(const word &name, const polyMesh &mesh, const dictionary &dict),(name, mesh, dict))
Declare run-time constructor selection table.
virtual bool hasFaceIds() const
If element ids/order of the original surface are available.
bool removeRegistrySurface(objectRegistry &obr, word lookupName="") const
Remove surface from registry.
scalar area() const
The total surface area.
Abstract definition of a meshed surface defined by faces and points.
A surface mesh consisting of general polygon faces that has IO capabilities and a registry for storin...
bool invariant() const noexcept
Surface is invariant with geometry change (caution)
static const wordList surfaceFieldTypes
Class names for surface field types.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
static tmp< GeometricField< Type, fvPatchField, volMesh > > pointAverage(const GeometricField< Type, pointPatchField, pointMesh > &pfld)
Create cell values by averaging the point values.
virtual const scalarField & magSf() const =0
Face area magnitudes.
Mesh consisting of general polyhedral cells.
virtual tmp< scalarField > sample(const interpolation< scalar > &sampler) const =0
Sample volume field onto surface faces.
virtual bool expire()=0
Mark the surface as needing an update.
List< word > wordList
A List of words.
Registry of regIOobjects.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
A surface mesh consisting of general polygon faces and capable of holding fields.
virtual const pointField & points() const =0
Points of surface.
bool interpolate() const noexcept
Same as isPointData()
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual void rename(const word &newName)
Rename.
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
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)
autoPtr< sampledSurface > clone() const
Clone.
An abstract class for surfaces with sampling.
virtual void print(Ostream &os, int level=0) const
Print information.
iNew(const polyMesh &mesh)
Abstract base class for interpolation.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
const word & name() const noexcept
Name of surface.
bool isPointData() const noexcept
Using interpolation to surface points.
virtual const vectorField & Sf() const =0
Face area vectors.
bool enabled() const noexcept
Surface is enabled.
polySurface * storeRegistrySurface(objectRegistry &obr, word lookupName="") const
Copy surface into registry.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
TypeName("sampledSurface")
Runtime type information.
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.
virtual bool withSurfaceFields() const
Can it sample surface-fields?
Macros to ease declaration of run-time selection tables.
virtual bool needsUpdate() const =0
Does the surface need an update?
bool removeSurfMesh(word lookupName="") const
Remove surface from registry.
PtrList read-construction helper.
const polyMesh & mesh() const noexcept
Access to the underlying mesh.
virtual ~sampledSurface()
Destructor - calls clearGeom()
surfMesh * getSurfMesh(word lookupName="") const
Get surface from registry if available.
virtual void clearGeom() const
Additional cleanup when clearing the geometry.
virtual bool update()=0
Update the surface as required.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Generic GeometricField class.
sampledSurface(const word &name, std::nullptr_t)
Construct null.
virtual const vectorField & Cf() const =0
Face centres.
bool storeSurfMeshField(const word &fieldName, const dimensionSet &dims, const Field< Type > &values, word lookupName="") const
Copy/store sampled Face field onto surfMesh (if it exists)
surfMesh * storeSurfMesh(word lookupName="") const
Copy surface into registry.