Public Types | Public Member Functions | List of all members
PrimitivePatch< FaceList, PointField > Class Template Reference

A list of faces which address into the list of points. More...

Inheritance diagram for PrimitivePatch< FaceList, PointField >:
Inheritance graph
[legend]
Collaboration diagram for PrimitivePatch< FaceList, PointField >:
Collaboration graph
[legend]

Public Types

enum  surfaceTopo { MANIFOLD, OPEN, ILLEGAL }
 
typedef std::remove_reference< FaceList >::type::value_type face_type
 
typedef std::remove_reference< PointField >::type::value_type point_type
 
typedef FaceList FaceListType
 
typedef PointField PointFieldType
 
typedef face_type FaceType
 

Public Member Functions

 PrimitivePatch (const FaceList &faces, const PointField &points)
 
 PrimitivePatch (FaceList &&faces, const PointField &points)
 
 PrimitivePatch (FaceList &faces, PointField &points, const bool reuse)
 
 PrimitivePatch (const PrimitivePatch< FaceList, PointField > &pp)
 
virtual ~PrimitivePatch ()
 
void clearOut ()
 
void clearGeom ()
 
void clearTopology ()
 
void clearPatchMeshAddr ()
 
void swap (PrimitivePatch &)=delete
 
const Field< point_type > & points () const noexcept
 
label nFaces () const noexcept
 
label nPoints () const
 
label nEdges () const
 
const edgeListedges () const
 
const edgeList::subList internalEdges () const
 
const edgeList::subList boundaryEdges () const
 
label nInternalEdges () const
 
label nBoundaryEdges () const
 
bool isInternalEdge (const label edgei) const
 
const labelListboundaryPoints () const
 
const labelListListfaceFaces () const
 
const labelListListedgeFaces () const
 
const labelListListfaceEdges () const
 
const labelListListpointEdges () const
 
const labelListListpointFaces () const
 
const List< face_type > & localFaces () const
 
labelList boundaryFaces () const
 
labelList uniqBoundaryFaces () const
 
const labelListmeshPoints () const
 
const Map< label > & meshPointMap () const
 
const Field< point_type > & localPoints () const
 
const labelListlocalPointOrder () const
 
label whichPoint (const label gp) const
 
edge meshEdge (const label edgei) const
 
edge meshEdge (const edge &e) const
 
label findEdge (const edge &e) const
 
labelList meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
 
labelList meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const
 
label meshEdge (const label edgei, const edgeList &allEdges, const labelListList &pointEdges) const
 
labelList meshEdges (const labelUList &edgeLabels, const edgeList &allEdges, const labelListList &pointEdges) const
 
const Field< point_type > & faceCentres () const
 
const Field< point_type > & faceAreas () const
 
const Field< scalar > & magFaceAreas () const
 
const Field< point_type > & faceNormals () const
 
const Field< point_type > & pointNormals () const
 
bool hasFaceAreas () const
 
bool hasFaceCentres () const
 
bool hasFaceNormals () const
 
bool hasPointNormals () const
 
bool hasBoundaryPoints () const
 
bool hasFaceFaces () const
 
bool hasEdgeFaces () const
 
bool hasFaceEdges () const
 
bool hasPointEdges () const
 
bool hasPointFaces () const
 
bool hasMeshPointMap () const
 
template<class ToPatch >
List< objectHitprojectPoints (const ToPatch &targetPatch, const Field< point_type > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 
template<class ToPatch >
List< objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point_type > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 
const labelListListedgeLoops () const
 
surfaceTopo surfaceType () const
 
bool checkTopology (const bool report=false, labelHashSet *setPtr=nullptr) const
 
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=nullptr) const
 
virtual void movePoints (const Field< point_type > &)
 
void operator= (const PrimitivePatch< FaceList, PointField > &rhs)
 
void operator= (PrimitivePatch< FaceList, PointField > &&rhs)
 
label whichEdge (const edge &e) const
 
template<class ToPatch >
Foam::List< Foam::objectHitprojectPoints (const ToPatch &targetPatch, const Field< typename Foam::PrimitivePatch< FaceList, PointField >::point_type > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
template<class ToPatch >
Foam::List< Foam::objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< typename Foam::PrimitivePatch< FaceList, PointField >::point_type > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
- Public Member Functions inherited from PrimitivePatchBase
 ClassName ("PrimitivePatch")
 
 PrimitivePatchBase ()=default
 

Detailed Description

template<class FaceList, class PointField>
class Foam::PrimitivePatch< FaceList, PointField >

A list of faces which address into the list of points.

The class is templated on the face type (e.g. triangle, polygon etc.) and on the list type of faces and points so that it can refer to existing lists using UList and const pointField& or hold the storage using List and pointField.

Source files

Definition at line 75 of file PrimitivePatch.H.

Member Typedef Documentation

◆ face_type

typedef std::remove_reference<FaceList>::type::value_type face_type

Definition at line 86 of file PrimitivePatch.H.

◆ point_type

typedef std::remove_reference<PointField>::type::value_type point_type

Definition at line 90 of file PrimitivePatch.H.

◆ FaceListType

typedef FaceList FaceListType

Definition at line 93 of file PrimitivePatch.H.

◆ PointFieldType

typedef PointField PointFieldType

Definition at line 96 of file PrimitivePatch.H.

◆ FaceType

Definition at line 100 of file PrimitivePatch.H.

Member Enumeration Documentation

◆ surfaceTopo

Enumerator
MANIFOLD 
OPEN 
ILLEGAL 

Definition at line 106 of file PrimitivePatch.H.

Constructor & Destructor Documentation

◆ PrimitivePatch() [1/4]

PrimitivePatch ( const FaceList &  faces,
const PointField &  points 
)

Definition at line 28 of file PrimitivePatch.C.

◆ PrimitivePatch() [2/4]

PrimitivePatch ( FaceList &&  faces,
const PointField &  points 
)

Definition at line 59 of file PrimitivePatch.C.

◆ PrimitivePatch() [3/4]

PrimitivePatch ( FaceList &  faces,
PointField &  points,
const bool  reuse 
)

Definition at line 90 of file PrimitivePatch.C.

◆ PrimitivePatch() [4/4]

PrimitivePatch ( const PrimitivePatch< FaceList, PointField > &  pp)

Definition at line 122 of file PrimitivePatch.C.

◆ ~PrimitivePatch()

virtual ~PrimitivePatch ( )
virtual

Member Function Documentation

◆ clearOut()

void clearOut

Definition at line 78 of file PrimitivePatchClear.C.

Referenced by processorPolyPatch::updateMesh().

Here is the caller graph for this function:

◆ clearGeom()

void clearGeom

Definition at line 28 of file PrimitivePatchClear.C.

Referenced by polyPatch::clearGeom(), and polyPatch::updateMesh().

Here is the caller graph for this function:

◆ clearTopology()

void clearTopology

Definition at line 43 of file PrimitivePatchClear.C.

Referenced by polyPatch::clearAddressing().

Here is the caller graph for this function:

◆ clearPatchMeshAddr()

void clearPatchMeshAddr

Definition at line 66 of file PrimitivePatchClear.C.

Referenced by polyPatch::clearAddressing().

Here is the caller graph for this function:

◆ swap()

void swap ( PrimitivePatch< FaceList, PointField > &  )
delete

◆ points()

const Field<point_type>& points ( ) const
inlinenoexcept

Definition at line 295 of file PrimitivePatch.H.

Referenced by booleanSurface::booleanSurface(), Foam::meshTools::calcBoxPointNormals(), addPatchCellLayer::calcExtrudeInfo(), cyclicPolyPatch::calcTransforms(), cyclicAMIPolyPatch::calcTransforms(), AMIInterpolation::calculate(), triSurfaceTools::curvatures(), distributedTriSurfaceMesh::distribute(), Foam::drawHitProblem(), edgeIntersections::edgeIntersections(), Foam::edgeMeshTools::featureProximity(), patchProbes::findElements(), mappedPatchBase::findLocalSamples(), processorPolyPatch::initOrder(), cyclicPolyPatch::initOrder(), trackingInverseDistance::markBoundaries(), inverseDistance::markBoundaries(), momentOfInertia::massPropertiesPatch(), momentOfInertia::massPropertiesShell(), momentOfInertia::massPropertiesSolid(), offsetSurface::operator()(), triSurface::operator=(), oldCyclicPolyPatch::order(), processorPolyPatch::order(), cyclicPolyPatch::order(), orientedSurface::orientedSurface(), powerLawLopesdaCostaZone::powerLawLopesdaCostaZone(), boundaryMesh::read(), refinementSurfaces::setMinLevelFields(), addPatchCellLayer::setRefinement(), AMIInterpolation::srcPointFace(), MeshedSurface< Foam::face >::storedPoints(), triSurfaceTools::surfaceNormal(), triSurfaceTools::surfaceSide(), AMIInterpolation::tgtPointFace(), triSurfaceSearch::tree(), triSurfaceMeshPointSet::triSurfaceMeshPointSet(), triSurfaceTools::validTri(), triSurfaceTools::vertexNormals(), and triSurfaceTools::vertexTriads().

Here is the caller graph for this function:

◆ nFaces()

label nFaces ( ) const
inlinenoexcept

Definition at line 301 of file PrimitivePatch.H.

◆ nPoints()

label nPoints ( ) const
inline

◆ nEdges()

label nEdges ( ) const
inline

◆ edges()

const Foam::edgeList & edges

◆ internalEdges()

const Foam::edgeList::subList internalEdges

Definition at line 189 of file PrimitivePatch.C.

◆ boundaryEdges()

const Foam::edgeList::subList boundaryEdges

Definition at line 198 of file PrimitivePatch.C.

◆ nInternalEdges()

Foam::label nInternalEdges

◆ nBoundaryEdges()

Foam::label nBoundaryEdges

Definition at line 220 of file PrimitivePatch.C.

Referenced by faMesh::updateMesh().

Here is the caller graph for this function:

◆ isInternalEdge()

bool isInternalEdge ( const label  edgei) const
inline

Definition at line 339 of file PrimitivePatch.H.

◆ boundaryPoints()

const Foam::labelList & boundaryPoints

Definition at line 229 of file PrimitivePatch.C.

◆ faceFaces()

const Foam::labelListList & faceFaces

Definition at line 242 of file PrimitivePatch.C.

Referenced by triSurfaceTools::validTri().

Here is the caller graph for this function:

◆ edgeFaces()

const Foam::labelListList & edgeFaces

◆ faceEdges()

const Foam::labelListList & faceEdges

◆ pointEdges()

const Foam::labelListList & pointEdges

◆ pointFaces()

const Foam::labelListList & pointFaces

◆ localFaces()

const Foam::List< typename Foam::PrimitivePatch< FaceList, PointField >::face_type > & localFaces

◆ boundaryFaces()

Foam::labelList boundaryFaces

Definition at line 27 of file PrimitivePatchBdryFaces.C.

◆ uniqBoundaryFaces()

Foam::labelList uniqBoundaryFaces

Definition at line 51 of file PrimitivePatchBdryFaces.C.

◆ meshPoints()

const Foam::labelList & meshPoints

Definition at line 323 of file PrimitivePatch.C.

Referenced by snappySnapDriver::avgCellCentres(), Foam::meshTools::calcBoxPointNormals(), addPatchCellLayer::calcExtrudeInfo(), polyDualMesh::calcFeatures(), snappySnapDriver::calcNearestSurface(), snappySnapDriver::calcSnapDistance(), patchPatchDist::correct(), cyclicPolyPatch::coupledEdges(), triSurfaceTools::curvatures(), faMeshDecomposition::decomposeMesh(), snappySnapDriver::detectNearSurfaces(), mappedPatchBase::findLocalSamples(), syncTools::getMasterPoints(), combineFaces::getOutsideFace(), globalIndexAndTransform::globalIndexAndTransform(), globalPoints::globalPoints(), isoSurfaceTopo::isoSurfaceTopo(), localPointRegion::localPointRegion(), processorFaPatch::makeNonGlobalPatchPoints(), PatchTools::matchPoints(), globalMeshData::mergePoints(), facePointPatch::meshPoints(), fieldSmoother::minSmoothField(), polyBoundaryMesh::neighbourEdges(), PrimitivePatch<::Foam::List< labelledTri >, pointField >::nPoints(), orientedSurface::orientedSurface(), motionSmootherAlgo::setDisplacement(), perfectInterface::setRefinement(), addPatchCellLayer::setRefinement(), shortestPathSet::shortestPathSet(), snappySnapDriver::smoothDisplacement(), fieldSmoother::smoothPatchNormals(), syncTools::syncEdgeList(), syncTools::syncEdgeMap(), globalMeshData::syncPointData(), syncTools::syncPointList(), syncTools::syncPointMap(), pointConstraints::syncUntransformedData(), ensightFaces::uniqueMeshPoints(), triSurfaceTools::vertexNormals(), ensightFaces::write(), and AMIWeights::writeWeightField().

Here is the caller graph for this function:

◆ meshPointMap()

const Foam::Map< Foam::label > & meshPointMap

◆ localPoints()

const Foam::Field< typename Foam::PrimitivePatch< FaceList, PointField >::point_type > & localPoints

Definition at line 352 of file PrimitivePatch.C.

Referenced by booleanSurface::booleanSurface(), mappedPatchBase::calcAMI(), snappySnapDriver::calcNearestSurface(), snappySnapDriver::calcSnapDistance(), searchableSurfaces::checkIntersection(), triSurfaceTools::collapseEdges(), patchPatchDist::correct(), cyclicPolyPatch::coupledEdges(), faMeshDecomposition::decomposeMesh(), snappySnapDriver::detectNearSurfaces(), snappySnapDriver::doSnap(), edgeSurface::edgeSurface(), localPointRegion::findDuplicateFaces(), triSurfaceTools::greenRefine(), processorPolyPatch::initOrder(), processorCyclicPolyPatch::initOrder(), facePointPatch::localPoints(), triSurfaceTools::maxEdge(), triSurfaceTools::mergePoints(), MeshedSurface< Foam::face >::MeshedSurface(), triSurfaceTools::minEdge(), edgeIntersections::minEdgeLength(), slidingInterface::modifyMotionPoints(), polyBoundaryMesh::neighbourEdges(), processorPolyPatch::order(), boundaryMesh::read(), boundaryMesh::readTriSurface(), cyclicAMIPolyPatch::resetAMI(), perfectInterface::setRefinement(), addPatchCellLayer::setRefinement(), shortestPathSet::shortestPathSet(), snappySnapDriver::smoothDisplacement(), triSurfaceTools::surfaceSide(), syncTools::syncEdgeList(), triSurfaceTools::triangulate(), triSurfaceTools::triangulateFaceCentre(), sampledFaceZone::update(), sampledPatch::update(), OBJstream::write(), triSurfaceTools::writeOBJ(), patchMeshWriter::writePoints(), and lumpedPointMovement::writeZonesVTP().

Here is the caller graph for this function:

◆ localPointOrder()

const Foam::labelList & localPointOrder

Definition at line 365 of file PrimitivePatch.C.

◆ whichPoint()

Foam::label whichPoint ( const label  gp) const

Definition at line 379 of file PrimitivePatch.C.

Referenced by slidingInterface::modifyMotionPoints().

Here is the caller graph for this function:

◆ meshEdge() [1/3]

Foam::edge meshEdge ( const label  edgei) const

Definition at line 28 of file PrimitivePatchMeshEdges.C.

Referenced by PatchTools::matchEdges().

Here is the caller graph for this function:

◆ meshEdge() [2/3]

Foam::edge meshEdge ( const edge e) const

Definition at line 36 of file PrimitivePatchMeshEdges.C.

◆ findEdge()

Foam::label findEdge ( const edge e) const

Definition at line 176 of file PrimitivePatchMeshEdges.C.

Referenced by PrimitivePatch<::Foam::List< labelledTri >, pointField >::whichEdge().

Here is the caller graph for this function:

◆ meshEdges() [1/3]

Foam::labelList meshEdges ( const edgeList allEdges,
const labelListList cellEdges,
const labelList faceCells 
) const

◆ meshEdges() [2/3]

Foam::labelList meshEdges ( const edgeList allEdges,
const labelListList pointEdges 
) const

Definition at line 96 of file PrimitivePatchMeshEdges.C.

◆ meshEdge() [3/3]

Foam::label meshEdge ( const label  edgei,
const edgeList allEdges,
const labelListList pointEdges 
) const

Definition at line 130 of file PrimitivePatchMeshEdges.C.

◆ meshEdges() [3/3]

Foam::labelList meshEdges ( const labelUList edgeLabels,
const edgeList allEdges,
const labelListList pointEdges 
) const

Definition at line 155 of file PrimitivePatchMeshEdges.C.

◆ faceCentres()

const Foam::Field< typename Foam::PrimitivePatch< FaceList, PointField >::point_type > & faceCentres

◆ faceAreas()

const Foam::Field< typename Foam::PrimitivePatch< FaceList, PointField >::point_type > & faceAreas

Definition at line 409 of file PrimitivePatch.C.

Referenced by MeshedSurface< Foam::face >::Sf().

Here is the caller graph for this function:

◆ magFaceAreas()

const Foam::Field< Foam::scalar > & magFaceAreas

Definition at line 422 of file PrimitivePatch.C.

Referenced by MeshedSurface< Foam::face >::magSf().

Here is the caller graph for this function:

◆ faceNormals()

const Foam::Field< typename Foam::PrimitivePatch< FaceList, PointField >::point_type > & faceNormals

◆ pointNormals()

const Foam::Field< typename Foam::PrimitivePatch< FaceList, PointField >::point_type > & pointNormals

◆ hasFaceAreas()

bool hasFaceAreas ( ) const
inline

Definition at line 460 of file PrimitivePatch.H.

◆ hasFaceCentres()

bool hasFaceCentres ( ) const
inline

Definition at line 461 of file PrimitivePatch.H.

◆ hasFaceNormals()

bool hasFaceNormals ( ) const
inline

Definition at line 462 of file PrimitivePatch.H.

◆ hasPointNormals()

bool hasPointNormals ( ) const
inline

Definition at line 463 of file PrimitivePatch.H.

◆ hasBoundaryPoints()

bool hasBoundaryPoints ( ) const
inline

Definition at line 465 of file PrimitivePatch.H.

◆ hasFaceFaces()

bool hasFaceFaces ( ) const
inline

Definition at line 466 of file PrimitivePatch.H.

◆ hasEdgeFaces()

bool hasEdgeFaces ( ) const
inline

Definition at line 467 of file PrimitivePatch.H.

◆ hasFaceEdges()

bool hasFaceEdges ( ) const
inline

Definition at line 468 of file PrimitivePatch.H.

◆ hasPointEdges()

bool hasPointEdges ( ) const
inline

Definition at line 469 of file PrimitivePatch.H.

◆ hasPointFaces()

bool hasPointFaces ( ) const
inline

Definition at line 470 of file PrimitivePatch.H.

◆ hasMeshPointMap()

bool hasMeshPointMap ( ) const
inline

Definition at line 472 of file PrimitivePatch.H.

◆ projectPoints() [1/2]

List<objectHit> projectPoints ( const ToPatch &  targetPatch,
const Field< point_type > &  projectionDirection,
const intersection::algorithm  = intersection::FULL_RAY,
const intersection::direction  = intersection::VECTOR 
) const

◆ projectFaceCentres() [1/2]

List<objectHit> projectFaceCentres ( const ToPatch &  targetPatch,
const Field< point_type > &  projectionDirection,
const intersection::algorithm  = intersection::FULL_RAY,
const intersection::direction  = intersection::VECTOR 
) const

◆ edgeLoops()

const Foam::labelListList & edgeLoops

Definition at line 140 of file PrimitivePatchEdgeLoops.C.

Referenced by combineFaces::getOutsideFace(), and combineFaces::setRefinement().

Here is the caller graph for this function:

◆ surfaceType()

Foam::PrimitivePatch< FaceList, PointField >::surfaceTopo surfaceType

Definition at line 102 of file PrimitivePatchCheck.C.

◆ checkTopology()

bool checkTopology ( const bool  report = false,
labelHashSet setPtr = nullptr 
) const

Definition at line 137 of file PrimitivePatchCheck.C.

◆ checkPointManifold()

bool checkPointManifold ( const bool  report = false,
labelHashSet setPtr = nullptr 
) const

Definition at line 184 of file PrimitivePatchCheck.C.

Referenced by cellClassification::fillRegionPoints().

Here is the caller graph for this function:

◆ movePoints()

void movePoints ( const Field< point_type > &  )
virtual

Definition at line 164 of file PrimitivePatch.C.

Referenced by cyclicAMIPolyPatch::initMovePoints(), and polyPatch::movePoints().

Here is the caller graph for this function:

◆ operator=() [1/2]

void operator= ( const PrimitivePatch< FaceList, PointField > &  rhs)

Definition at line 470 of file PrimitivePatch.C.

Referenced by polyPatch::operator=().

Here is the caller graph for this function:

◆ operator=() [2/2]

void operator= ( PrimitivePatch< FaceList, PointField > &&  rhs)

Definition at line 490 of file PrimitivePatch.C.

◆ whichEdge()

label whichEdge ( const edge e) const
inline

Definition at line 552 of file PrimitivePatch.H.

Referenced by slidingInterface::modifyMotionPoints().

Here is the caller graph for this function:

◆ projectPoints() [2/2]

Foam::List<Foam::objectHit> projectPoints ( const ToPatch &  targetPatch,
const Field< typename Foam::PrimitivePatch< FaceList, PointField >::point_type > &  projectionDirection,
const intersection::algorithm  alg,
const intersection::direction  dir 
) const

Definition at line 38 of file PrimitivePatchProjectPoints.C.

◆ projectFaceCentres() [2/2]

Foam::List<Foam::objectHit> projectFaceCentres ( const ToPatch &  targetPatch,
const Field< typename Foam::PrimitivePatch< FaceList, PointField >::point_type > &  projectionDirection,
const intersection::algorithm  alg,
const intersection::direction  dir 
) const

Definition at line 269 of file PrimitivePatchProjectPoints.C.


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