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

A sampledSurface on patches. Non-triangulated by default. More...

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

Public Member Functions

 TypeName ("sampledPatch")
 
 sampledPatch (const word &name, const polyMesh &mesh, const UList< wordRe > &patchNames, const bool triangulate=false)
 
 sampledPatch (const word &name, const polyMesh &mesh, const dictionary &dict)
 
virtual ~sampledPatch ()=default
 
virtual bool needsUpdate () const
 
virtual bool expire ()
 
virtual bool update ()
 
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 bool withSurfaceFields () const
 
virtual tmp< scalarFieldsample (const surfaceScalarField &) const
 
virtual tmp< vectorFieldsample (const surfaceVectorField &) const
 
virtual tmp< sphericalTensorFieldsample (const surfaceSphericalTensorField &) const
 
virtual tmp< symmTensorFieldsample (const surfaceSymmTensorField &) const
 
virtual tmp< tensorFieldsample (const surfaceTensorField &) 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 > > sampleOnFaces (const GeometricField< Type, fvsPatchField, surfaceMesh > &sField) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > sampleOnPoints (const interpolation< Type > &interpolator) const
 
- Public Member Functions inherited from MeshedSurface
 ClassName ("MeshedSurface")
 
 MeshedSurface ()
 
 MeshedSurface (const MeshedSurface &surf)
 
 MeshedSurface (const UnsortedMeshedSurface< Face > &surf)
 
 MeshedSurface (MeshedSurface &&surf)
 
 MeshedSurface (UnsortedMeshedSurface< Face > &&surf)
 
 MeshedSurface (const pointField &pointLst, const UList< Face > &faceLst, const UList< surfZone > &zoneLst)
 
 MeshedSurface (pointField &&pointLst, List< Face > &&faceLst, const UList< surfZone > &zoneLst)
 
 MeshedSurface (const pointField &pointLst, const UList< Face > &faceLst, const labelUList &zoneSizes=labelUList(), const UList< word > &zoneNames=UList< word >())
 
 MeshedSurface (pointField &&pointLst, List< Face > &&faceLst, const labelUList &zoneSizes=labelUList(), const UList< word > &zoneNames=UList< word >())
 
 MeshedSurface (const polyBoundaryMesh &bMesh, const bool globalPoints=false)
 
 MeshedSurface (const surfMesh &mesh)
 
 MeshedSurface (const fileName &name)
 
 MeshedSurface (const fileName &name, const word &fileType)
 
 MeshedSurface (Istream &is)
 
 MeshedSurface (const Time &runTime)
 
 MeshedSurface (const Time &runTime, const word &surfName)
 
 MeshedSurface (const IOobject &io, const dictionary &dict, const bool isGlobal=true)
 
 declareRunTimeSelectionTable (autoPtr, MeshedSurface, fileExtension,(const fileName &name),(name))
 
virtual ~MeshedSurface ()
 
 declareMemberFunctionSelectionTable (void, UnsortedMeshedSurface, write, fileExtension,(const fileName &name, const MeshedSurface< Face > &surf, IOstreamOption streamOpt, const dictionary &options),(name, surf, streamOpt, options))
 
label size () const
 
const List< Face > & surfFaces () const
 
const labelListfaceIds () const
 
const surfZoneListsurfZones () const
 
const vectorFieldSf () const
 
const scalarFieldmagSf () const
 
const vectorFieldCf () const
 
virtual void clear ()
 
virtual void addZones (const UList< surfZone > &, const bool cullEmpty=false)
 
virtual void addZones (const labelUList &sizes, const UList< word > &names, const bool cullEmpty=false)
 
virtual void addZones (const labelUList &sizes, const bool cullEmpty=false)
 
bool addZonesToFaces ()
 
virtual void removeZones ()
 
virtual void movePoints (const pointField &newPoints)
 
virtual void scalePoints (const scalar scaleFactor)
 
virtual void cleanup (const bool verbose)
 
virtual void compactPoints (labelList &pointMap=const_cast< labelList & >(labelList::null()))
 
virtual bool stitchFaces (const scalar tol=SMALL, const bool verbose=false)
 
virtual bool checkFaces (const bool verbose=false)
 
virtual label nTriangles () const
 
virtual label nTriangles (labelList &faceMap) const
 
virtual label triangulate ()
 
virtual label triangulate (labelList &faceMap)
 
template<class BoolListType >
void subsetMeshMap (const BoolListType &include, labelList &pointMap, labelList &faceMap) const
 
MeshedSurface subsetMesh (const UList< bool > &include, labelList &pointMap, labelList &faceMap) const
 
MeshedSurface subsetMesh (const bitSet &include, labelList &pointMap, labelList &faceMap) const
 
MeshedSurface subsetMesh (const UList< bool > &include) const
 
MeshedSurface subsetMesh (const bitSet &include) const
 
MeshedSurface subsetMesh (const wordRes &includeNames, const wordRes &excludeNames=wordRes()) const
 
void swap (MeshedSurface< Face > &surf)
 
void transfer (pointField &pointLst, List< Face > &faceLst)
 
void transfer (MeshedSurface< Face > &surf)
 
void transfer (UnsortedMeshedSurface< Face > &surf)
 
autoPtr< MeshedSurface< Face > > releaseGeom ()
 
void swapFaces (List< Face > &faces)
 
void swapPoints (pointField &points)
 
bool read (const fileName &name, const word &fileType)
 
virtual bool read (const fileName &name)
 
void writeStats (Ostream &os) const
 
virtual void write (const fileName &name, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const
 
virtual void write (const fileName &name, const word &fileType, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const
 
void write (const Time &runTime, const word &surfName=word::null) const
 
void operator= (const MeshedSurface< Face > &surf)
 
void operator= (MeshedSurface< Face > &&surf)
 
 operator MeshedSurfaceProxy< Face > () const
 
template<class Face >
 MeshedSurface ()
 
template<class Face >
 MeshedSurface (const MeshedSurface< Face > &surf)
 
template<class Face >
 MeshedSurface (const UnsortedMeshedSurface< Face > &surf)
 
template<class Face >
 MeshedSurface (MeshedSurface< Face > &&surf)
 
template<class Face >
 MeshedSurface (UnsortedMeshedSurface< Face > &&surf)
 
template<class Face >
 MeshedSurface (const pointField &pointLst, const UList< Face > &faceLst, const UList< surfZone > &zoneLst)
 
template<class Face >
 MeshedSurface (pointField &&pointLst, List< Face > &&faceLst, const UList< surfZone > &zoneLst)
 
template<class Face >
 MeshedSurface (const pointField &pointLst, const UList< Face > &faceLst, const labelUList &zoneSizes, const UList< word > &zoneNames)
 
template<class Face >
 MeshedSurface (pointField &&pointLst, List< Face > &&faceLst, const labelUList &zoneSizes, const UList< word > &zoneNames)
 
template<class Face >
 MeshedSurface (const surfMesh &mesh)
 
template<class Face >
 MeshedSurface (const polyBoundaryMesh &bMesh, const bool useGlobalPoints)
 
template<class Face >
 MeshedSurface (const fileName &name, const word &fileType)
 
template<class Face >
 MeshedSurface (const fileName &name)
 
template<class Face >
 MeshedSurface (Istream &is)
 
template<class Face >
 MeshedSurface (const Time &runTime)
 
template<class Face >
 MeshedSurface (const Time &runTime, const word &surfName)
 
template<class Face >
 MeshedSurface (const IOobject &io, const dictionary &dict, const bool isGlobal)
 
bool addZonesToFaces ()
 
bool addZonesToFaces ()
 
- 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 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

const wordRespatchNames () const
 
const labelListpatchIDs () const
 
const labelListpatchStart () const
 
const labelListpatchIndex () const
 
const labelListpatchFaceLabels () const
 
- Protected Member Functions inherited from MeshedSurface
void transcribe (MeshedSurface< face > &surf)
 
void checkZones (const bool verbose=true)
 
pointFieldstoredPoints ()
 
List< Face > & storedFaces ()
 
labelListstoredFaceIds ()
 
surfZoneListstoredZones ()
 
void sortFacesAndStore (DynamicList< Face > &unsortedFaces, DynamicList< label > &zoneIds, DynamicList< label > &elemIds, bool sorted)
 
void transcribe (MeshedSurface< face > &surf)
 
void transcribe (MeshedSurface< face > &surf)
 
void transcribe (MeshedSurface< face > &surf)
 
- Protected Member Functions inherited from sampledSurface
virtual void clearGeom () const
 
 sampledSurface (const word &name, std::nullptr_t)
 

Additional Inherited Members

- Public Types inherited from MeshedSurface
typedef Face face_type
 
typedef point point_type
 
- Static Public Member Functions inherited from MeshedSurface
static wordHashSet readTypes ()
 
static wordHashSet writeTypes ()
 
static bool canReadType (const word &fileType, bool verbose=false)
 
static bool canWriteType (const word &fileType, bool verbose=false)
 
static bool canRead (const fileName &name, bool verbose=false)
 
static autoPtr< MeshedSurfaceNew (const fileName &name, const word &fileType, bool mandatory=true)
 
static autoPtr< MeshedSurfaceNew (const fileName &name)
 
static void write (const fileName &name, const MeshedSurface< Face > &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null)
 
static void write (const fileName &name, const word &fileType, const MeshedSurface< Face > &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null)
 
- 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 on patches. Non-triangulated by default.

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

Usage
Example of function object partial specification:
surfaces
{
    surface1
    {
        type    patch;
        patches (inlet "outlet.*");
    }
}

Where the sub-entries comprise:

Property Description Required Default
type patch yes
patches patch selection as word/regex list yes
triangulate triangulate faces no false
Source files

Definition at line 91 of file sampledPatch.H.

Constructor & Destructor Documentation

◆ sampledPatch() [1/2]

sampledPatch ( const word name,
const polyMesh mesh,
const UList< wordRe > &  patchNames,
const bool  triangulate = false 
)

Definition at line 44 of file sampledPatch.C.

◆ sampledPatch() [2/2]

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

Definition at line 59 of file sampledPatch.C.

◆ ~sampledPatch()

virtual ~sampledPatch ( )
virtualdefault

Member Function Documentation

◆ patchNames()

const wordRes& patchNames ( ) const
inlineprotected

Definition at line 155 of file sampledPatch.H.

Referenced by sampledPatchInternalField::print().

Here is the caller graph for this function:

◆ patchIDs()

const Foam::labelList & patchIDs ( ) const
protected

◆ patchStart()

const labelList& patchStart ( ) const
inlineprotected

Definition at line 164 of file sampledPatch.H.

◆ patchIndex()

const labelList& patchIndex ( ) const
inlineprotected

Definition at line 170 of file sampledPatch.H.

◆ patchFaceLabels()

const labelList& patchFaceLabels ( ) const
inlineprotected

Definition at line 176 of file sampledPatch.H.

◆ TypeName()

TypeName ( "sampledPatch"  )

◆ needsUpdate()

bool needsUpdate ( ) const
virtual

Implements sampledSurface.

Definition at line 139 of file sampledPatch.C.

◆ expire()

bool expire ( )
virtual

Implements sampledSurface.

Definition at line 145 of file sampledPatch.C.

References clear(), and sampledSurface::clearGeom().

Here is the call graph for this function:

◆ update()

bool update ( )
virtual

◆ points()

virtual const pointField& points ( ) const
inlinevirtual

Implements sampledSurface.

Definition at line 228 of file sampledPatch.H.

References points.

Referenced by sampledPatchInternalField::print().

Here is the caller graph for this function:

◆ faces()

virtual const faceList& faces ( ) const
inlinevirtual

Implements sampledSurface.

Definition at line 234 of file sampledPatch.H.

References MeshedSurface::surfFaces().

Referenced by sampledPatchInternalField::print().

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

◆ zoneIds()

virtual const labelList& zoneIds ( ) const
inlinevirtual

Reimplemented from meshedSurf.

Definition at line 240 of file sampledPatch.H.

References List::null().

Here is the call graph for this function:

◆ Sf()

virtual const vectorField& Sf ( ) const
inlinevirtual

Implements sampledSurface.

Definition at line 246 of file sampledPatch.H.

References MeshedSurface::Sf().

Here is the call graph for this function:

◆ magSf()

virtual const scalarField& magSf ( ) const
inlinevirtual

Implements sampledSurface.

Definition at line 252 of file sampledPatch.H.

References MeshedSurface::magSf().

Here is the call graph for this function:

◆ Cf()

virtual const vectorField& Cf ( ) const
inlinevirtual

Implements sampledSurface.

Definition at line 258 of file sampledPatch.H.

References MeshedSurface::Cf().

Here is the call graph for this function:

◆ sample() [1/10]

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

Implements sampledSurface.

Reimplemented in sampledPatchInternalField.

Definition at line 270 of file sampledPatch.C.

◆ sample() [2/10]

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

Implements sampledSurface.

Reimplemented in sampledPatchInternalField.

Definition at line 279 of file sampledPatch.C.

◆ sample() [3/10]

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

Implements sampledSurface.

Reimplemented in sampledPatchInternalField.

Definition at line 288 of file sampledPatch.C.

◆ sample() [4/10]

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

Implements sampledSurface.

Reimplemented in sampledPatchInternalField.

Definition at line 297 of file sampledPatch.C.

◆ sample() [5/10]

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

Implements sampledSurface.

Reimplemented in sampledPatchInternalField.

Definition at line 306 of file sampledPatch.C.

◆ withSurfaceFields()

bool withSurfaceFields ( ) const
virtual

Reimplemented from sampledSurface.

Definition at line 314 of file sampledPatch.C.

◆ sample() [6/10]

Foam::tmp< Foam::tensorField > sample ( const surfaceScalarField sField) const
virtual

Reimplemented from sampledSurface.

Definition at line 321 of file sampledPatch.C.

◆ sample() [7/10]

virtual tmp<vectorField> sample ( const surfaceVectorField ) const
virtual

Reimplemented from sampledSurface.

◆ sample() [8/10]

virtual tmp<sphericalTensorField> sample ( const surfaceSphericalTensorField ) const
virtual

Reimplemented from sampledSurface.

◆ sample() [9/10]

virtual tmp<symmTensorField> sample ( const surfaceSymmTensorField ) const
virtual

Reimplemented from sampledSurface.

◆ sample() [10/10]

virtual tmp<tensorField> sample ( const surfaceTensorField ) const
virtual

Reimplemented from sampledSurface.

◆ interpolate() [1/5]

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

Implements sampledSurface.

Reimplemented in sampledPatchInternalField.

Definition at line 366 of file sampledPatch.C.

◆ interpolate() [2/5]

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

Implements sampledSurface.

Reimplemented in sampledPatchInternalField.

Definition at line 375 of file sampledPatch.C.

◆ interpolate() [3/5]

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

Implements sampledSurface.

Reimplemented in sampledPatchInternalField.

Definition at line 384 of file sampledPatch.C.

◆ interpolate() [4/5]

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

Implements sampledSurface.

Reimplemented in sampledPatchInternalField.

Definition at line 393 of file sampledPatch.C.

◆ interpolate() [5/5]

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

Implements sampledSurface.

Reimplemented in sampledPatchInternalField.

Definition at line 402 of file sampledPatch.C.

◆ print()

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

Reimplemented from sampledSurface.

Reimplemented in sampledPatchInternalField.

Definition at line 410 of file sampledPatch.C.

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

Here is the call graph for this function:

◆ sampleOnFaces() [1/2]

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

Definition at line 29 of file sampledPatchTemplates.C.

References forAll, Foam::New(), interpolation::psi(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ sampleOnFaces() [2/2]

Foam::tmp<Foam::Field<Type> > sampleOnFaces ( const GeometricField< Type, fvsPatchField, surfaceMesh > &  sField) const

Definition at line 54 of file sampledPatchTemplates.C.

References GeometricField::boundaryField(), forAll, Foam::New(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ sampleOnPoints()

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

Definition at line 77 of file sampledPatchTemplates.C.

References f(), forAll, interpolation::interpolate(), mesh, Foam::New(), points, bitSet::set(), polyPatch::start(), and Foam::HashTableOps::values().

Here is the call graph for this function:

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