Public Member Functions | Protected Member Functions | List of all members
sampledCuttingPlane Class Reference

A sampledSurface defined by a plane using an iso-surface algorithm to cut the mesh. More...

Inheritance diagram for sampledCuttingPlane:
Inheritance graph
[legend]
Collaboration diagram for sampledCuttingPlane:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("sampledCuttingPlane")
 
 sampledCuttingPlane (const word &name, const polyMesh &mesh, const dictionary &dict)
 
virtual ~sampledCuttingPlane ()=default
 
virtual bool needsUpdate () const
 
virtual bool expire ()
 
virtual bool update ()
 
const meshedSurfacesurface () const
 
const labelListmeshCells () const
 
virtual const pointFieldpoints () const
 
virtual const faceListfaces () const
 
virtual const labelListzoneIds () const
 
virtual const vectorFieldSf () const
 
virtual const scalarFieldmagSf () const
 
virtual const vectorFieldCf () const
 
virtual tmp< scalarFieldsample (const interpolation< scalar > &sampler) const
 
virtual tmp< vectorFieldsample (const interpolation< vector > &sampler) const
 
virtual tmp< sphericalTensorFieldsample (const interpolation< sphericalTensor > &sampler) const
 
virtual tmp< symmTensorFieldsample (const interpolation< symmTensor > &sampler) const
 
virtual tmp< tensorFieldsample (const interpolation< tensor > &sampler) const
 
virtual tmp< scalarFieldinterpolate (const interpolation< scalar > &interpolator) const
 
virtual tmp< vectorFieldinterpolate (const interpolation< vector > &interpolator) const
 
virtual tmp< sphericalTensorFieldinterpolate (const interpolation< sphericalTensor > &interpolator) const
 
virtual tmp< symmTensorFieldinterpolate (const interpolation< symmTensor > &interpolator) const
 
virtual tmp< tensorFieldinterpolate (const interpolation< tensor > &interpolator) const
 
virtual void print (Ostream &os, int level=0) const
 
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")
 
 declareRunTimeSelectionTable (autoPtr, sampledSurface, word,(const word &name, const polyMesh &mesh, const dictionary &dict),(name, mesh, dict))
 
 sampledSurface (const word &name, const polyMesh &mesh, const bool interpolateToPoints=false)
 
 sampledSurface (const word &name, const polyMesh &mesh, const dictionary &dict)
 
autoPtr< sampledSurfaceclone () const
 
virtual ~sampledSurface ()
 
const polyMeshmesh () const noexcept
 
const wordname () const noexcept
 
bool enabled () const noexcept
 
bool invariant () const noexcept
 
bool isPointData () const noexcept
 
virtual bool isPointData (const bool on)
 
scalar area () const
 
virtual bool hasFaceIds () const
 
polySurfacegetRegistrySurface (const objectRegistry &obr, word lookupName="") const
 
polySurfacestoreRegistrySurface (objectRegistry &obr, word lookupName="") const
 
bool removeRegistrySurface (objectRegistry &obr, word lookupName="") const
 
template<class Type , class GeoMeshType >
bool storeRegistryField (const objectRegistry &obr, const word &fieldName, const dimensionSet &dims, const Field< Type > &values, word lookupName="") const
 
template<class Type , class GeoMeshType >
bool storeRegistryField (const objectRegistry &obr, const word &fieldName, const dimensionSet &dims, Field< Type > &&values, word lookupName="") const
 
surfMeshgetSurfMesh (word lookupName="") const
 
surfMeshstoreSurfMesh (word lookupName="") const
 
bool removeSurfMesh (word lookupName="") const
 
template<class Type , class GeoMeshType >
bool storeSurfMeshField (const word &fieldName, const dimensionSet &dims, const Field< Type > &values, word lookupName="") const
 
template<class Type , class GeoMeshType >
bool storeSurfMeshField (const word &fieldName, const dimensionSet &dims, Field< Type > &&values, word lookupName="") const
 
virtual bool withSurfaceFields () const
 
virtual tmp< scalarFieldsample (const surfaceScalarField &sField) const
 
virtual tmp< vectorFieldsample (const surfaceVectorField &sField) const
 
virtual tmp< sphericalTensorFieldsample (const surfaceSphericalTensorField &sField) const
 
virtual tmp< symmTensorFieldsample (const surfaceSymmTensorField &sField) const
 
virtual tmp< tensorFieldsample (const surfaceTensorField &sField) const
 
virtual void rename (const word &newName)
 
bool interpolate () const noexcept
 
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)
 
- Public Member Functions inherited from meshedSurf
constexpr meshedSurf () noexcept=default
 
virtual ~meshedSurf ()=default
 
virtual const labelListfaceIds () const
 

Protected Member Functions

bool hasIsoSurface () const
 
- Protected Member Functions inherited from sampledSurface
virtual void clearGeom () const
 
 sampledSurface (const word &name, std::nullptr_t)
 

Additional Inherited Members

- Static Public Member Functions inherited from sampledSurface
static autoPtr< sampledSurfaceNew (const word &name, const polyMesh &mesh, const dictionary &dict)
 
- Static Public Attributes inherited from sampledSurface
static const wordList surfaceFieldTypes
 
- 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))
 
template<class Type >
static tmp< Field< Type > > sampleOnPoints (const interpolation< Type > &interpolator, const labelUList &elements, const faceList &fcs, const pointField &pts)
 
template<class Type >
static tmp< GeometricField< Type, fvPatchField, volMesh > > pointAverage (const GeometricField< Type, pointPatchField, pointMesh > &pfld)
 

Detailed Description

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.

Usage
Example of function object partial specification:
surfaces
{
    surface1
    {
        type        cuttingPlane;
        planeType   pointAndNormal;
        pointAndNormalDict
        {
            ...
        }
    }
}

Where the sub-entries comprise:

Property Description Required Default
type cuttingPlane yes
planeType plane description (pointAndNormal etc) yes
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
Note
The keyword zones has priority over zone.
See also
Foam::plane
Source files

Definition at line 146 of file sampledCuttingPlane.H.

Constructor & Destructor Documentation

◆ sampledCuttingPlane()

sampledCuttingPlane ( const word name,
const polyMesh mesh,
const dictionary dict 
)

◆ ~sampledCuttingPlane()

virtual ~sampledCuttingPlane ( )
virtualdefault

Member Function Documentation

◆ hasIsoSurface()

bool hasIsoSurface ( ) const
inlineprotected

Definition at line 252 of file sampledCuttingPlane.H.

References bool.

◆ TypeName()

TypeName ( "sampledCuttingPlane"  )

◆ needsUpdate()

bool needsUpdate ( ) const
virtual

Implements sampledSurface.

Definition at line 590 of file sampledCuttingPlane.C.

◆ expire()

bool expire ( )
virtual

Implements sampledSurface.

Definition at line 596 of file sampledCuttingPlane.C.

References sampledSurface::clearGeom(), Foam::expressions::patchExpr::debug, Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

◆ update()

bool update ( )
virtual

Implements sampledSurface.

Definition at line 622 of file sampledCuttingPlane.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

◆ surface()

const meshedSurface& surface ( ) const
inline

◆ meshCells()

const labelList& meshCells ( ) const
inline

Definition at line 303 of file sampledCuttingPlane.H.

◆ points()

virtual const pointField& points ( ) const
inlinevirtual

Implements sampledSurface.

Definition at line 313 of file sampledCuttingPlane.H.

References sampledCuttingPlane::surface().

Here is the call graph for this function:

◆ faces()

virtual const faceList& faces ( ) const
inlinevirtual

Implements sampledSurface.

Definition at line 319 of file sampledCuttingPlane.H.

References sampledCuttingPlane::surface(), and MeshedSurface::surfFaces().

Here is the call graph for this function:

◆ zoneIds()

virtual const labelList& zoneIds ( ) const
inlinevirtual

Reimplemented from meshedSurf.

Definition at line 325 of file sampledCuttingPlane.H.

References List::null().

Here is the call graph for this function:

◆ Sf()

virtual const vectorField& Sf ( ) const
inlinevirtual

Implements sampledSurface.

Definition at line 331 of file sampledCuttingPlane.H.

References MeshedSurface::Sf(), and sampledCuttingPlane::surface().

Here is the call graph for this function:

◆ magSf()

virtual const scalarField& magSf ( ) const
inlinevirtual

Implements sampledSurface.

Definition at line 337 of file sampledCuttingPlane.H.

References MeshedSurface::magSf(), and sampledCuttingPlane::surface().

Here is the call graph for this function:

◆ Cf()

virtual const vectorField& Cf ( ) const
inlinevirtual

Implements sampledSurface.

Definition at line 343 of file sampledCuttingPlane.H.

References MeshedSurface::Cf(), and sampledCuttingPlane::surface().

Here is the call graph for this function:

◆ sample() [1/5]

Foam::tmp< Foam::scalarField > sample ( const interpolation< scalar > &  sampler) const
virtual

Implements sampledSurface.

Definition at line 644 of file sampledCuttingPlane.C.

◆ sample() [2/5]

Foam::tmp< Foam::vectorField > sample ( const interpolation< vector > &  sampler) const
virtual

Implements sampledSurface.

Definition at line 654 of file sampledCuttingPlane.C.

◆ sample() [3/5]

Foam::tmp< Foam::sphericalTensorField > sample ( const interpolation< sphericalTensor > &  sampler) const
virtual

Implements sampledSurface.

Definition at line 664 of file sampledCuttingPlane.C.

◆ sample() [4/5]

Foam::tmp< Foam::symmTensorField > sample ( const interpolation< symmTensor > &  sampler) const
virtual

Implements sampledSurface.

Definition at line 674 of file sampledCuttingPlane.C.

◆ sample() [5/5]

Foam::tmp< Foam::tensorField > sample ( const interpolation< tensor > &  sampler) const
virtual

Implements sampledSurface.

Definition at line 684 of file sampledCuttingPlane.C.

◆ interpolate() [1/5]

Foam::tmp< Foam::scalarField > interpolate ( const interpolation< scalar > &  interpolator) const
virtual

Implements sampledSurface.

Definition at line 694 of file sampledCuttingPlane.C.

◆ interpolate() [2/5]

Foam::tmp< Foam::vectorField > interpolate ( const interpolation< vector > &  interpolator) const
virtual

Implements sampledSurface.

Definition at line 704 of file sampledCuttingPlane.C.

◆ interpolate() [3/5]

Foam::tmp< Foam::sphericalTensorField > interpolate ( const interpolation< sphericalTensor > &  interpolator) const
virtual

Implements sampledSurface.

Definition at line 714 of file sampledCuttingPlane.C.

◆ interpolate() [4/5]

Foam::tmp< Foam::symmTensorField > interpolate ( const interpolation< symmTensor > &  interpolator) const
virtual

Implements sampledSurface.

Definition at line 724 of file sampledCuttingPlane.C.

◆ interpolate() [5/5]

Foam::tmp< Foam::tensorField > interpolate ( const interpolation< tensor > &  interpolator) const
virtual

Implements sampledSurface.

Definition at line 734 of file sampledCuttingPlane.C.

◆ print()

void print ( Ostream os,
int  level = 0 
) const
virtual

Reimplemented from sampledSurface.

Definition at line 742 of file sampledCuttingPlane.C.

References Foam::flatOutput(), Foam::name(), os(), and points.

Here is the call graph for this function:

◆ sampleOnFaces()

Foam::tmp<Foam::Field<Type> > sampleOnFaces ( const interpolation< Type > &  sampler) const

Definition at line 32 of file sampledCuttingPlaneTemplates.C.

References points.

◆ sampleOnIsoSurfacePoints()

Foam::tmp<Foam::Field<Type> > sampleOnIsoSurfacePoints ( const interpolation< Type > &  interpolator) const

Definition at line 49 of file sampledCuttingPlaneTemplates.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::fac::interpolate(), mesh, Foam::New(), Foam::nl, interpolation::psi(), and tmp::reset().

Here is the call graph for this function:

◆ sampleOnPoints()

Foam::tmp<Foam::Field<Type> > sampleOnPoints ( const interpolation< Type > &  interpolator) const

Definition at line 90 of file sampledCuttingPlaneTemplates.C.

References points.


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