distanceSurface Class Reference

A surface defined by a distance from an input searchable surface. Uses an iso-surface algorithm (cell, topo, point) for constructing the distance surface. More...

Inheritance diagram for distanceSurface:
[legend]

Public Member Functions

 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 bool interpolate, const word &surfaceType, const word &surfaceName, const scalar distance, const bool signedDistance, const isoSurfaceBase::algorithmType algo, const isoSurfaceBase::filterType filter, const boundBox &bounds=boundBox::invertedBox)
 Construct from components. More...
 
virtual ~distanceSurface ()=default
 Destructor. More...
 
void createGeometry ()
 Create/recreate the distance surface. More...
 
const wordsurfaceName () const
 The name of the underlying searchableSurface. More...
 
scalar distance () const
 The distance to the underlying searchableSurface. More...
 
const meshedSurfacesurface () const
 The underlying surface. More...
 
meshedSurfacesurface ()
 The underlying surface. More...
 
const labelListmeshCells () const
 For each face, the original cell in mesh. More...
 
labelListmeshCells ()
 For each face, the original cell in mesh. More...
 
template<class Type >
tmp< Field< Type > > interpolate (const GeometricField< Type, fvPatchField, volMesh > &cellValues, const Field< Type > &pointValues) const
 Interpolate volume field onto surface points. More...
 
void print (Ostream &os) const
 Print information. More...
 
template<class Type >
Foam::tmp< Foam::Field< Type > > interpolate (const GeometricField< Type, fvPatchField, volMesh > &cellValues, const Field< Type > &pointValues) const
 

Detailed Description

A surface defined by a distance from an input searchable surface. Uses an iso-surface algorithm (cell, topo, point) for constructing the distance surface.

Usage
Dictionary controls:
Property Description Required Default
distance distance from surface yes
signed Use sign when distance is positive partly
isoAlgorithm (cell/topo/point) no cell
regularise Point snapping (enum or bool) no true
bounds Limit with bounding box no
surfaceType Type of surface yes
surfaceName Name of surface in triSurface/ no dict name
Note
For distance = 0, some special adjustments.
  • Always signed (ignoring the input value).
  • Use normal distance from surface (for better treatment of open edges).
  • When the isoSurfaceCell algorithm is used, additional checks for open surfaces edges are used to limit the extend of resulting distance surface. The resulting surface elements will not, however, contain partial cell coverage.

For compatibility, the keyword 'cell' (as a bool) is accepted

Source files

Definition at line 121 of file distanceSurface.H.

Constructor & Destructor Documentation

◆ distanceSurface() [1/2]

distanceSurface ( const word defaultSurfaceName,
const polyMesh mesh,
const dictionary dict 
)

Construct from dictionary.

Definition at line 88 of file distanceSurface.C.

◆ distanceSurface() [2/2]

distanceSurface ( const polyMesh mesh,
const bool  interpolate,
const word surfaceType,
const word surfaceName,
const scalar  distance,
const bool  signedDistance,
const isoSurfaceBase::algorithmType  algo,
const isoSurfaceBase::filterType  filter,
const boundBox bounds = boundBox::invertedBox 
)

Construct from components.

Definition at line 134 of file distanceSurface.C.

◆ ~distanceSurface()

virtual ~distanceSurface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "distanceSurface"  )

Runtime type information.

◆ createGeometry()

◆ surfaceName()

const word& surfaceName ( ) const
inline

The name of the underlying searchableSurface.

Definition at line 202 of file distanceSurface.H.

◆ distance()

scalar distance ( ) const
inline

The distance to the underlying searchableSurface.

Definition at line 208 of file distanceSurface.H.

◆ surface() [1/2]

const meshedSurface& surface ( ) const
inline

The underlying surface.

Definition at line 215 of file distanceSurface.H.

Referenced by sampledDistanceSurface::Cf(), sampledDistanceSurface::faces(), sampledDistanceSurface::magSf(), sampledDistanceSurface::points(), and sampledDistanceSurface::Sf().

Here is the caller graph for this function:

◆ surface() [2/2]

meshedSurface& surface ( )
inline

The underlying surface.

Definition at line 230 of file distanceSurface.H.

◆ meshCells() [1/2]

const labelList& meshCells ( ) const
inline

For each face, the original cell in mesh.

Definition at line 244 of file distanceSurface.H.

◆ meshCells() [2/2]

labelList& meshCells ( )
inline

For each face, the original cell in mesh.

Definition at line 258 of file distanceSurface.H.

◆ interpolate() [1/2]

tmp<Field<Type> > interpolate ( const GeometricField< Type, fvPatchField, volMesh > &  cellValues,
const Field< Type > &  pointValues 
) const

Interpolate volume field onto surface points.

◆ print()

void print ( Ostream os) const

Print information.

Definition at line 468 of file distanceSurface.C.

References Foam::distance().

Referenced by distanceSurface::createGeometry(), and sampledDistanceSurface::print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpolate() [2/2]

Foam::tmp<Foam::Field<Type> > interpolate ( const GeometricField< Type, fvPatchField, volMesh > &  cellValues,
const Field< Type > &  pointValues 
) const

Definition at line 35 of file distanceSurfaceTemplates.C.


The documentation for this class was generated from the following files: