A sampledSurface defined by a distance to a surface - resolved using an iso-surface (algorithm: cell, point, topo) More...
Public Member Functions | |
TypeName ("sampledDistanceSurface") | |
Runtime type information. More... | |
sampledDistanceSurface (const word &name, const polyMesh &mesh, const dictionary &dict) | |
Construct from dictionary. More... | |
sampledDistanceSurface (const word name, const polyMesh &mesh, const bool interpolate, autoPtr< searchableSurface > &&surface, const scalar distance, const bool useSignedDistance) | |
virtual | ~sampledDistanceSurface ()=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... | |
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 vectors. 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 > > | sampleOnPoints (const interpolation< Type > &interpolator) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sampleOnIsoSurfacePoints (const interpolation< Type > &interpolator) const |
![]() | |
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... | |
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... | |
surfMesh * | getSurfMesh (word lookupName="") const |
Get surface from registry if available. More... | |
surfMesh * | storeSurfMesh (word lookupName="") const |
Copy surface into registry. More... | |
bool | removeSurfMesh (word lookupName="") const |
Remove surface from registry. More... | |
template<class Type , class GeoMeshType > | |
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) More... | |
template<class Type , class GeoMeshType > | |
bool | storeSurfMeshField (const word &fieldName, const dimensionSet &dims, Field< Type > &&values, word lookupName="") const |
Move/store sampled Face field onto surfMesh (if it exists) 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 void | rename (const word &newName) |
Rename. 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::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > | pointAverage (const GeometricField< Type, pointPatchField, pointMesh > &pfld) |
![]() | |
constexpr | meshedSurf () noexcept=default |
Default construct. More... | |
virtual | ~meshedSurf ()=default |
Destructor. More... | |
virtual const labelList & | faceIds () const |
Per-face identifier (eg, element Id) More... | |
![]() | |
TypeName ("distanceSurface") | |
Runtime type information. More... | |
distanceSurface (const word &defaultSurfaceName, const polyMesh &mesh, const dictionary &dict) | |
Construct from dictionary. More... | |
distanceSurface (const polyMesh &mesh, const word &surfaceType, const word &surfaceName, const isoSurfaceParams ¶ms=isoSurfaceParams(), const bool interpolate=false) | |
Construct from components with zero-distanced. More... | |
distanceSurface (const polyMesh &mesh, const bool interpolate, const word &surfaceType, const word &surfaceName, const scalar distance, const bool useSignedDistance, const isoSurfaceParams ¶ms=isoSurfaceParams()) | |
Construct from components. More... | |
distanceSurface (const polyMesh &mesh, const bool interpolate, autoPtr< searchableSurface > &&surface, const scalar distance, const bool useSignedDistance, const isoSurfaceParams ¶ms=isoSurfaceParams()) | |
virtual | ~distanceSurface ()=default |
Destructor. More... | |
void | createGeometry () |
Create/recreate the distance surface. More... | |
const word & | surfaceName () const |
The name of the underlying searchableSurface. More... | |
scalar | distance () const noexcept |
The distance to the underlying searchableSurface. More... | |
const meshedSurface & | surface () const |
The underlying surface. More... | |
meshedSurface & | surface () |
The underlying surface. More... | |
const labelList & | meshCells () const |
For each face, the original cell in mesh. More... | |
labelList & | meshCells () |
For each face, the original cell in mesh. More... | |
void | print (Ostream &os, int level=0) const |
Print information. More... | |
Additional Inherited Members | |
![]() | |
static autoPtr< sampledSurface > | New (const word &name, const polyMesh &mesh, const dictionary &dict) |
Return a reference to the selected surface. More... | |
![]() | |
static const wordList | surfaceFieldTypes |
Class names for surface field types. More... | |
![]() | |
virtual void | clearGeom () const |
Additional cleanup when clearing the geometry. More... | |
sampledSurface (const word &name, std::nullptr_t) | |
Construct null. More... | |
![]() | |
bool | hasIsoSurface () const |
Is currently backed by an isoSurfacePtr_. More... | |
template<class Type > | |
tmp< Field< Type > > | isoSurfaceInterpolate (const GeometricField< Type, fvPatchField, volMesh > &cellValues, const Field< Type > &pointValues) const |
Interpolate volume field onto surface points. More... | |
bool | refineBlockedCells (bitSet &ignoreCells, const isoSurfaceBase &isoContext) const |
Re-filter the blocked cells based on the anticipated cuts. More... | |
bitSet | filterPrepareRegionSplit (const bitSet &ignoreCells) const |
Prepare blockedFaces for region split. More... | |
void | filterKeepLargestRegion (bitSet &ignoreCells) const |
Keep region with the most cuts (after region split) More... | |
void | filterKeepNearestRegions (bitSet &ignoreCells) const |
Keep region(s) closest to the nearest points. More... | |
void | filterRegionProximity (bitSet &ignoreCells) const |
Remove region(s) that have far faces. More... | |
void | filterFaceProximity () |
Adjust extracted iso-surface to remove far faces. More... | |
![]() | |
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< GeometricField< Type, fvPatchField, volMesh > > | pointAverage (const GeometricField< Type, pointPatchField, pointMesh > &pfld) |
Create cell values by averaging the point values. More... | |
A sampledSurface defined by a distance to a surface - resolved using an iso-surface (algorithm: cell, point, topo)
This is often embedded as part of a sampled surfaces function object.
surfaces { surface1 { type distanceSurface; surfaceType triSurfaceMesh; surfaceName something.obj; topology proximity; } }
Where the sub-entries comprise:
Property | Description | Required | Default |
---|---|---|---|
type | distanceSurface | yes | |
distance | distance from surface | no | 0 |
signed | Use sign when distance is positive | no | true |
isoMethod | Iso-algorithm (cell/topo/point) | no | default |
regularise | Face simplification (enum or bool) | no | true |
average | Cell values from averaged point values | no | false |
bounds | Limit with bounding box | no | |
surfaceType | Type of surface | yes | |
surfaceName | Name of surface in triSurface/ | no | dict name |
topology | Topology filter name | no | none |
nearestPoints | Points for point-based segmentation | no | |
maxDistance | Max search distance for nearestPoints | no | GREAT |
absProximity | Max proximity of face centres | no | 1e-5 |
Definition at line 158 of file sampledDistanceSurface.H.
sampledDistanceSurface | ( | const word & | name, |
const polyMesh & | mesh, | ||
const dictionary & | dict | ||
) |
Construct from dictionary.
Definition at line 54 of file sampledDistanceSurface.C.
sampledDistanceSurface | ( | const word | name, |
const polyMesh & | mesh, | ||
const bool | interpolate, | ||
autoPtr< searchableSurface > && | surface, | ||
const scalar | distance, | ||
const bool | useSignedDistance | ||
) |
Definition at line 68 of file sampledDistanceSurface.C.
|
virtualdefault |
Destructor.
TypeName | ( | "sampledDistanceSurface" | ) |
Runtime type information.
|
virtual |
Does the surface need an update?
Implements sampledSurface.
Definition at line 93 of file sampledDistanceSurface.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 99 of file sampledDistanceSurface.C.
References Foam::expressions::patchExpr::debug, 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 121 of file sampledDistanceSurface.C.
References distanceSurface::createGeometry(), Foam::expressions::patchExpr::debug, Foam::endl(), and Foam::Pout.
|
inlinevirtual |
Points of surface.
Implements sampledSurface.
Definition at line 244 of file sampledDistanceSurface.H.
References distanceSurface::surface().
|
inlinevirtual |
Faces of surface.
Implements sampledSurface.
Definition at line 250 of file sampledDistanceSurface.H.
References distanceSurface::surface(), and MeshedSurface< Face >::surfFaces().
|
inlinevirtual |
Per-face zone/region information.
Reimplemented from meshedSurf.
Definition at line 256 of file sampledDistanceSurface.H.
References List< T >::null().
|
inlinevirtual |
Face area vectors.
Implements sampledSurface.
Definition at line 262 of file sampledDistanceSurface.H.
References MeshedSurface< Face >::Sf(), and distanceSurface::surface().
|
inlinevirtual |
Face area magnitudes.
Implements sampledSurface.
Definition at line 268 of file sampledDistanceSurface.H.
References MeshedSurface< Face >::magSf(), and distanceSurface::surface().
|
inlinevirtual |
Face centres.
Implements sampledSurface.
Definition at line 274 of file sampledDistanceSurface.H.
References MeshedSurface< Face >::Cf(), and distanceSurface::surface().
|
virtual |
Sample volume field onto surface faces.
Implements sampledSurface.
Definition at line 142 of file sampledDistanceSurface.C.
|
virtual |
Sample volume field onto surface faces.
Implements sampledSurface.
Definition at line 151 of file sampledDistanceSurface.C.
|
virtual |
Sample volume field onto surface faces.
Implements sampledSurface.
Definition at line 160 of file sampledDistanceSurface.C.
|
virtual |
Sample volume field onto surface faces.
Implements sampledSurface.
Definition at line 169 of file sampledDistanceSurface.C.
|
virtual |
Sample volume field onto surface faces.
Implements sampledSurface.
Definition at line 178 of file sampledDistanceSurface.C.
|
virtual |
Interpolate volume field onto surface points.
Implements sampledSurface.
Definition at line 187 of file sampledDistanceSurface.C.
|
virtual |
Interpolate volume field onto surface points.
Implements sampledSurface.
Definition at line 196 of file sampledDistanceSurface.C.
|
virtual |
Interpolate volume field onto surface points.
Implements sampledSurface.
Definition at line 204 of file sampledDistanceSurface.C.
|
virtual |
Interpolate volume field onto surface points.
Implements sampledSurface.
Definition at line 213 of file sampledDistanceSurface.C.
|
virtual |
Interpolate volume field onto surface points.
Implements sampledSurface.
Definition at line 222 of file sampledDistanceSurface.C.
|
virtual |
Print information.
Reimplemented from sampledSurface.
Definition at line 230 of file sampledDistanceSurface.C.
References Foam::name(), os(), and distanceSurface::print().
Foam::tmp<Foam::Field<Type> > sampleOnFaces | ( | const interpolation< Type > & | sampler | ) | const |
Definition at line 39 of file sampledDistanceSurfaceTemplates.C.
References points.
Foam::tmp<Foam::Field<Type> > sampleOnPoints | ( | const interpolation< Type > & | interpolator | ) | const |
Definition at line 56 of file sampledDistanceSurfaceTemplates.C.
References points.
Foam::tmp<Foam::Field<Type> > sampleOnIsoSurfacePoints | ( | const interpolation< Type > & | interpolator | ) | const |
Definition at line 78 of file sampledDistanceSurfaceTemplates.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::fac::interpolate(), mesh, Foam::New(), Foam::nl, interpolation< Type >::psi(), and tmp< T >::reset().