Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
meshDualiser Class Reference

Creates dual of polyMesh. Every point becomes a cell (or multiple cells for feature points), a walk around every edge creates faces between them. More...

Collaboration diagram for meshDualiser:
Collaboration graph
[legend]

Public Member Functions

 ClassName ("meshDualiser")
 Runtime type information. More...
 
 meshDualiser (const polyMesh &)
 Construct from mesh. More...
 
const labelListListpointToDualCells () const
 From point on cell to dual cell. Either single entry or. More...
 
const labelListpointToDualPoint () const
 From point to dual point (or -1 if not feature point). More...
 
const labelListcellToDualPoint () const
 From cell to dual point (at cell centre). All cells become. More...
 
const labelListfaceToDualPoint () const
 From face to dual point (at face centre; or -1 if not. More...
 
const labelListedgeToDualPoint () const
 From edge to dual point (at edge mid; or -1 if not feature. More...
 
void setRefinement (const bool splitFace, const labelList &featureFaces, const labelList &featureEdges, const labelList &singleCellFeaturePoints, const labelList &multiCellFeaturePoints, polyTopoChange &meshMod)
 Insert all changes into meshMod to convert the polyMesh into. More...
 

Private Member Functions

label findDualCell (const label cellI, const label pointI) const
 Find dual cell given point and cell. More...
 
void generateDualBoundaryEdges (const PackedBoolList &, const label pointI, polyTopoChange &)
 Helper function to generate dualpoints on all boundary edges. More...
 
bool sameDualCell (const label faceI, const label pointI) const
 Check that owner and neighbour of face have same dual cell. More...
 
label addInternalFace (const label masterPointI, const label masterEdgeI, const label masterFaceI, const bool edgeOrder, const label dualCell0, const label dualCell1, const DynamicList< label > &verts, polyTopoChange &meshMod) const
 Add internal face. More...
 
label addBoundaryFace (const label masterPointI, const label masterEdgeI, const label masterFaceI, const label dualCellI, const label patchI, const DynamicList< label > &verts, polyTopoChange &meshMod) const
 Add boundary face. More...
 
void createFacesAroundEdge (const bool splitFace, const PackedBoolList &, const label edgeI, const label startFaceI, polyTopoChange &, boolList &doneEFaces) const
 Create internal faces walking around edge. More...
 
void createFaceFromInternalFace (const label faceI, label &fp, polyTopoChange &) const
 Create single internal face from internal face. More...
 
void createFacesAroundBoundaryPoint (const label patchI, const label patchPointI, const label startFaceI, polyTopoChange &, boolList &donePFaces) const
 Creates boundary faces walking around point on patchI. More...
 
 meshDualiser (const meshDualiser &)
 Disallow default bitwise copy construct. More...
 
void operator= (const meshDualiser &)
 Disallow default bitwise assignment. More...
 

Static Private Member Functions

static void checkPolyTopoChange (const polyTopoChange &)
 
static void dumpPolyTopoChange (const polyTopoChange &, const fileName &)
 

Private Attributes

const polyMeshmesh_
 
labelListList pointToDualCells_
 From point on cell to dual cell. Either single entry or. More...
 
labelList pointToDualPoint_
 From point to dual point (or -1 if not feature point). More...
 
labelList cellToDualPoint_
 From cell to dual point. All cells become point. More...
 
labelList faceToDualPoint_
 From face to dual point (or -1 if not feature face) More...
 
labelList edgeToDualPoint_
 From edge to dual point (or -1 if not feature edge) More...
 

Detailed Description

Creates dual of polyMesh. Every point becomes a cell (or multiple cells for feature points), a walk around every edge creates faces between them.

Put all points you want in the final mesh into featurePoints; all edge(mid)s you want in the final mesh into featureEdges; all face(centre)s in faceFaces.

Usually to preserve boundaries:

In same way you can also preserve internal faces (e.g. faceZones)

Source files

Definition at line 66 of file meshDualiser.H.

Constructor & Destructor Documentation

◆ meshDualiser() [1/2]

meshDualiser ( const meshDualiser )
private

Disallow default bitwise copy construct.

◆ meshDualiser() [2/2]

meshDualiser ( const polyMesh )

Construct from mesh.

Member Function Documentation

◆ checkPolyTopoChange()

static void checkPolyTopoChange ( const polyTopoChange )
staticprivate

◆ dumpPolyTopoChange()

static void dumpPolyTopoChange ( const polyTopoChange ,
const fileName  
)
staticprivate

◆ findDualCell()

label findDualCell ( const label  cellI,
const label  pointI 
) const
private

Find dual cell given point and cell.

◆ generateDualBoundaryEdges()

void generateDualBoundaryEdges ( const PackedBoolList ,
const label  pointI,
polyTopoChange  
)
private

Helper function to generate dualpoints on all boundary edges.

emanating from (boundary & feature) point

◆ sameDualCell()

bool sameDualCell ( const label  faceI,
const label  pointI 
) const
private

Check that owner and neighbour of face have same dual cell.

◆ addInternalFace()

label addInternalFace ( const label  masterPointI,
const label  masterEdgeI,
const label  masterFaceI,
const bool  edgeOrder,
const label  dualCell0,
const label  dualCell1,
const DynamicList< label > &  verts,
polyTopoChange meshMod 
) const
private

Add internal face.

◆ addBoundaryFace()

label addBoundaryFace ( const label  masterPointI,
const label  masterEdgeI,
const label  masterFaceI,
const label  dualCellI,
const label  patchI,
const DynamicList< label > &  verts,
polyTopoChange meshMod 
) const
private

Add boundary face.

◆ createFacesAroundEdge()

void createFacesAroundEdge ( const bool  splitFace,
const PackedBoolList ,
const label  edgeI,
const label  startFaceI,
polyTopoChange ,
boolList doneEFaces 
) const
private

Create internal faces walking around edge.

◆ createFaceFromInternalFace()

void createFaceFromInternalFace ( const label  faceI,
label fp,
polyTopoChange  
) const
private

Create single internal face from internal face.

◆ createFacesAroundBoundaryPoint()

void createFacesAroundBoundaryPoint ( const label  patchI,
const label  patchPointI,
const label  startFaceI,
polyTopoChange ,
boolList donePFaces 
) const
private

Creates boundary faces walking around point on patchI.

◆ operator=()

void operator= ( const meshDualiser )
private

Disallow default bitwise assignment.

◆ ClassName()

ClassName ( "meshDualiser"  )

Runtime type information.

◆ pointToDualCells()

const labelListList& pointToDualCells ( ) const
inline

From point on cell to dual cell. Either single entry or.

one entry per pointCells.

Definition at line 195 of file meshDualiser.H.

◆ pointToDualPoint()

const labelList& pointToDualPoint ( ) const
inline

From point to dual point (or -1 if not feature point).

Definition at line 201 of file meshDualiser.H.

References meshDualiser::pointToDualPoint_.

◆ cellToDualPoint()

const labelList& cellToDualPoint ( ) const
inline

From cell to dual point (at cell centre). All cells become.

points.

Definition at line 208 of file meshDualiser.H.

◆ faceToDualPoint()

const labelList& faceToDualPoint ( ) const
inline

From face to dual point (at face centre; or -1 if not.

feature face).

Definition at line 215 of file meshDualiser.H.

◆ edgeToDualPoint()

const labelList& edgeToDualPoint ( ) const
inline

From edge to dual point (at edge mid; or -1 if not feature.

edge).

Definition at line 222 of file meshDualiser.H.

◆ setRefinement()

void setRefinement ( const bool  splitFace,
const labelList featureFaces,
const labelList featureEdges,
const labelList singleCellFeaturePoints,
const labelList multiCellFeaturePoints,
polyTopoChange meshMod 
)

Insert all changes into meshMod to convert the polyMesh into.

its dual. featureFaces : faces where we want a point at the face centre featureEdges : edges ,, edge mid featurePoints : points ,, point. Two variants: singleCellFeaturePoints : point becomes one dualcell. Use this for e.g. convex boundary points. multiCellFeaturePoints : one dualcell per original cell around point. Use this for e.g. concave boundary points since it prevents big concave boundary cells.

Field Documentation

◆ mesh_

const polyMesh& mesh_
private

Definition at line 70 of file meshDualiser.H.

◆ pointToDualCells_

labelListList pointToDualCells_
private

From point on cell to dual cell. Either single entry or.

one entry per pointCells

Definition at line 74 of file meshDualiser.H.

◆ pointToDualPoint_

labelList pointToDualPoint_
private

From point to dual point (or -1 if not feature point).

Definition at line 77 of file meshDualiser.H.

Referenced by meshDualiser::pointToDualPoint().

◆ cellToDualPoint_

labelList cellToDualPoint_
private

From cell to dual point. All cells become point.

Definition at line 80 of file meshDualiser.H.

◆ faceToDualPoint_

labelList faceToDualPoint_
private

From face to dual point (or -1 if not feature face)

Definition at line 83 of file meshDualiser.H.

◆ edgeToDualPoint_

labelList edgeToDualPoint_
private

From edge to dual point (or -1 if not feature edge)

Definition at line 86 of file meshDualiser.H.


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