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")  
Runtime type information. More...  
faceCoupleInfo (const polyMesh &mesh0, const polyMesh &mesh1, const scalar absTol, const bool perfectMatch)  
Construct from two meshes and absolute tolerance. More...  
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)  
Construct from meshes and subset of mesh faces. More...  
~faceCoupleInfo ()=default  
Destructor. More...  
const indirectPrimitivePatch &  masterPatch () const 
Addressing engine for coupled faces on mesh0. More...  
const indirectPrimitivePatch &  slavePatch () const 
Addressing engine for coupled faces on mesh1. More...  
const primitiveFacePatch &  cutFaces () const 
Addressing engine for combined set of faces. More...  
const pointField &  cutPoints () const 
Points for combined set of faces. More...  
const labelList &  cutToMasterFaces () const 
Master face for every face on cut. Will always be at least. More...  
const labelList &  masterToCutPoints () const 
const labelList &  cutToSlaveFaces () const 
const labelList &  slaveToCutPoints () const 
const edgeLookup &  cutEdgeToPoints () const 
From two cut points (original edge) to list of inserted. More...  
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 &) 
Utility functions. More...  
static Map< label >  makeMap (const labelList &) 
Create Map from List. More...  
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 159 of file faceCoupleInfo.H.
faceCoupleInfo  (  const polyMesh &  mesh0, 
const polyMesh &  mesh1,  
const scalar  absTol,  
const bool  perfectMatch  
) 
Construct from two meshes and absolute tolerance.
Finds out matches geometrically. No checking for nonsense match. Tolerance is absolute one so use with care. perfectMatch : each point/edge/face has corresponding point on other side if this is false then assumes slave is subdivision. Matching then will work only for nonwarped faces since does nearesttoface comparison with absTol.
Definition at line 1916 of file faceCoupleInfo.C.
References 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  
) 
Construct from meshes and subset of mesh faces.
(i.e. indirectPrimitivePatch addressing) All faces in patch are considered matched (but don't have to be ordered) perfectMatch : each point/edge/face has corresponding point on other side orderedFaces : faces in patch are ordered (so masterAddressing[i] matches slaveAddressing[i]) patchDivision: faces in slave mesh that originate from the same master face have the same patch. Used by some triangulation methods.
Definition at line 2004 of file faceCoupleInfo.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::min(), primitiveMesh::nInternalFaces(), Foam::nl, and UList< T >::size().

default 
Destructor.
ClassName  (  "faceCoupleInfo"  ) 
Runtime type information.

static 
Utility functions.
Get patch face labels
Definition at line 2093 of file faceCoupleInfo.C.
References forAll, and polyPatch::start().
Definition at line 2107 of file faceCoupleInfo.C.
References forAll, HashTable< T, Key, Hash >::insert(), and UList< T >::size().

static 
Definition at line 2122 of file faceCoupleInfo.C.
References forAll, HashTable< T, Key, Hash >::insert(), and UList< T >::size().

inline 
Addressing engine for coupled faces on mesh0.
Definition at line 454 of file faceCoupleInfo.H.

inline 
Addressing engine for coupled faces on mesh1.
Definition at line 460 of file faceCoupleInfo.H.

inline 
Addressing engine for combined set of faces.
Definition at line 466 of file faceCoupleInfo.H.
Referenced by polyMeshAdder::add().

inline 
Points for combined set of faces.
Definition at line 472 of file faceCoupleInfo.H.

inline 
Master face for every face on cut. Will always be at least.
one but there might be multiple cut faces pointing to the same master
Definition at line 483 of file faceCoupleInfo.H.

inline 
Definition at line 487 of file faceCoupleInfo.H.

inline 
Definition at line 492 of file faceCoupleInfo.H.

inline 
Definition at line 496 of file faceCoupleInfo.H.

inline 
From two cut points (original edge) to list of inserted.
points
Definition at line 503 of file faceCoupleInfo.H.
Foam::pointField calcFaceCentres  (  const FaceList< face > &  faces, 
const pointField &  points,  
const label  start,  
const label  size  
) 
Definition at line 34 of file faceCoupleInfoTemplates.C.
Foam::pointField calcFacePointAverages  (  const FaceList< face > &  faces, 
const pointField &  points,  
const label  start,  
const label  size  
) 
Definition at line 55 of file faceCoupleInfoTemplates.C.
References forAll, points, UList< T >::size(), and Foam::Zero.