A sampledSurface defined by a plane using an iso-surface algorithm to cut the mesh. More...
Public Member Functions | |
TypeName ("sampledCuttingPlane") | |
Runtime type information. More... | |
sampledCuttingPlane (const word &name, const polyMesh &mesh, const dictionary &dict) | |
Construct from dictionary. More... | |
virtual | ~sampledCuttingPlane ()=default |
Destructor. More... | |
virtual bool | needsUpdate () const |
Does the surface need an update? More... | |
virtual bool | expire () |
Mark the surface as needing an update. More... | |
virtual bool | update () |
Update the surface as required. More... | |
const meshedSurface & | surface () const |
The current surface geometry. More... | |
const labelList & | meshCells () const |
For each face, the original cell in mesh. More... | |
virtual const pointField & | points () const |
Points of surface. More... | |
virtual const faceList & | faces () const |
Faces of surface. More... | |
virtual const labelList & | zoneIds () const |
Per-face zone/region information. More... | |
virtual const vectorField & | Sf () const |
Face area magnitudes. More... | |
virtual const scalarField & | magSf () const |
Face area magnitudes. More... | |
virtual const vectorField & | Cf () const |
Face centres. More... | |
virtual tmp< scalarField > | sample (const interpolation< scalar > &sampler) const |
Sample volume field onto surface faces. More... | |
virtual tmp< vectorField > | sample (const interpolation< vector > &sampler) const |
Sample volume field onto surface faces. More... | |
virtual tmp< sphericalTensorField > | sample (const interpolation< sphericalTensor > &sampler) const |
Sample volume field onto surface faces. More... | |
virtual tmp< symmTensorField > | sample (const interpolation< symmTensor > &sampler) const |
Sample volume field onto surface faces. More... | |
virtual tmp< tensorField > | sample (const interpolation< tensor > &sampler) const |
Sample volume field onto surface faces. More... | |
virtual tmp< scalarField > | interpolate (const interpolation< scalar > &interpolator) const |
Interpolate volume field onto surface points. More... | |
virtual tmp< vectorField > | interpolate (const interpolation< vector > &interpolator) const |
Interpolate volume field onto surface points. More... | |
virtual tmp< sphericalTensorField > | interpolate (const interpolation< sphericalTensor > &interpolator) const |
Interpolate volume field onto surface points. More... | |
virtual tmp< symmTensorField > | interpolate (const interpolation< symmTensor > &interpolator) const |
Interpolate volume field onto surface points. More... | |
virtual tmp< tensorField > | interpolate (const interpolation< tensor > &interpolator) const |
Interpolate volume field onto surface points. More... | |
virtual void | print (Ostream &os, int level=0) const |
Print information. More... | |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sampleOnFaces (const interpolation< Type > &sampler) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sampleOnIsoSurfacePoints (const interpolation< Type > &interpolator) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sampleOnPoints (const interpolation< Type > &interpolator) const |
Public Member Functions inherited from sampledSurface | |
TypeName ("sampledSurface") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, sampledSurface, word,(const word &name, const polyMesh &mesh, const dictionary &dict),(name, mesh, dict)) | |
Declare run-time constructor selection table. More... | |
sampledSurface (const word &name, const polyMesh &mesh, const bool interpolateToPoints=false) | |
Construct from name, mesh. More... | |
sampledSurface (const word &name, const polyMesh &mesh, const dictionary &dict) | |
Construct from dictionary. More... | |
autoPtr< sampledSurface > | clone () const |
Clone. More... | |
virtual | ~sampledSurface () |
Destructor - calls clearGeom() More... | |
const polyMesh & | mesh () const noexcept |
Access to the underlying mesh. More... | |
const word & | name () const noexcept |
Name of surface. More... | |
bool | enabled () const noexcept |
Surface is enabled. More... | |
bool | invariant () const noexcept |
Surface is invariant with geometry change (caution) More... | |
bool | isPointData () const noexcept |
Using interpolation to surface points. More... | |
virtual bool | isPointData (const bool on) |
Change point/cell representation, may trigger an expire(). More... | |
virtual bool | needsUpdate () const =0 |
Does the surface need an update? More... | |
virtual bool | expire ()=0 |
Mark the surface as needing an update. More... | |
virtual bool | update ()=0 |
Update the surface as required. More... | |
virtual const pointField & | points () const =0 |
Points of surface. More... | |
virtual const faceList & | faces () const =0 |
Faces of surface. More... | |
virtual const vectorField & | Sf () const =0 |
Face area vectors. More... | |
virtual const scalarField & | magSf () const =0 |
Face area magnitudes. More... | |
virtual const vectorField & | Cf () const =0 |
Face centres. More... | |
scalar | area () const |
The total surface area. More... | |
virtual bool | hasFaceIds () const |
If element ids/order of the original surface are available. More... | |
polySurface * | getRegistrySurface (const objectRegistry &obr, word lookupName="") const |
Get surface from registry if available. More... | |
polySurface * | storeRegistrySurface (objectRegistry &obr, word lookupName="") const |
Copy surface into registry. More... | |
bool | removeRegistrySurface (objectRegistry &obr, word lookupName="") const |
Remove surface from registry. More... | |
template<class Type , class GeoMeshType > | |
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) More... | |
template<class Type , class GeoMeshType > | |
bool | storeRegistryField (const objectRegistry &obr, const word &fieldName, const dimensionSet &dims, Field< Type > &&values, word lookupName="") const |
Move/store sampled field onto registered surface (if it exists) More... | |
virtual tmp< scalarField > | sample (const interpolation< scalar > &sampler) const =0 |
Sample volume field onto surface faces. More... | |
virtual tmp< vectorField > | sample (const interpolation< vector > &sampler) const =0 |
Sample volume field onto surface faces. More... | |
virtual tmp< sphericalTensorField > | sample (const interpolation< sphericalTensor > &sampler) const =0 |
Sample volume field onto surface faces. More... | |
virtual tmp< symmTensorField > | sample (const interpolation< symmTensor > &sampler) const =0 |
Sample volume field onto surface faces. More... | |
virtual tmp< tensorField > | sample (const interpolation< tensor > &sampler) const =0 |
Sample volume field onto surface faces. More... | |
virtual bool | withSurfaceFields () const |
Can it sample surface-fields? More... | |
virtual tmp< scalarField > | sample (const surfaceScalarField &sField) const |
Sample surface field onto surface. More... | |
virtual tmp< vectorField > | sample (const surfaceVectorField &sField) const |
Sample surface field onto surface. More... | |
virtual tmp< sphericalTensorField > | sample (const surfaceSphericalTensorField &sField) const |
Sample surface field onto surface. More... | |
virtual tmp< symmTensorField > | sample (const surfaceSymmTensorField &sField) const |
Sample surface field onto surface. More... | |
virtual tmp< tensorField > | sample (const surfaceTensorField &sField) const |
Sample surface field onto surface. More... | |
virtual tmp< scalarField > | interpolate (const interpolation< scalar > &interpolator) const =0 |
Interpolate volume field onto surface points. More... | |
virtual tmp< vectorField > | interpolate (const interpolation< vector > &interpolator) const =0 |
Interpolate volume field onto surface points. More... | |
virtual tmp< sphericalTensorField > | interpolate (const interpolation< sphericalTensor > &interpolator) const =0 |
Interpolate volume field onto surface points. More... | |
virtual tmp< symmTensorField > | interpolate (const interpolation< symmTensor > &interpolator) const =0 |
Interpolate volume field onto surface points. More... | |
virtual tmp< tensorField > | interpolate (const interpolation< tensor > &interpolator) const =0 |
Interpolate volume field onto surface points. More... | |
virtual void | rename (const word &newName) |
Rename. More... | |
virtual void | print (Ostream &os, int level=0) const |
Print information. More... | |
bool | interpolate () const noexcept |
Same as isPointData() More... | |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sampleOnFaces (const interpolation< Type > &sampler, const labelUList &elements, const faceList &fcs, const pointField &pts, const Type &defaultValue) |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sampleOnPoints (const interpolation< Type > &interpolator, const labelUList &elements, const faceList &fcs, const pointField &pts) |
template<class Type > | |
Foam::tmp< Foam::VolumeField< Type > > | pointAverage (const PointField< Type > &pfld) |
Public Member Functions inherited from meshedSurf | |
constexpr | meshedSurf () noexcept=default |
Default construct. More... | |
virtual | ~meshedSurf ()=default |
Destructor. More... | |
virtual const pointField & | points () const =0 |
The points used for the surface. More... | |
virtual const faceList & | faces () const =0 |
The faces used for the surface. More... | |
virtual const labelList & | zoneIds () const |
Per-face zone/region information. More... | |
virtual const labelList & | faceIds () const |
Per-face identifier (eg, element Id) More... | |
Protected Member Functions | |
bool | hasIsoSurface () const |
Is currently backed by an isoSurfacePtr_. More... | |
Protected Member Functions inherited from sampledSurface | |
virtual void | clearGeom () const |
Additional cleanup when clearing the geometry. More... | |
sampledSurface (const word &name, std::nullptr_t) | |
Construct null. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from sampledSurface | |
static autoPtr< sampledSurface > | New (const word &name, const polyMesh &mesh, const dictionary &dict) |
Return a reference to the selected surface. More... | |
Static Protected Member Functions inherited from sampledSurface | |
template<class Type > | |
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. More... | |
template<class Type > | |
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. More... | |
template<class Type > | |
static tmp< VolumeField< Type > > | pointAverage (const PointField< Type > &pfld) |
Create cell values by averaging the point values. More... | |
A sampledSurface defined by a plane using an iso-surface algorithm to cut the mesh.
This is often embedded as part of a sampled surfaces function object.
surfaces { surface1 { type cuttingPlane; point ...; normal ...; } }
Where the sub-entries comprise:
Property | Description | Required | Default |
---|---|---|---|
type | cuttingPlane | yes | |
planeType | Plane description (pointAndNormal etc) | no | |
offsets | Offsets of the origin in the normal direction | no | (0) |
isoMethod | Iso-algorithm (cell/topo/point) | no | topo |
bounds | limit with bounding box | no | |
zone | limit to cell zone (name or regex) | no | |
zones | limit to cell zones (names, regexs) | no | |
exposedPatchName | name for zone subset | optional | |
regularise | Face simplification (enum or bool) | no | true |
mergeTol | tolerance for merging points | no | 1e-6 |
coordinateSystem | define plane within given cartesian system | no | |
transform | define plane within given cartesian system | no |
zones
has priority over zone
.Definition at line 159 of file sampledCuttingPlane.H.
sampledCuttingPlane | ( | const word & | name, |
const polyMesh & | mesh, | ||
const dictionary & | dict | ||
) |
Construct from dictionary.
Definition at line 566 of file sampledCuttingPlane.C.
References isoSurfaceParams::ALGO_POINT, isoSurfaceParams::algorithm(), polyMesh::boundaryMesh(), polyMesh::cellZones(), DebugInfo, dict, UList< T >::empty(), Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, ZoneMesh< ZoneType, MeshType >::findIndex(), polyBoundaryMesh::findPatchID(), UList< T >::first(), Foam::flatOutput(), dictionary::found(), Foam::inplaceUniqueSort(), IOWarningInFunction, sampledSurface::mesh(), Foam::nl, dictionary::readEntry(), dictionary::readIfPresent(), List< T >::resize(), UList< T >::size(), and Foam::Zero.
|
virtualdefault |
Destructor.
|
inlineprotected |
Is currently backed by an isoSurfacePtr_.
Definition at line 269 of file sampledCuttingPlane.H.
References bool.
TypeName | ( | "sampledCuttingPlane" | ) |
Runtime type information.
|
virtual |
Does the surface need an update?
Implements sampledSurface.
Definition at line 656 of file sampledCuttingPlane.C.
|
virtual |
Mark the surface as needing an update.
May also free up unneeded data. Return false if surface was already marked as expired.
Implements sampledSurface.
Definition at line 662 of file sampledCuttingPlane.C.
References sampledSurface::clearGeom(), Foam::endl(), and Foam::Pout.
|
virtual |
Update the surface as required.
Do nothing (and return false) if no update was needed
Implements sampledSurface.
Definition at line 688 of file sampledCuttingPlane.C.
References Foam::endl(), and Foam::Pout.
|
inline |
The current surface geometry.
Definition at line 310 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::Cf(), sampledCuttingPlane::faces(), sampledCuttingPlane::magSf(), sampledCuttingPlane::points(), sampledCuttingPlane::sampleOnFaces(), and sampledCuttingPlane::Sf().
|
inline |
For each face, the original cell in mesh.
Definition at line 320 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::sampleOnFaces().
|
inlinevirtual |
Points of surface.
Implements sampledSurface.
Definition at line 330 of file sampledCuttingPlane.H.
References PrimitivePatch< FaceList, PointField >::points(), and sampledCuttingPlane::surface().
Referenced by sampledCuttingPlane::sampleOnFaces().
|
inlinevirtual |
Faces of surface.
Implements sampledSurface.
Definition at line 336 of file sampledCuttingPlane.H.
References sampledCuttingPlane::surface(), and MeshedSurface< Face >::surfFaces().
|
inlinevirtual |
Per-face zone/region information.
Reimplemented from meshedSurf.
Definition at line 342 of file sampledCuttingPlane.H.
References List< label >::null().
|
inlinevirtual |
Face area magnitudes.
Implements sampledSurface.
Definition at line 348 of file sampledCuttingPlane.H.
References MeshedSurface< Face >::Sf(), and sampledCuttingPlane::surface().
|
inlinevirtual |
Face area magnitudes.
Implements sampledSurface.
Definition at line 354 of file sampledCuttingPlane.H.
References MeshedSurface< Face >::magSf(), and sampledCuttingPlane::surface().
|
inlinevirtual |
Face centres.
Implements sampledSurface.
Definition at line 360 of file sampledCuttingPlane.H.
References MeshedSurface< Face >::Cf(), and sampledCuttingPlane::surface().
|
virtual |
Sample volume field onto surface faces.
Implements sampledSurface.
Definition at line 709 of file sampledCuttingPlane.C.
|
virtual |
Sample volume field onto surface faces.
Implements sampledSurface.
Definition at line 719 of file sampledCuttingPlane.C.
|
virtual |
Sample volume field onto surface faces.
Implements sampledSurface.
Definition at line 729 of file sampledCuttingPlane.C.
|
virtual |
Sample volume field onto surface faces.
Implements sampledSurface.
Definition at line 739 of file sampledCuttingPlane.C.
|
virtual |
Sample volume field onto surface faces.
Implements sampledSurface.
Definition at line 749 of file sampledCuttingPlane.C.
|
virtual |
Interpolate volume field onto surface points.
Implements sampledSurface.
Definition at line 759 of file sampledCuttingPlane.C.
|
virtual |
Interpolate volume field onto surface points.
Implements sampledSurface.
Definition at line 769 of file sampledCuttingPlane.C.
|
virtual |
Interpolate volume field onto surface points.
Implements sampledSurface.
Definition at line 779 of file sampledCuttingPlane.C.
|
virtual |
Interpolate volume field onto surface points.
Implements sampledSurface.
Definition at line 789 of file sampledCuttingPlane.C.
|
virtual |
Interpolate volume field onto surface points.
Implements sampledSurface.
Definition at line 799 of file sampledCuttingPlane.C.
|
virtual |
Print information.
Reimplemented from sampledSurface.
Definition at line 808 of file sampledCuttingPlane.C.
References Foam::flatOutput(), Foam::name(), os(), points, and UList< T >::size().
Foam::tmp< Foam::Field< Type > > sampleOnFaces | ( | const interpolation< Type > & | sampler | ) | const |
Definition at line 38 of file sampledCuttingPlaneTemplates.C.
References sampledCuttingPlane::meshCells(), sampledCuttingPlane::points(), sampledSurface::sampleOnFaces(), and sampledCuttingPlane::surface().
Foam::tmp< Foam::Field< Type > > sampleOnIsoSurfacePoints | ( | const interpolation< Type > & | interpolator | ) | const |
Definition at line 55 of file sampledCuttingPlaneTemplates.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::interpolate(), mesh, Time::New(), Foam::nl, interpolation< Type >::psi(), and tmp< T >::reset().
Foam::tmp< Foam::Field< Type > > sampleOnPoints | ( | const interpolation< Type > & | interpolator | ) | const |
Definition at line 96 of file sampledCuttingPlaneTemplates.C.
References points, and sampledSurface::sampleOnPoints().