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

like meshCutter but also removes non-anchor side of cell. More...

Inheritance diagram for meshCutAndRemove:
Inheritance graph
[legend]
Collaboration diagram for meshCutAndRemove:
Collaboration graph
[legend]

Public Member Functions

 ClassName ("meshCutAndRemove")
 Runtime type information. More...
 
 meshCutAndRemove (const polyMesh &mesh)
 Construct from mesh. More...
 
void setRefinement (const label exposedPatchI, const cellCuts &cuts, const labelList &cutPatch, polyTopoChange &meshMod)
 Do actual cutting with cut description. Inserts mesh changes. More...
 
void updateMesh (const mapPolyMesh &)
 Force recalculation of locally stored data on topological change. More...
 
const Map< label > & addedFaces () const
 Faces added. Per split cell label of added face. More...
 
const HashTable< label, edge, Hash< edge > > & addedPoints () const
 Points added. Per split edge label of added point. More...
 
- Public Member Functions inherited from edgeVertex
 edgeVertex (const polyMesh &mesh)
 Construct from mesh. More...
 
const polyMeshmesh () const
 
bool isEdge (const label eVert) const
 
label getEdge (const label eVert) const
 
label getVertex (const label eVert) const
 
label vertToEVert (const label vertI) const
 
label edgeToEVert (const label edgeI) const
 
point coord (const label cut, const scalar weight) const
 
label cutPairToEdge (const label cut0, const label cut1) const
 
OstreamwriteCut (Ostream &os, const label cut, const scalar) const
 Write cut description to Ostream. More...
 
OstreamwriteCuts (Ostream &os, const labelList &, const scalarField &) const
 Write cut descriptions to Ostream. More...
 

Private Member Functions

label findCutCell (const cellCuts &, const labelList &) const
 Returns -1 or the cell in cellLabels that is cut. More...
 
label findInternalFacePoint (const labelList &pointLabels) const
 Returns first pointI in pointLabels that uses an internal. More...
 
label findPatchFacePoint (const face &f, const label patchI) const
 Find point on face that is part of original mesh and that is. More...
 
void faceCells (const cellCuts &cuts, const label exposedPatchI, const label faceI, label &own, label &nei, label &patchID) const
 Get new owner and neighbour of face. Checks anchor points to see if. More...
 
void getZoneInfo (const label faceI, label &zoneID, bool &zoneFlip) const
 Get zone information for face. More...
 
void addFace (polyTopoChange &meshMod, const label faceI, const label masterPointI, const face &newFace, const label owner, const label neighbour, const label patchID)
 Adds a face from point. Flips face if owner>neighbour. More...
 
void modFace (polyTopoChange &meshMod, const label faceI, const face &newFace, const label owner, const label neighbour, const label patchID)
 Modifies existing faceI for either new owner/neighbour or. More...
 
void copyFace (const face &f, const label startFp, const label endFp, face &newFace) const
 
void splitFace (const face &f, const label v0, const label v1, face &f0, face &f1) const
 Split face along cut into two faces. Faces are in same point. More...
 
face addEdgeCutsToFace (const label faceI) const
 Add cuts of edges to face. More...
 
face loopToFace (const label cellI, const labelList &loop) const
 Convert loop of cuts into face. More...
 
 meshCutAndRemove (const meshCutAndRemove &)
 Disallow default bitwise copy construct. More...
 
void operator= (const meshCutAndRemove &)
 Disallow default bitwise assignment. More...
 

Static Private Member Functions

static label firstCommon (const labelList &lst1, const labelList &lst2)
 
static bool isIn (const edge &, const labelList &)
 Do the elements of edge appear in consecutive order in the list. More...
 

Private Attributes

Map< labeladdedFaces_
 Faces added in last setRefinement. Per split cell label of added. More...
 
HashTable< label, edge, Hash< edge > > addedPoints_
 Points added in last setRefinement. Per split edge label of added. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from edgeVertex
static void updateLabels (const labelList &map, List< refineCell > &)
 Update refine list from map. Used to update cell/face labels. More...
 
static void updateLabels (const labelList &map, Map< label > &)
 Update map from map. Used to update cell/face labels. More...
 
static void updateLabels (const labelList &map, labelHashSet &)
 Update map from map. Used to update cell/face labels. More...
 
static bool isEdge (const primitiveMesh &mesh, const label eVert)
 Is eVert an edge? More...
 
static label getEdge (const primitiveMesh &mesh, const label eVert)
 Convert eVert to edge label. More...
 
static label getVertex (const primitiveMesh &mesh, const label eVert)
 Convert eVert to vertex label. More...
 
static label vertToEVert (const primitiveMesh &mesh, const label vertI)
 Convert pointI to eVert. More...
 
static label edgeToEVert (const primitiveMesh &mesh, const label edgeI)
 Convert edgeI to eVert. More...
 
static point coord (const primitiveMesh &, const label cut, const scalar weight)
 Return coordinate of cut (uses weight if edgeCut) More...
 
static label cutPairToEdge (const primitiveMesh &, const label cut0, const label cut1)
 Find mesh edge (or -1) between two cuts. More...
 

Detailed Description

like meshCutter but also removes non-anchor side of cell.

Source files

Definition at line 60 of file meshCutAndRemove.H.

Constructor & Destructor Documentation

◆ meshCutAndRemove() [1/2]

meshCutAndRemove ( const meshCutAndRemove )
private

Disallow default bitwise copy construct.

◆ meshCutAndRemove() [2/2]

meshCutAndRemove ( const polyMesh mesh)

Construct from mesh.

Definition at line 577 of file meshCutAndRemove.C.

Member Function Documentation

◆ firstCommon()

Foam::label firstCommon ( const labelList lst1,
const labelList lst2 
)
staticprivate

Definition at line 50 of file meshCutAndRemove.C.

References Foam::findIndex(), and forAll.

Here is the call graph for this function:

◆ isIn()

bool isIn ( const edge twoCuts,
const labelList cuts 
)
staticprivate

Do the elements of edge appear in consecutive order in the list.

Definition at line 70 of file meshCutAndRemove.C.

References Foam::findIndex().

Here is the call graph for this function:

◆ findCutCell()

Foam::label findCutCell ( const cellCuts cuts,
const labelList cellLabels 
) const
private

Returns -1 or the cell in cellLabels that is cut.

Definition at line 94 of file meshCutAndRemove.C.

References cellCuts::cellLoops(), forAll, Foam::labelI, and List::size().

Here is the call graph for this function:

◆ findInternalFacePoint()

Foam::label findInternalFacePoint ( const labelList pointLabels) const
private

Returns first pointI in pointLabels that uses an internal.

face. Used to find point to inflate cell/face from (has to be connected to internal face)

face. Used to find point to inflate cell/face from (has to be connected to internal face). Returns -1 (so inflate from nothing) if none found.

Definition at line 117 of file meshCutAndRemove.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::labelI, mesh, pFaces, and pointLabels().

Here is the call graph for this function:

◆ findPatchFacePoint()

Foam::label findPatchFacePoint ( const face f,
const label  patchI 
) const
private

Find point on face that is part of original mesh and that is.

point connected to the patch

Definition at line 151 of file meshCutAndRemove.C.

References f(), forAll, mesh, nPoints, patches, and pFaces.

Here is the call graph for this function:

◆ faceCells()

void faceCells ( const cellCuts cuts,
const label  exposedPatchI,
const label  faceI,
label own,
label nei,
label patchID 
) const
private

Get new owner and neighbour of face. Checks anchor points to see if.

need to get original or added cell.

Definition at line 183 of file meshCutAndRemove.C.

References cellCuts::cellAnchorPoints(), cellCuts::cellLoops(), f(), and mesh.

Here is the call graph for this function:

◆ getZoneInfo()

void getZoneInfo ( const label  faceI,
label zoneID,
bool &  zoneFlip 
) const
private

Get zone information for face.

Definition at line 228 of file meshCutAndRemove.C.

References faceZone::flipMap(), mesh, and faceZone::whichFace().

Here is the call graph for this function:

◆ addFace()

void addFace ( polyTopoChange meshMod,
const label  faceI,
const label  masterPointI,
const face newFace,
const label  owner,
const label  neighbour,
const label  patchID 
)
private

Adds a face from point. Flips face if owner>neighbour.

Definition at line 249 of file meshCutAndRemove.C.

References Foam::endl(), Foam::Pout, face::reverseFace(), and polyTopoChange::setAction().

Here is the call graph for this function:

◆ modFace()

void modFace ( polyTopoChange meshMod,
const label  faceI,
const face newFace,
const label  owner,
const label  neighbour,
const label  patchID 
)
private

Modifies existing faceI for either new owner/neighbour or.

new face points. Checks if anything changed and flips face if owner>neighbour

Definition at line 333 of file meshCutAndRemove.C.

References Foam::endl(), mesh, Foam::Pout, face::reverseFace(), and polyTopoChange::setAction().

Here is the call graph for this function:

◆ copyFace()

void copyFace ( const face f,
const label  startFp,
const label  endFp,
face newFace 
) const
private

Definition at line 412 of file meshCutAndRemove.C.

References f().

Here is the call graph for this function:

◆ splitFace()

void splitFace ( const face f,
const label  v0,
const label  v1,
face f0,
face f1 
) const
private

Split face along cut into two faces. Faces are in same point.

order as original face (i.e. maintain normal direction)

Definition at line 438 of file meshCutAndRemove.C.

References Foam::abort(), f(), f1, Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), List::setSize(), and List::size().

Here is the call graph for this function:

◆ addEdgeCutsToFace()

Foam::face addEdgeCutsToFace ( const label  faceI) const
private

Add cuts of edges to face.

Definition at line 479 of file meshCutAndRemove.C.

References meshCutAndRemove::addedPoints_, f(), polyMesh::faces(), HashTable::find(), forAll, edgeVertex::mesh(), and List::setSize().

Here is the call graph for this function:

◆ loopToFace()

Foam::face loopToFace ( const label  cellI,
const labelList loop 
) const
private

Convert loop of cuts into face.

Definition at line 515 of file meshCutAndRemove.C.

References Foam::e, primitiveMesh::edges(), HashTable::find(), Foam::meshTools::findEdge(), forAll, mesh, List::setSize(), and List::size().

Here is the call graph for this function:

◆ operator=()

void operator= ( const meshCutAndRemove )
private

Disallow default bitwise assignment.

◆ ClassName()

ClassName ( "meshCutAndRemove"  )

Runtime type information.

◆ setRefinement()

void setRefinement ( const label  exposedPatchI,
const cellCuts cuts,
const labelList cutPatch,
polyTopoChange meshMod 
)

Do actual cutting with cut description. Inserts mesh changes.

into meshMod. cuts: all loops and topological information cutPatch: for every cell that has loop the patch number exposedPatch: patch for other exposed faces

Definition at line 588 of file meshCutAndRemove.C.

References Foam::abort(), polyMesh::boundaryMesh(), cellCuts::cellAnchorPoints(), cellCuts::cellLoops(), primitiveMesh::cellPoints(), Foam::e, primitiveMesh::edgeFaces(), cellCuts::edgeIsCut(), primitiveMesh::edges(), cellCuts::edgeWeight(), Foam::endl(), f(), f1, polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), cellCuts::faceSplitCut(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIter(), mesh, Foam::nl, cellCuts::nLoops(), nPoints, patches, cellCuts::pointIsCut(), polyMesh::points(), Foam::Pout, Foam::reverse(), polyTopoChange::setAction(), and List::size().

Here is the call graph for this function:

◆ updateMesh()

void updateMesh ( const mapPolyMesh map)

Force recalculation of locally stored data on topological change.

Definition at line 1280 of file meshCutAndRemove.C.

References Foam::e, Foam::endl(), forAllConstIter(), HashTable::insert(), Foam::Pout, mapPolyMesh::reverseCellMap(), mapPolyMesh::reverseFaceMap(), and mapPolyMesh::reversePointMap().

Here is the call graph for this function:

◆ addedFaces()

const Map<label>& addedFaces ( ) const
inline

Faces added. Per split cell label of added face.

Definition at line 219 of file meshCutAndRemove.H.

References meshCutAndRemove::addedFaces_.

◆ addedPoints()

const HashTable<label, edge, Hash<edge> >& addedPoints ( ) const
inline

Points added. Per split edge label of added point.

(note: fairly useless across topology changes since one of the points of the edge will probably disappear)

Definition at line 227 of file meshCutAndRemove.H.

Field Documentation

◆ addedFaces_

Map<label> addedFaces_
private

Faces added in last setRefinement. Per split cell label of added.

face

Definition at line 68 of file meshCutAndRemove.H.

Referenced by meshCutAndRemove::addedFaces().

◆ addedPoints_

HashTable<label, edge, Hash<edge> > addedPoints_
private

Points added in last setRefinement. Per split edge label of added.

point

Definition at line 72 of file meshCutAndRemove.H.

Referenced by meshCutAndRemove::addEdgeCutsToFace().


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