A patch is a list of labels that address the faces in the global face list. More...
#include <OpenFOAM/polyPatch.H>
A patch is a list of labels that address the faces in the global face list.
The patch can calculate its own edges based on the global faces. Patch also contains all addressing between the faces.
Definition at line 66 of file polyPatch.H.
Public Member Functions | |
TypeName ("patch") | |
Runtime type information.
| |
declareRunTimeSelectionTable (autoPtr, polyPatch, word,(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm),(name, size, start, index, bm)) | |
declareRunTimeSelectionTable (autoPtr, polyPatch, dictionary,(const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm),(name, dict, index, bm)) | |
polyPatch (const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm) | |
Construct from components.
| |
polyPatch (const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm) | |
Construct from dictionary.
| |
polyPatch (const polyPatch &, const polyBoundaryMesh &) | |
Construct as copy, resetting the boundary mesh.
| |
polyPatch (const polyPatch &pp, const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart) | |
Construct given the original patch and resetting the.
| |
polyPatch (const polyPatch &) | |
Construct as copy.
| |
virtual autoPtr< polyPatch > | clone (const polyBoundaryMesh &bm) const |
Construct and return a clone, resetting the boundary mesh.
| |
virtual autoPtr< polyPatch > | clone (const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart) const |
Construct and return a clone, resetting the face list.
| |
virtual | ~polyPatch () |
label | start () const |
Return start label of this patch in the polyMesh face list.
| |
const polyBoundaryMesh & | boundaryMesh () const |
Return boundaryMesh reference.
| |
virtual bool | coupled () const |
Return true if this patch field is coupled.
| |
template<class T > | |
const List< T >::subList | patchSlice (const List< T > &l) const |
Slice list to patch.
| |
template<class T > | |
const Field< T >::subField | patchSlice (const Field< T > &l) const |
Slice Field to patch.
| |
virtual void | write (Ostream &) const |
Write the polyPatch data as a dictionary.
| |
const vectorField::subField | faceCentres () const |
Return face centres.
| |
const vectorField::subField | faceAreas () const |
Return face normals.
| |
tmp< vectorField > | faceCellCentres () const |
Return face neighbour cell centres.
| |
const unallocLabelList & | faceCells () const |
Return face-cell addressing.
| |
const labelList & | meshEdges () const |
Return global edge index for local edges.
| |
void | clearAddressing () |
Clear addressing.
| |
label | whichFace (const label l) const |
Return label of face in patch from global face label.
| |
virtual void | initOrder (const primitivePatch &) const |
Initialize ordering for primitivePatch. Does not.
| |
virtual bool | order (const primitivePatch &, labelList &faceMap, labelList &rotation) const |
Return new ordering for primitivePatch.
| |
void | operator= (const polyPatch &) |
Assignment.
| |
Static Public Member Functions | |
static autoPtr< polyPatch > | New (const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm) |
Return a pointer to a new patch created on freestore from.
| |
static autoPtr< polyPatch > | New (const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm) |
Return a pointer to a new patch created on freestore from.
| |
static bool | constraintType (const word &pt) |
Return true if the given type is a constraint type.
| |
static wordList | constraintTypes () |
Return a list of all the constraint patch types.
| |
Static Public Attributes | |
static int | disallowGenericPolyPatch |
Debug switch to disallow the use of genericPolyPatch.
| |
Protected Member Functions | |
virtual void | initGeometry () |
Initialise the calculation of the patch geometry.
| |
virtual void | calcGeometry () |
Calculate the patch geometry.
| |
virtual void | initMovePoints (const pointField &) |
Initialise the patches for moving points.
| |
virtual void | movePoints (const pointField &p) |
Correct patches after moving points.
| |
virtual void | initUpdateMesh () |
Initialise the update of the patch topology.
| |
virtual void | updateMesh () |
Update of the patch topology.
| |
Friends | |
class | polyBoundaryMesh |
Ostream & | operator<< (Ostream &, const polyPatch &) |
polyPatch | ( | const word & | name, |
const label | size, | ||
const label | start, | ||
const label | index, | ||
const polyBoundaryMesh & | bm | ||
) |
Construct from components.
Definition at line 71 of file polyPatch.C.
Referenced by polyPatch::clone().
polyPatch | ( | const word & | name, |
const dictionary & | dict, | ||
const label | index, | ||
const polyBoundaryMesh & | bm | ||
) |
Construct from dictionary.
Definition at line 93 of file polyPatch.C.
polyPatch | ( | const polyPatch & | pp, |
const polyBoundaryMesh & | bm | ||
) |
Construct as copy, resetting the boundary mesh.
Definition at line 119 of file polyPatch.C.
polyPatch | ( | const polyPatch & | pp, |
const polyBoundaryMesh & | bm, | ||
const label | index, | ||
const label | newSize, | ||
const label | newStart | ||
) |
Construct given the original patch and resetting the.
face list and boundary mesh information
Definition at line 143 of file polyPatch.C.
Construct as copy.
Definition at line 169 of file polyPatch.C.
~polyPatch | ( | ) | [virtual]
|
Definition at line 182 of file polyPatch.C.
virtual void initGeometry | ( | ) | [inline, protected, virtual]
|
Initialise the calculation of the patch geometry.
Reimplemented in directMappedPolyPatch, directMappedWallPolyPatch, coupledPolyPatch, cyclicPolyPatch, and processorPolyPatch.
Definition at line 103 of file polyPatch.H.
Referenced by cyclicPolyPatch::initGeometry(), directMappedWallPolyPatch::initGeometry(), and directMappedPolyPatch::initGeometry().
virtual void calcGeometry | ( | ) | [inline, protected, virtual]
|
Calculate the patch geometry.
Reimplemented in directMappedPolyPatch, directMappedWallPolyPatch, coupledPolyPatch, cyclicPolyPatch, and processorPolyPatch.
Definition at line 107 of file polyPatch.H.
Referenced by cyclicPolyPatch::calcGeometry(), directMappedWallPolyPatch::calcGeometry(), and directMappedPolyPatch::calcGeometry().
virtual void initMovePoints | ( | const pointField & | ) | [inline, protected, virtual]
|
Initialise the patches for moving points.
Reimplemented in directMappedPolyPatch, directMappedWallPolyPatch, coupledPolyPatch, cyclicPolyPatch, and processorPolyPatch.
Definition at line 111 of file polyPatch.H.
Referenced by cyclicPolyPatch::initMovePoints(), directMappedWallPolyPatch::initMovePoints(), and directMappedPolyPatch::initMovePoints().
void movePoints | ( | const pointField & | p ) | [protected, virtual]
|
Correct patches after moving points.
Reimplemented in directMappedPolyPatch, directMappedWallPolyPatch, coupledPolyPatch, cyclicPolyPatch, and processorPolyPatch.
Definition at line 57 of file polyPatch.C.
Referenced by processorPolyPatch::initMovePoints(), cyclicPolyPatch::movePoints(), directMappedWallPolyPatch::movePoints(), and directMappedPolyPatch::movePoints().
virtual void initUpdateMesh | ( | ) | [inline, protected, virtual]
|
Initialise the update of the patch topology.
Reimplemented in directMappedPolyPatch, directMappedWallPolyPatch, coupledPolyPatch, cyclicPolyPatch, and processorPolyPatch.
Definition at line 118 of file polyPatch.H.
Referenced by processorPolyPatch::initUpdateMesh(), cyclicPolyPatch::initUpdateMesh(), directMappedWallPolyPatch::initUpdateMesh(), and directMappedPolyPatch::initUpdateMesh().
void updateMesh | ( | ) | [protected, virtual]
|
Update of the patch topology.
Reimplemented in directMappedPolyPatch, directMappedWallPolyPatch, coupledPolyPatch, cyclicPolyPatch, and processorPolyPatch.
Definition at line 62 of file polyPatch.C.
Referenced by processorPolyPatch::updateMesh(), cyclicPolyPatch::updateMesh(), directMappedWallPolyPatch::updateMesh(), and directMappedPolyPatch::updateMesh().
TypeName | ( | "patch" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
polyPatch | , | ||
word | , | ||
(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm) | , | ||
(name, size, start, index, bm) | |||
) |
declareRunTimeSelectionTable | ( | autoPtr | , |
polyPatch | , | ||
dictionary | , | ||
(const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm) | , | ||
(name, dict, index, bm) | |||
) |
virtual autoPtr<polyPatch> clone | ( | const polyBoundaryMesh & | bm ) | const [inline, virtual]
|
Construct and return a clone, resetting the boundary mesh.
Reimplemented in directMappedPolyPatch, directMappedWallPolyPatch, genericPolyPatch, cyclicPolyPatch, emptyPolyPatch, processorPolyPatch, symmetryPolyPatch, wedgePolyPatch, and wallPolyPatch.
Definition at line 205 of file polyPatch.H.
References polyPatch::polyPatch().
Referenced by boundaryMesh::patchify().
virtual autoPtr<polyPatch> clone | ( | const polyBoundaryMesh & | bm, |
const label | index, | ||
const label | newSize, | ||
const label | newStart | ||
) | const [inline, virtual]
|
Construct and return a clone, resetting the face list.
and boundary mesh
Reimplemented in directMappedPolyPatch, directMappedWallPolyPatch, genericPolyPatch, cyclicPolyPatch, emptyPolyPatch, processorPolyPatch, symmetryPolyPatch, wedgePolyPatch, and wallPolyPatch.
Definition at line 213 of file polyPatch.H.
References polyPatch::polyPatch().
Foam::autoPtr< Foam::polyPatch > New | ( | const word & | patchType, |
const word & | name, | ||
const label | size, | ||
const label | start, | ||
const label | index, | ||
const polyBoundaryMesh & | bm | ||
) | [static]
|
Return a pointer to a new patch created on freestore from.
components
Definition at line 32 of file newPolyPatch.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::Info, and name().
Referenced by meshRefinement::addPatch(), boundaryMesh::patchify(), polyBoundaryMesh::polyBoundaryMesh(), and polyMesh::polyMesh().
Foam::autoPtr< Foam::polyPatch > New | ( | const word & | name, |
const dictionary & | dict, | ||
const label | index, | ||
const polyBoundaryMesh & | bm | ||
) | [static]
|
Return a pointer to a new patch created on freestore from.
dictionary
Definition at line 70 of file newPolyPatch.C.
References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, Foam::Info, dictionary::lookup(), name(), and dictionary::readIfPresent().
label start | ( | ) | const [inline]
|
Return start label of this patch in the polyMesh face list.
Definition at line 260 of file polyPatch.H.
Referenced by polyTopoChange::addMesh(), meshRefinement::addPatch(), cellToFaceStencil::allCoupledFacesPatch(), cellToCellStencil::allCoupledFacesPatch(), cellToFaceStencil::calcFaceStencil(), polyDualMesh::calcFeatures(), parMetisDecomp::calcMetisDistributedCSR(), hexRef8::checkMesh(), inversePointDistanceDiffusivity::correct(), inverseFaceDistanceDiffusivity::correct(), Particle< ParticleType >::correctAfterParallelTransfer(), cellDistFuncs::correctBoundaryFaceCells(), parMetisDecomp::decompose(), ensightPartFaces::ensightPartFaces(), faceCoupleInfo::faceLabels(), removeCells::getExposedFaces(), syncTools::getMasterFaces(), combineFaces::getMergeSets(), FreeStream< CloudType >::inflow(), fvMeshSubset::interpolate(), isoSurface::isoSurface(), isoSurfaceCell::isoSurfaceCell(), meshRefinement::makePatch(), meshRefinement::mergePatchFaces(), octreeDataFace::octreeDataFace(), boundaryMesh::patchify(), fvPatch::patchSlice(), fvMeshDistribute::printMeshInfo(), boundaryMesh::read(), dynamicRefineFvMesh::refine(), autoSnapDriver::repatchToSurface(), fvMeshSubset::setLargeCellSubset(), removeFaces::setRefinement(), removeCells::setRefinement(), perfectInterface::setRefinement(), cellDistFuncs::smallestDist(), faceSet::sync(), syncTools::syncBoundaryFaceList(), syncTools::syncFaceList(), meshRefinement::testSyncBoundaryFaceList(), cyclicPolyPatch::transformGlobalFace(), triSurfaceTools::triangulateFaceCentre(), directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), directMappedFixedValueFvPatchField< Type >::updateCoeffs(), cellToFaceStencil::validBoundaryFaces(), cellToCellStencil::validBoundaryFaces(), wallLayerCells::wallLayerCells(), extendedUpwindCellToFaceStencil::weightedSum(), extendedCellToFaceStencil::weightedSum(), polyBoundaryMesh::whichPatch(), and meshRefinement::zonify().
const Foam::polyBoundaryMesh & boundaryMesh | ( | ) | const |
Return boundaryMesh reference.
Definition at line 222 of file polyPatch.C.
Referenced by outletMappedUniformInletFvPatchField< Type >::updateCoeffs().
virtual bool coupled | ( | ) | const [inline, virtual]
|
Return true if this patch field is coupled.
Reimplemented in coupledPolyPatch.
Definition at line 269 of file polyPatch.H.
Referenced by cellToFaceStencil::allCoupledFacesPatch(), cellToCellStencil::allCoupledFacesPatch(), cellToFaceStencil::calcFaceStencil(), parMetisDecomp::calcMetisDistributedCSR(), hexRef8::checkMesh(), fvPatch::coupled(), parMetisDecomp::decompose(), removeCells::getExposedFaces(), combineFaces::getMergeSets(), isoSurfaceCell::isoSurfaceCell(), meshRefinement::mergePatchFaces(), motionSmoother::setDisplacement(), removeCells::setRefinement(), cellToFaceStencil::validBoundaryFaces(), cellToCellStencil::validBoundaryFaces(), and meshRefinement::zonify().
bool constraintType | ( | const word & | pt ) | [static]
|
Return true if the given type is a constraint type.
Definition at line 190 of file polyPatch.C.
Foam::wordList constraintTypes | ( | ) | [static]
|
Return a list of all the constraint patch types.
Definition at line 196 of file polyPatch.C.
References List< T >::setSize().
Slice list to patch.
Definition at line 282 of file polyPatch.H.
Referenced by isoSurface::isoSurface().
Slice Field to patch.
Definition at line 289 of file polyPatch.H.
void write | ( | Ostream & | os ) | const [virtual]
|
Write the polyPatch data as a dictionary.
Reimplemented from patchIdentifier.
Reimplemented in directMappedPolyPatch, directMappedWallPolyPatch, genericPolyPatch, cyclicPolyPatch, and processorPolyPatch.
Definition at line 300 of file polyPatch.C.
References token::END_STATEMENT, Foam::nl, Foam::type(), patchIdentifier::write(), and Ostream::writeKeyword().
Referenced by Foam::operator<<(), processorPolyPatch::write(), cyclicPolyPatch::write(), directMappedWallPolyPatch::write(), and directMappedPolyPatch::write().
const Foam::vectorField::subField faceCentres | ( | ) | const |
Return face centres.
Reimplemented from PrimitivePatch< Face, FaceList, PointField, PointType >.
Definition at line 228 of file polyPatch.C.
References mesh.
Referenced by inverseFaceDistanceDiffusivity::correct(), FreeStream< CloudType >::inflow(), and movingWallVelocityFvPatchVectorField::updateCoeffs().
const Foam::vectorField::subField faceAreas | ( | ) | const |
Return face normals.
Definition at line 234 of file polyPatch.C.
References mesh.
Referenced by StandardWallInteraction< CloudType >::correct(), Rebound< CloudType >::correct(), LocalInteraction< CloudType >::correct(), SpecularReflection< CloudType >::correct(), MixedDiffuseSpecular< CloudType >::correct(), MaxwellianThermal< CloudType >::correct(), Particle< ParticleType >::hitSymmetryPatch(), solidParticle::hitWallPatch(), molecule::hitWallPatch(), DsmcParcel< ParcelType >::hitWallPatch(), Particle< ParticleType >::hitWedgePatch(), FreeStream< CloudType >::inflow(), and dsmcFields::write().
Foam::tmp< Foam::vectorField > faceCellCentres | ( | ) | const |
const Foam::unallocLabelList & faceCells | ( | ) | const |
Return face-cell addressing.
Definition at line 260 of file polyPatch.C.
References mesh.
Referenced by Particle< ParticleType >::correctAfterParallelTransfer(), autoLayerDriver::doLayers(), fvPatch::faceCells(), and PatchInjection< CloudType >::PatchInjection().
const Foam::labelList & meshEdges | ( | ) | const |
Return global edge index for local edges.
Definition at line 274 of file polyPatch.C.
References mesh, and PrimitivePatch< Face, FaceList, PointField, PointType >::meshEdges().
Referenced by syncTools::getMasterEdges(), and syncTools::syncEdgeList().
void clearAddressing | ( | ) |
Clear addressing.
Definition at line 293 of file polyPatch.C.
References Foam::deleteDemandDrivenData().
label whichFace | ( | const label | l ) | const [inline]
|
Return label of face in patch from global face label.
Definition at line 326 of file polyPatch.H.
Referenced by StandardWallInteraction< CloudType >::correct(), Rebound< CloudType >::correct(), LocalInteraction< CloudType >::correct(), SpecularReflection< CloudType >::correct(), MixedDiffuseSpecular< CloudType >::correct(), MaxwellianThermal< CloudType >::correct(), Particle< ParticleType >::hitCyclicPatch(), Particle< ParticleType >::hitSymmetryPatch(), solidParticle::hitWallPatch(), molecule::hitWallPatch(), DsmcParcel< ParcelType >::hitWallPatch(), and Particle< ParticleType >::hitWedgePatch().
void initOrder | ( | const primitivePatch & | ) | const [virtual]
|
Initialize ordering for primitivePatch. Does not.
refer to *this (except for name() and type() etc.)
Reimplemented in coupledPolyPatch, cyclicPolyPatch, and processorPolyPatch.
Definition at line 309 of file polyPatch.C.
bool order | ( | const primitivePatch & | , |
labelList & | faceMap, | ||
labelList & | rotation | ||
) | const [virtual]
|
Return new ordering for primitivePatch.
Ordering is -faceMap: for every face index of the new face -rotation:for every new face the clockwise shift of the original face. Return false if nothing changes (faceMap is identity, rotation is 0), true otherwise.
Reimplemented in coupledPolyPatch, cyclicPolyPatch, and processorPolyPatch.
Definition at line 314 of file polyPatch.C.
void operator= | ( | const polyPatch & | p ) |
Assignment.
Definition at line 327 of file polyPatch.C.
References PrimitivePatch< Face, FaceList, PointField, PointType >::operator=().
friend class polyBoundaryMesh [friend]
|
Definition at line 100 of file polyPatch.H.
int disallowGenericPolyPatch [static]
|
Debug switch to disallow the use of genericPolyPatch.
Definition at line 131 of file polyPatch.H.