Public Member Functions | Static Public Member Functions | List of all members
faceCoupleInfo Class Reference

Container for information needed to couple to meshes. When constructed from two meshes and a geometric tolerance finds the corresponding boundary faces. More...

Public Member Functions

 ClassName ("faceCoupleInfo")
 
 faceCoupleInfo (const polyMesh &mesh0, const polyMesh &mesh1, const scalar absTol, const bool perfectMatch)
 
 faceCoupleInfo (const polyMesh &masterMesh, const labelList &masterAddressing, const polyMesh &slaveMesh, const labelList &slaveAddressing, const scalar absTol, const bool perfectMatch, const bool orderedFaces, const bool patchDivision)
 
 ~faceCoupleInfo ()=default
 
const indirectPrimitivePatchmasterPatch () const
 
const indirectPrimitivePatchslavePatch () const
 
const primitiveFacePatchcutFaces () const
 
const pointFieldcutPoints () const
 
const labelListcutToMasterFaces () const
 
const labelListmasterToCutPoints () const
 
const labelListcutToSlaveFaces () const
 
const labelListslaveToCutPoints () const
 
const edgeLookupcutEdgeToPoints () const
 
template<template< class > class FaceList>
Foam::pointField calcFaceCentres (const FaceList< face > &faces, const pointField &points, const label start, const label size)
 
template<template< class > class FaceList>
Foam::pointField calcFacePointAverages (const FaceList< face > &faces, const pointField &points, const label start, const label size)
 

Static Public Member Functions

static labelList faceLabels (const polyPatch &)
 
static Map< label > makeMap (const labelList &)
 
static Map< labelListmakeMap (const labelListList &)
 

Detailed Description

Container for information needed to couple to meshes. When constructed from two meshes and a geometric tolerance finds the corresponding boundary faces.

The information it keeps is the set of faces&points (cutFaces, cutPoints) that should replace a set of faces on the master (masterPatch) and a set of faces on the slave (slavePatch)

Uses same tolerance to match faces and points on matched faces since they both originate from the same points and the tolerance usually comes from writing these points with limited precision (6 by default)

  1. Perfect match:
    • one-to-one match for faces and points.
    • the cut is always the 'most connected' of the master and slave so multiple master or slave points might point to the same cut point.
e.g. master:

    +--+
    |  |
    |  |
    +--+
        +--+
        |  |
        |  |
        +--+
slave:
        +--+
        |  |
        |  |
        +--+
    +--+
    |  |
    |  |
    +--+

adding both together creates a singly connected 2x2 cavity so suddenly the duplicate master points and the duplicate slave points all become a single cut point.

  1. Subdivision match:
    • Can be constructed from slave being subdivision of master with the polyPatch constructor.
    • Does not include above shared-point detection!

Notes on multiple slave faces per master:

As long as

So master:
+-------+
|       |
|       |
|       |
|       |
|       |
|       |
|       |
+-------+

slave:
+---+---+
|\  |  /|
| \ | / |
|  \|/  |
+---+---+
|  /|\  |
| / | \ |
|/  |  \|
+---+---+
is ok.

For this kind of matching the order is:

Note: matching refined faces onto master is a bit dodgy and will probably only work for unwarped faces. Also it will fail if e.g. face is split into 3x3 since then middle face has no point/edge in common with master. (problem is in face matching (findSlavesCoveringMaster), probably point/edge matching might just work)

Source files

Definition at line 156 of file faceCoupleInfo.H.

Constructor & Destructor Documentation

◆ faceCoupleInfo() [1/2]

faceCoupleInfo ( const polyMesh mesh0,
const polyMesh mesh1,
const scalar  absTol,
const bool  perfectMatch 
)

Definition at line 1910 of file faceCoupleInfo.C.

References Foam::expressions::patchExpr::debug, polyMesh::faces(), and polyMesh::points().

Here is the call graph for this function:

◆ faceCoupleInfo() [2/2]

faceCoupleInfo ( const polyMesh masterMesh,
const labelList masterAddressing,
const polyMesh slaveMesh,
const labelList slaveAddressing,
const scalar  absTol,
const bool  perfectMatch,
const bool  orderedFaces,
const bool  patchDivision 
)

◆ ~faceCoupleInfo()

~faceCoupleInfo ( )
default

Member Function Documentation

◆ ClassName()

ClassName ( "faceCoupleInfo"  )

◆ faceLabels()

Foam::labelList faceLabels ( const polyPatch pp)
static

Definition at line 2086 of file faceCoupleInfo.C.

References forAll, and polyPatch::start().

Here is the call graph for this function:

◆ makeMap() [1/2]

Foam::Map< Foam::label > makeMap ( const labelList lst)
static

Definition at line 2100 of file faceCoupleInfo.C.

References forAll.

◆ makeMap() [2/2]

Foam::Map< Foam::labelList > makeMap ( const labelListList lst)
static

Definition at line 2116 of file faceCoupleInfo.C.

References forAll.

◆ masterPatch()

const indirectPrimitivePatch& masterPatch ( ) const
inline

Definition at line 451 of file faceCoupleInfo.H.

◆ slavePatch()

const indirectPrimitivePatch& slavePatch ( ) const
inline

Definition at line 457 of file faceCoupleInfo.H.

◆ cutFaces()

const primitiveFacePatch& cutFaces ( ) const
inline

Definition at line 463 of file faceCoupleInfo.H.

Referenced by polyMeshAdder::add().

Here is the caller graph for this function:

◆ cutPoints()

const pointField& cutPoints ( ) const
inline

Definition at line 469 of file faceCoupleInfo.H.

◆ cutToMasterFaces()

const labelList& cutToMasterFaces ( ) const
inline

Definition at line 480 of file faceCoupleInfo.H.

◆ masterToCutPoints()

const labelList& masterToCutPoints ( ) const
inline

Definition at line 484 of file faceCoupleInfo.H.

◆ cutToSlaveFaces()

const labelList& cutToSlaveFaces ( ) const
inline

Definition at line 489 of file faceCoupleInfo.H.

◆ slaveToCutPoints()

const labelList& slaveToCutPoints ( ) const
inline

Definition at line 493 of file faceCoupleInfo.H.

◆ cutEdgeToPoints()

const edgeLookup& cutEdgeToPoints ( ) const
inline

Definition at line 500 of file faceCoupleInfo.H.

◆ calcFaceCentres()

Foam::pointField calcFaceCentres ( const FaceList< face > &  faces,
const pointField points,
const label  start,
const label  size 
)

Definition at line 28 of file faceCoupleInfoTemplates.C.

References forAll, and points.

◆ calcFacePointAverages()

Foam::pointField calcFacePointAverages ( const FaceList< face > &  faces,
const pointField points,
const label  start,
const label  size 
)

Definition at line 49 of file faceCoupleInfoTemplates.C.

References forAll, points, and Foam::Zero.


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