Loading...
Searching...
No Matches
sampledInterface Class Reference

A sampledSurface that calculates the PLIC interface in VoF simulations Only works in combination with isoAdvector and a reconstruction scheme. More...

#include <sampledInterface.H>

Inheritance diagram for sampledInterface:
Collaboration diagram for sampledInterface:

Public Member Functions

 TypeName ("sampledInterface")
 Runtime type information.
 sampledInterface (const word &name, const polyMesh &mesh, const dictionary &dict)
 Construct from dictionary.
virtual ~sampledInterface ()=default
 Destructor.
const reconstructionSchemes::interfacesurface () const
virtual bool needsUpdate () const
 Does the surface need an update?
virtual bool expire ()
 Mark the surface as needing an update.
virtual bool update ()
 Update the surface as required.
virtual const pointFieldpoints () const
 Points of surface.
virtual const faceListfaces () const
 Faces of surface.
virtual const labelListzoneIds () const
 Const access to per-face zone/region information.
virtual const vectorFieldSf () const
 Face area magnitudes.
virtual const scalarFieldmagSf () const
 Face area magnitudes.
virtual const vectorFieldCf () const
 Face centres.
virtual tmp< scalarFieldsample (const interpolation< scalar > &sampler) const
 Sample volume field onto surface faces.
virtual tmp< vectorFieldsample (const interpolation< vector > &sampler) const
 Sample volume field onto surface faces.
virtual tmp< sphericalTensorFieldsample (const interpolation< sphericalTensor > &sampler) const
 Sample volume field onto surface faces.
virtual tmp< symmTensorFieldsample (const interpolation< symmTensor > &sampler) const
 Sample volume field onto surface faces.
virtual tmp< tensorFieldsample (const interpolation< tensor > &sampler) const
 Sample volume field onto surface faces.
virtual tmp< scalarFieldinterpolate (const interpolation< scalar > &interpolator) const
 Interpolate volume field onto surface points.
virtual tmp< vectorFieldinterpolate (const interpolation< vector > &interpolator) const
 Interpolate volume field onto surface points.
virtual tmp< sphericalTensorFieldinterpolate (const interpolation< sphericalTensor > &interpolator) const
 Interpolate volume field onto surface points.
virtual tmp< symmTensorFieldinterpolate (const interpolation< symmTensor > &interpolator) const
 Interpolate volume field onto surface points.
virtual tmp< tensorFieldinterpolate (const interpolation< tensor > &interpolator) const
 Interpolate volume field onto surface points.
virtual void print (Ostream &os, int level=0) const
 Print information.
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
Public Member Functions inherited from sampledSurface
 TypeName ("sampledSurface")
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, sampledSurface, word,(const word &name, const polyMesh &mesh, const dictionary &dict),(name, mesh, dict))
 Declare run-time constructor selection table.
 sampledSurface (const word &name, const polyMesh &mesh, const bool interpolateToPoints=false)
 Construct from name, mesh.
 sampledSurface (const word &name, const polyMesh &mesh, const dictionary &dict)
 Construct from dictionary.
autoPtr< sampledSurfaceclone () const
 Clone.
virtual ~sampledSurface ()
 Destructor - calls clearGeom().
const polyMeshmesh () const noexcept
 Access to the underlying mesh.
const wordname () const noexcept
 Name of surface.
bool enabled () const noexcept
 Surface is enabled.
bool invariant () const noexcept
 Surface is invariant with geometry change (caution).
bool isPointData () const noexcept
 Using interpolation to surface points.
virtual bool isPointData (const bool on)
 Change point/cell representation, may trigger an expire().
scalar area () const
 The total surface area.
virtual bool hasFaceIds () const
 If element ids/order of the original surface are available.
polySurfacegetRegistrySurface (const objectRegistry &obr, word lookupName="") const
 Get surface from registry if available.
polySurfacestoreRegistrySurface (objectRegistry &obr, word lookupName="") const
 Copy surface into registry.
bool removeRegistrySurface (objectRegistry &obr, word lookupName="") const
 Remove surface from registry.
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).
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).
virtual bool withSurfaceFields () const
 Can it sample surface-fields?
virtual tmp< scalarFieldsample (const surfaceScalarField &sField) const
 Sample surface field onto surface.
virtual tmp< vectorFieldsample (const surfaceVectorField &sField) const
 Sample surface field onto surface.
virtual tmp< sphericalTensorFieldsample (const surfaceSphericalTensorField &sField) const
 Sample surface field onto surface.
virtual tmp< symmTensorFieldsample (const surfaceSymmTensorField &sField) const
 Sample surface field onto surface.
virtual tmp< tensorFieldsample (const surfaceTensorField &sField) const
 Sample surface field onto surface.
virtual void rename (const word &newName)
 Rename.
bool interpolate () const noexcept
 Same as isPointData().
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.
virtual ~meshedSurf ()=default
 Destructor.
virtual const labelListfaceIds () const
 Per-face identifier (eg, element Id).

Additional Inherited Members

Static Public Member Functions inherited from sampledSurface
static autoPtr< sampledSurfaceNew (const word &name, const polyMesh &mesh, const dictionary &dict)
 Return a reference to the selected surface.
Protected Member Functions inherited from sampledSurface
virtual void clearGeom () const
 Additional cleanup when clearing the geometry.
 sampledSurface (const word &name, std::nullptr_t)
 Construct null.
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.
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.
template<class Type>
static tmp< VolumeField< Type > > pointAverage (const PointField< Type > &pfld)
 Create cell values by averaging the point values.

Detailed Description

A sampledSurface that calculates the PLIC interface in VoF simulations Only works in combination with isoAdvector and a reconstruction scheme.

This is often embedded as part of a sampled surfaces function object.

Usage
Example of function object partial specification:
surfaces
{
    freeSurf
    {
        type        interface;
        interpolate false;
    }
}

Where the sub-entries comprise:

Property Description Required Default
type interface yes

Original code supplied by Henning Scheufler, DLR (2019)

Source files

Definition at line 84 of file sampledInterface.H.

Constructor & Destructor Documentation

◆ sampledInterface()

sampledInterface ( const word & name,
const polyMesh & mesh,
const dictionary & dict )

Construct from dictionary.

Definition at line 106 of file sampledInterface.C.

References dict, if(), sampledSurface::mesh(), sampledSurface::name(), and sampledSurface::sampledSurface().

Here is the call graph for this function:

◆ ~sampledInterface()

virtual ~sampledInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "sampledInterface" )

Runtime type information.

References dict, sampledSurface::mesh(), and sampledSurface::name().

Here is the call graph for this function:

◆ surface()

const reconstructionSchemes::interface & surface ( ) const
inline

Definition at line 173 of file sampledInterface.H.

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

Here is the caller graph for this function:

◆ needsUpdate()

bool needsUpdate ( ) const
virtual

Does the surface need an update?

Implements sampledSurface.

Definition at line 140 of file sampledInterface.C.

References mesh.

◆ expire()

bool expire ( )
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 148 of file sampledInterface.C.

References sampledSurface::clearGeom().

Here is the call graph for this function:

◆ update()

bool update ( )
virtual

Update the surface as required.

Do nothing (and return false) if no update was needed

Implements sampledSurface.

Definition at line 168 of file sampledInterface.C.

◆ points()

virtual const pointField & points ( ) const
inlinevirtual

Points of surface.

Implements sampledSurface.

Definition at line 202 of file sampledInterface.H.

References PrimitivePatch< FaceList, PointField >::points(), and surface().

Referenced by sampleOnFaces().

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

◆ faces()

virtual const faceList & faces ( ) const
inlinevirtual

Faces of surface.

Implements sampledSurface.

Definition at line 210 of file sampledInterface.H.

References surface(), and MeshedSurface< Face >::surfFaces().

Here is the call graph for this function:

◆ zoneIds()

virtual const labelList & zoneIds ( ) const
inlinevirtual

Const access to per-face zone/region information.

Reimplemented from meshedSurf.

Definition at line 218 of file sampledInterface.H.

References List< label >::null().

Here is the call graph for this function:

◆ Sf()

virtual const vectorField & Sf ( ) const
inlinevirtual

Face area magnitudes.

Implements sampledSurface.

Definition at line 226 of file sampledInterface.H.

References MeshedSurface< Face >::Sf(), and surface().

Here is the call graph for this function:

◆ magSf()

virtual const scalarField & magSf ( ) const
inlinevirtual

Face area magnitudes.

Implements sampledSurface.

Definition at line 234 of file sampledInterface.H.

References MeshedSurface< Face >::magSf(), and surface().

Here is the call graph for this function:

◆ Cf()

virtual const vectorField & Cf ( ) const
inlinevirtual

Face centres.

Implements sampledSurface.

Definition at line 242 of file sampledInterface.H.

References MeshedSurface< Face >::Cf(), and surface().

Here is the call graph for this function:

◆ sample() [1/5]

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

Sample volume field onto surface faces.

Implements sampledSurface.

Definition at line 174 of file sampledInterface.C.

◆ sample() [2/5]

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

Sample volume field onto surface faces.

Implements sampledSurface.

Definition at line 183 of file sampledInterface.C.

◆ sample() [3/5]

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

Sample volume field onto surface faces.

Implements sampledSurface.

Definition at line 192 of file sampledInterface.C.

◆ sample() [4/5]

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

Sample volume field onto surface faces.

Implements sampledSurface.

Definition at line 201 of file sampledInterface.C.

◆ sample() [5/5]

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

Sample volume field onto surface faces.

Implements sampledSurface.

Definition at line 210 of file sampledInterface.C.

◆ interpolate() [1/5]

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

Interpolate volume field onto surface points.

Implements sampledSurface.

Definition at line 219 of file sampledInterface.C.

◆ interpolate() [2/5]

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

Interpolate volume field onto surface points.

Implements sampledSurface.

Definition at line 228 of file sampledInterface.C.

◆ interpolate() [3/5]

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

Interpolate volume field onto surface points.

Implements sampledSurface.

Definition at line 236 of file sampledInterface.C.

◆ interpolate() [4/5]

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

Interpolate volume field onto surface points.

Implements sampledSurface.

Definition at line 245 of file sampledInterface.C.

◆ interpolate() [5/5]

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

Interpolate volume field onto surface points.

Implements sampledSurface.

Definition at line 254 of file sampledInterface.C.

◆ print()

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

Print information.

Reimplemented from sampledSurface.

Definition at line 263 of file sampledInterface.C.

References name, and os().

Here is the call graph for this function:

◆ sampleOnFaces()

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

Definition at line 31 of file sampledInterfaceTemplates.C.

References points(), sampledSurface::sampleOnFaces(), and surface().

Here is the call graph for this function:

◆ sampleOnPoints()

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

Definition at line 50 of file sampledInterfaceTemplates.C.

References notImplemented.


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