Go to the documentation of this file.
73 #ifndef sampledSurface_H
74 #define sampledSurface_H
116 const polyMesh& mesh_;
128 mutable scalar area_;
313 virtual bool expire() = 0;
317 virtual bool update() = 0;
359 const objectRegistry& obr,
384 template<
class Type,
class GeoMeshType>
388 const word& fieldName,
395 template<
class Type,
class GeoMeshType>
399 const word& fieldName,
424 template<
class Type,
class GeoMeshType>
427 const word& fieldName,
434 template<
class Type,
class GeoMeshType>
437 const word& fieldName,
564 Ostream&
operator<<(Ostream& os,
const sampledSurface&
s);
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.
static const List< label > & null()
Return a null List.
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.
A class for managing temporary objects.
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.
static const wordList surfaceFieldTypes
Class names for surface field types.
Dimension set for the base types.
bool enabled() const
Surface is enabled.
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.
static tmp< Field< Type > > sampleOnFaces(const interpolation< Type > &sampler, const labelUList &elements, const faceList &fcs, const pointField &pts)
General loop for sampling elements to faces.
#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 invariant() const
Surface is invariant with geometry change (caution)
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 const labelList & originalIds() const
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,...
virtual const vectorField & Sf() const =0
Face area vectors.
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.
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 word & name() const
Name of surface.
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 void print(Ostream &os) const
Print information.
const polyMesh & mesh() const
Access to the underlying mesh.
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.
bool interpolate() const
Interpolation to nodes requested for surface.
sampledSurface(const word &name, std::nullptr_t)
Construct null.
Ostream & operator<<(Ostream &, const boundaryPatch &)
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.