Public Member Functions | List of all members
polyTopoChange Class Reference

Direct mesh changes based on v1.3 polyTopoChange syntax. More...

Public Member Functions

 ClassName ("polyTopoChange")
 
 polyTopoChange (const label nPatches, const bool strict=true)
 
 polyTopoChange (const polyMesh &mesh, const bool strict=true)
 
const DynamicList< point > & points () const
 
const DynamicList< face > & faces () const
 
const DynamicList< label > & region () const
 
const DynamicList< label > & faceOwner () const
 
const DynamicList< label > & faceNeighbour () const
 
bool pointRemoved (const label pointi) const
 
bool faceRemoved (const label facei) const
 
bool cellRemoved (const label celli) const
 
void clear ()
 
void addMesh (const polyMesh &mesh, const labelUList &patchMap, const labelUList &pointZoneMap, const labelUList &faceZoneMap, const labelUList &cellZoneMap)
 
void setCapacity (const label nPoints, const label nFaces, const label nCells)
 
void movePoints (const pointField &newPoints)
 
label setAction (const topoAction &action)
 
label addPoint (const point &pt, const label masterPointID, const label zoneID, const bool inCell)
 
void modifyPoint (const label pointi, const point &pt, const label zoneID, const bool inCell)
 
void removePoint (const label pointi, const label mergePointi)
 
label addFace (const face &f, const label own, const label nei, const label masterPointID, const label masterEdgeID, const label masterFaceID, const bool flipFaceFlux, const label patchID, const label zoneID, const bool zoneFlip)
 
void modifyFace (const face &f, const label facei, const label own, const label nei, const bool flipFaceFlux, const label patchID, const label zoneID, const bool zoneFlip)
 
void removeFace (const label facei, const label mergeFacei)
 
label addCell (const label masterPointID, const label masterEdgeID, const label masterFaceID, const label masterCellID, const label zoneID)
 
void modifyCell (const label celli, const label zoneID)
 
void removeCell (const label celli, const label mergeCelli)
 
void setNumPatches (const label nPatches)
 
autoPtr< mapPolyMeshchangeMesh (polyMesh &mesh, const labelUList &patchMap, const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
 
autoPtr< mapPolyMeshchangeMesh (polyMesh &mesh, const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
 
template<class Type >
autoPtr< mapPolyMeshmakeMesh (autoPtr< Type > &newMesh, const IOobject &io, const polyMesh &mesh, const labelUList &patchMap, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
 
template<class Type >
autoPtr< mapPolyMeshmakeMesh (autoPtr< Type > &newMesh, const IOobject &io, const polyMesh &mesh, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
 
template<class Type >
Foam::autoPtr< Foam::mapPolyMeshmakeMesh (autoPtr< Type > &newMeshPtr, const IOobject &io, const polyMesh &mesh, const labelUList &patchMap, const bool syncParallel, const bool orderCells, const bool orderPoints)
 
template<class Type >
Foam::autoPtr< Foam::mapPolyMeshmakeMesh (autoPtr< Type > &newMeshPtr, const IOobject &io, const polyMesh &mesh, const bool syncParallel, const bool orderCells, const bool orderPoints)
 

Detailed Description

Direct mesh changes based on v1.3 polyTopoChange syntax.

Instead of recording changes and executing them all in one go (as did v1.3 polyTopoChange) this class actually holds the current points/faces/cells and does the change immediately. It can be asked to compress out all unused points/faces/cells and renumber everything to be consistent.

Note:

Source files

Definition at line 95 of file polyTopoChange.H.

Constructor & Destructor Documentation

◆ polyTopoChange() [1/2]

polyTopoChange ( const label  nPatches,
const bool  strict = true 
)

Definition at line 2130 of file polyTopoChange.C.

◆ polyTopoChange() [2/2]

polyTopoChange ( const polyMesh mesh,
const bool  strict = true 
)

Definition at line 2162 of file polyTopoChange.C.

References polyMesh::boundaryMesh(), polyMesh::cellZones(), polyMesh::faceZones(), Foam::identity(), mesh, and polyMesh::pointZones().

Here is the call graph for this function:

Member Function Documentation

◆ ClassName()

ClassName ( "polyTopoChange"  )

◆ points()

const DynamicList<point>& points ( ) const
inline

Definition at line 446 of file polyTopoChange.H.

Referenced by duplicatePoints::setRefinement(), addPatchCellLayer::setRefinement(), cyclicAMIPolyPatch::setTopology(), and meshRefinement::splitFacesUndo().

Here is the caller graph for this function:

◆ faces()

const DynamicList<face>& faces ( ) const
inline

Definition at line 451 of file polyTopoChange.H.

Referenced by meshRefinement::splitFacesUndo().

Here is the caller graph for this function:

◆ region()

const DynamicList<label>& region ( ) const
inline

Definition at line 456 of file polyTopoChange.H.

◆ faceOwner()

const DynamicList<label>& faceOwner ( ) const
inline

Definition at line 461 of file polyTopoChange.H.

◆ faceNeighbour()

const DynamicList<label>& faceNeighbour ( ) const
inline

Definition at line 466 of file polyTopoChange.H.

◆ pointRemoved()

bool pointRemoved ( const label  pointi) const
inline

Definition at line 25 of file polyTopoChangeI.H.

References VectorSpace< Vector< scalar >, scalar, 3 >::max, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ faceRemoved()

bool faceRemoved ( const label  facei) const
inline

Definition at line 36 of file polyTopoChangeI.H.

◆ cellRemoved()

bool cellRemoved ( const label  celli) const
inline

Definition at line 42 of file polyTopoChangeI.H.

◆ clear()

void clear ( )

Definition at line 2206 of file polyTopoChange.C.

◆ addMesh()

void addMesh ( const polyMesh mesh,
const labelUList patchMap,
const labelUList pointZoneMap,
const labelUList faceZoneMap,
const labelUList cellZoneMap 
)

◆ setCapacity()

void setCapacity ( const label  nPoints,
const label  nFaces,
const label  nCells 
)

Definition at line 2442 of file polyTopoChange.C.

References nPoints.

Referenced by fvMeshAdder::add(), and meshRefinement::splitFacesUndo().

Here is the caller graph for this function:

◆ movePoints()

void movePoints ( const pointField newPoints)

Definition at line 2673 of file polyTopoChange.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and forAll.

Referenced by dynamicMotionSolverFvMeshAMI::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAction()

Foam::label setAction ( const topoAction action)

Definition at line 2474 of file polyTopoChange.C.

References Foam::abort(), polyRemoveCell::cellID(), polyModifyCell::cellID(), polyRemoveFace::faceID(), polyModifyFace::faceID(), Foam::FatalError, FatalErrorInFunction, polyModifyFace::flipFaceFlux(), polyAddFace::flipFaceFlux(), polyModifyPoint::inCell(), polyAddPoint::inCell(), polyAddCell::masterCellID(), polyAddCell::masterEdgeID(), polyAddFace::masterEdgeID(), polyAddCell::masterFaceID(), polyAddFace::masterFaceID(), polyAddPoint::masterPointID(), polyAddCell::masterPointID(), polyAddFace::masterPointID(), polyRemoveCell::mergeCellID(), polyRemoveFace::mergeFaceID(), polyRemovePoint::mergePointID(), polyModifyFace::neighbour(), polyAddFace::neighbour(), polyModifyFace::newFace(), polyAddFace::newFace(), polyAddPoint::newPoint(), polyModifyPoint::newPoint(), polyModifyFace::owner(), polyAddFace::owner(), polyModifyFace::patchID(), polyAddFace::patchID(), polyRemovePoint::pointID(), polyModifyPoint::pointID(), polyModifyCell::removeFromZone(), polyModifyFace::zoneFlip(), polyAddFace::zoneFlip(), polyModifyCell::zoneID(), polyModifyPoint::zoneID(), polyAddPoint::zoneID(), polyAddCell::zoneID(), polyModifyFace::zoneID(), and polyAddFace::zoneID().

Referenced by meshRefinement::mergeBaffles(), polyMeshAdder::mergePoints(), removeCells::setRefinement(), faceCollapser::setRefinement(), removePoints::setRefinement(), boundaryCutter::setRefinement(), combineFaces::setRefinement(), removeFaces::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), addPatchCellLayer::setRefinement(), hexRef8::setRefinement(), removePoints::setUnrefinement(), and combineFaces::setUnrefinement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addPoint()

Foam::label addPoint ( const point pt,
const label  masterPointID,
const label  zoneID,
const bool  inCell 
)

Definition at line 2603 of file polyTopoChange.C.

References zoneID.

Referenced by polyMeshAdder::add(), duplicatePoints::setRefinement(), createShellMesh::setRefinement(), and tetDecomposer::setRefinement().

Here is the caller graph for this function:

◆ modifyPoint()

void modifyPoint ( const label  pointi,
const point pt,
const label  zoneID,
const bool  inCell 
)

Definition at line 2631 of file polyTopoChange.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and zoneID.

Referenced by edgeCollapser::setRefinement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removePoint()

void removePoint ( const label  pointi,
const label  mergePointi 
)

Definition at line 2692 of file polyTopoChange.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, VectorSpace< Vector< scalar >, scalar, 3 >::max, and Foam::nl.

Referenced by polyMeshAdder::mergePoints(), and edgeCollapser::setRefinement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addFace()

Foam::label addFace ( const face f,
const label  own,
const label  nei,
const label  masterPointID,
const label  masterEdgeID,
const label  masterFaceID,
const bool  flipFaceFlux,
const label  patchID,
const label  zoneID,
const bool  zoneFlip 
)

Definition at line 2740 of file polyTopoChange.C.

References Foam::expressions::patchExpr::debug, f(), patchID, and zoneID.

Referenced by polyMeshAdder::add(), cyclicAMIPolyPatch::addAMIFaces(), meshRefinement::doSplitFaces(), and createShellMesh::setRefinement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ modifyFace()

void modifyFace ( const face f,
const label  facei,
const label  own,
const label  nei,
const bool  flipFaceFlux,
const label  patchID,
const label  zoneID,
const bool  zoneFlip 
)

Definition at line 2804 of file polyTopoChange.C.

References Foam::expressions::patchExpr::debug, f(), patchID, and zoneID.

Referenced by meshRefinement::doSplitFaces(), duplicatePoints::setRefinement(), edgeCollapser::setRefinement(), and meshRefinement::splitFacesUndo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeFace()

void removeFace ( const label  facei,
const label  mergeFacei 
)

Definition at line 2841 of file polyTopoChange.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.

Referenced by cyclicAMIPolyPatch::removeAMIFaces(), edgeCollapser::setRefinement(), and meshRefinement::splitFacesUndo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addCell()

Foam::label addCell ( const label  masterPointID,
const label  masterEdgeID,
const label  masterFaceID,
const label  masterCellID,
const label  zoneID 
)

Definition at line 2888 of file polyTopoChange.C.

References zoneID.

Referenced by polyMeshAdder::add(), createShellMesh::setRefinement(), and tetDecomposer::setRefinement().

Here is the caller graph for this function:

◆ modifyCell()

void modifyCell ( const label  celli,
const label  zoneID 
)

Definition at line 2925 of file polyTopoChange.C.

References zoneID.

◆ removeCell()

void removeCell ( const label  celli,
const label  mergeCelli 
)

Definition at line 2935 of file polyTopoChange.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.

Referenced by edgeCollapser::setRefinement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNumPatches()

void setNumPatches ( const label  nPatches)
inline

Definition at line 48 of file polyTopoChangeI.H.

References nPatches.

◆ changeMesh() [1/2]

Foam::autoPtr< Foam::mapPolyMesh > changeMesh ( polyMesh mesh,
const labelUList patchMap,
const bool  inflate,
const bool  syncParallel = true,
const bool  orderCells = false,
const bool  orderPoints = false 
)

◆ changeMesh() [2/2]

Foam::autoPtr< Foam::mapPolyMesh > changeMesh ( polyMesh mesh,
const bool  inflate,
const bool  syncParallel = true,
const bool  orderCells = false,
const bool  orderPoints = false 
)

Definition at line 3239 of file polyTopoChange.C.

References polyMesh::boundaryMesh(), Foam::identity(), and mesh.

Here is the call graph for this function:

◆ makeMesh() [1/4]

autoPtr<mapPolyMesh> makeMesh ( autoPtr< Type > &  newMesh,
const IOobject io,
const polyMesh mesh,
const labelUList patchMap,
const bool  syncParallel = true,
const bool  orderCells = false,
const bool  orderPoints = false 
)

Referenced by snappyLayerDriver::addLayers(), and polyMeshFilter::copyMesh().

Here is the caller graph for this function:

◆ makeMesh() [2/4]

autoPtr<mapPolyMesh> makeMesh ( autoPtr< Type > &  newMesh,
const IOobject io,
const polyMesh mesh,
const bool  syncParallel = true,
const bool  orderCells = false,
const bool  orderPoints = false 
)

◆ makeMesh() [3/4]

Foam::autoPtr<Foam::mapPolyMesh> makeMesh ( autoPtr< Type > &  newMeshPtr,
const IOobject io,
const polyMesh mesh,
const labelUList patchMap,
const bool  syncParallel,
const bool  orderCells,
const bool  orderPoints 
)

◆ makeMesh() [4/4]

Foam::autoPtr<Foam::mapPolyMesh> makeMesh ( autoPtr< Type > &  newMeshPtr,
const IOobject io,
const polyMesh mesh,
const bool  syncParallel,
const bool  orderCells,
const bool  orderPoints 
)

Definition at line 410 of file polyTopoChangeTemplates.C.

References polyMesh::boundaryMesh(), Foam::identity(), and mesh.

Here is the call graph for this function:

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