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 indirectPrimitivePatch & | masterPatch () const |
const indirectPrimitivePatch & | slavePatch () const |
const primitiveFacePatch & | cutFaces () const |
const pointField & | cutPoints () const |
const labelList & | cutToMasterFaces () const |
const labelList & | masterToCutPoints () const |
const labelList & | cutToSlaveFaces () const |
const labelList & | slaveToCutPoints () const |
const edgeLookup & | cutEdgeToPoints () 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< labelList > | makeMap (const labelListList &) |
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)
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.
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)
Definition at line 156 of file faceCoupleInfo.H.
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().
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 | ||
) |
Definition at line 1998 of file faceCoupleInfo.C.
References Foam::abort(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::min(), primitiveMesh::nInternalFaces(), and Foam::nl.
|
default |
ClassName | ( | "faceCoupleInfo" | ) |
|
static |
Definition at line 2086 of file faceCoupleInfo.C.
References forAll, and polyPatch::start().
Definition at line 2100 of file faceCoupleInfo.C.
References forAll.
|
static |
Definition at line 2116 of file faceCoupleInfo.C.
References forAll.
|
inline |
Definition at line 451 of file faceCoupleInfo.H.
|
inline |
Definition at line 457 of file faceCoupleInfo.H.
|
inline |
Definition at line 463 of file faceCoupleInfo.H.
Referenced by polyMeshAdder::add().
|
inline |
Definition at line 469 of file faceCoupleInfo.H.
|
inline |
Definition at line 480 of file faceCoupleInfo.H.
|
inline |
Definition at line 484 of file faceCoupleInfo.H.
|
inline |
Definition at line 489 of file faceCoupleInfo.H.
|
inline |
Definition at line 493 of file faceCoupleInfo.H.
|
inline |
Definition at line 500 of file faceCoupleInfo.H.
Foam::pointField calcFaceCentres | ( | const FaceList< face > & | faces, |
const pointField & | points, | ||
const label | start, | ||
const label | size | ||
) |
Definition at line 28 of file faceCoupleInfoTemplates.C.
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.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.