FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

cellDistFuncs Class Reference

Collection of functions used in wall distance calculation. More...

#include <meshTools/cellDistFuncs.H>


Detailed Description

Collection of functions used in wall distance calculation.

Source files

Definition at line 62 of file cellDistFuncs.H.

Inheritance diagram for cellDistFuncs:
Collaboration diagram for cellDistFuncs:

List of all members.

Public Member Functions

 ClassName ("cellDistFuncs")
 cellDistFuncs (const polyMesh &mesh)
 Construct from mesh.
const polyMesh &  mesh () const
 Access mesh.
labelHashSet  getPatchIDs (const wordList &) const
 Get patchIDs of named patches.
template<class Type >
labelHashSet  getPatchIDs () const
 Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch')
scalar  smallestDist (const point &p, const polyPatch &patch, const label nWallFaces, const labelList &wallFaces, label &meshFaceI) const
 Calculate smallest true distance (and face index)
label  getPointNeighbours (const primitivePatch &, const label patchFaceI, labelList &) const
 Get faces sharing point with face on patch.
label  maxPatchSize (const labelHashSet &patchIDs) const
 Size of largest patch (out of supplied subset of patches)
label  sumPatchSize (const labelHashSet &patchIDs) const
 Sum of patch sizes (out of supplied subset of patches).
void  correctBoundaryFaceCells (const labelHashSet &patchIDs, scalarField &wallDistCorrected, Map< label > &nearestFace) const
 Correct all cells connected to boundary (via face). Sets values in.
void  correctBoundaryPointCells (const labelHashSet &patchIDs, scalarField &wallDistCorrected, Map< label > &nearestFace) const
 Correct all cells connected to wall (via point). Sets values in.

Constructor & Destructor Documentation

cellDistFuncs ( const polyMesh &   mesh  )

Construct from mesh.

Definition at line 65 of file cellDistFuncs.C.


Member Function Documentation

ClassName ( "cellDistFuncs"    )
const polyMesh& mesh (  ) const [inline]

Access mesh.

Definition at line 96 of file cellDistFuncs.H.

Referenced by wallDist::correct(), and cellDistFuncs::getPatchIDs().

Foam::labelHashSet getPatchIDs ( const wordList &   patchNames  ) const

Get patchIDs of named patches.

Definition at line 75 of file cellDistFuncs.C.

References polyMesh::boundaryMesh(), forAll, mesh, patchIdentifier::name(), PtrList< T >::size(), and List< T >::size().

Foam::labelHashSet getPatchIDs (  ) const

Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch')

Uses isA, not isType

Definition at line 34 of file cellDistFuncsTemplates.C.

References polyMesh::boundaryMesh(), forAll, cellDistFuncs::mesh(), and PtrList< T >::size().

Foam::scalar smallestDist ( const point &   p,
const polyPatch &   patch,
const label   nWallFaces,
const labelList &   wallFaces,
label &   meshFaceI  
) const

Calculate smallest true distance (and face index)

from pt to faces wallFaces. For efficiency reasons we still pass in patch instead of extracting it from mesh_

Definition at line 110 of file cellDistFuncs.C.

References PointHit< Point >::distance(), nWallFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), points, and polyPatch::start().

Foam::label maxPatchSize ( const labelHashSet &   patchIDs  ) const

Size of largest patch (out of supplied subset of patches)

Definition at line 255 of file cellDistFuncs.C.

References polyMesh::boundaryMesh(), forAll, HashTable< T, Key, Hash >::found(), Foam::max(), and mesh.

Foam::label sumPatchSize ( const labelHashSet &   patchIDs  ) const

Sum of patch sizes (out of supplied subset of patches).

Used in sizing arrays.

Definition at line 274 of file cellDistFuncs.C.

References polyMesh::boundaryMesh(), forAll, HashTable< T, Key, Hash >::found(), mesh, and Foam::sum().

void correctBoundaryFaceCells ( const labelHashSet &   patchIDs,
scalarField &   wallDistCorrected,
Map< label > &   nearestFace  
) const

Correct all cells connected to boundary (via face). Sets values in.

wallDistCorrected. Sets nearest wallface in nearestFace.

Definition at line 294 of file cellDistFuncs.C.

References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), polyMesh::faceOwner(), forAll, HashTable< T, Key, Hash >::found(), HashTable< T, Key, Hash >::insert(), mesh, and polyPatch::start().

void correctBoundaryPointCells ( const labelHashSet &   patchIDs,
scalarField &   wallDistCorrected,
Map< label > &   nearestFace  
) const

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