Direct mesh changes based on v1.3 polyTopoChange syntax. More...
Public Member Functions | |
| ClassName ("polyTopoChange") | |
| Runtime type information. More... | |
| polyTopoChange (const label nPatches, const bool strict=true) | |
| Construct without mesh. Either specify nPatches or use. More... | |
| polyTopoChange (const polyMesh &mesh, const bool strict=true) | |
| Construct from mesh. Adds all points/face/cells from mesh. More... | |
| const DynamicList< point > & | points () const |
| Points. Shrunk after constructing mesh (or calling of compact()) More... | |
| 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 |
| Is point removed? More... | |
| bool | faceRemoved (const label facei) const |
| Is face removed? More... | |
| bool | cellRemoved (const label celli) const |
| Is cell removed? More... | |
| void | clear () |
| Clear all storage. More... | |
| void | setCapacity (const label nPoints, const label nFaces, const label nCells) |
| Explicitly pre-size the dynamic storage for expected mesh. More... | |
| label | addPoint (const point &, const label masterPointID, const bool inCell) |
| Add point and return new point index. More... | |
| void | modifyPoint (const label, const point &, const bool inCell) |
| Modify coordinate. More... | |
| void | removePoint (const label, const label) |
| Remove point / merge points. More... | |
| label | addFace (const face &f, const label own, const label nei, const label masterFaceID, const bool flipFaceFlux, const label patchID) |
| Add face to cells and return new face index. More... | |
| void | modifyFace (const face &f, const label facei, const label own, const label nei, const bool flipFaceFlux, const label patchID) |
| Modify vertices or cell of face. More... | |
| void | removeFace (const label, const label) |
| Remove face / merge faces. More... | |
| label | addCell (const label masterCellID) |
| Add cell and return new cell index. More... | |
| void | removeCell (const label, const label) |
| Remove cell / merge cells. More... | |
| void | setNumPatches (const label nPatches) |
| Explicitly set the number of patches if construct-without-mesh. More... | |
| autoPtr< polyTopoChangeMap > | changeMesh (polyMesh &mesh, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false) |
| Inplace changes mesh without change of patches. More... | |
| autoPtr< polyTopoChangeMap > | makeMesh (autoPtr< fvMesh > &newMesh, const IOobject &io, const polyMesh &mesh, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false) |
| Create new mesh with old mesh patches. More... | |
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:
Definition at line 97 of file polyTopoChange.H.
| polyTopoChange | ( | const label | nPatches, |
| const bool | strict = true |
||
| ) |
Construct without mesh. Either specify nPatches or use.
setNumPatches before trying to make a mesh (makeMesh, changeMesh)
Definition at line 1518 of file polyTopoChange.C.
| polyTopoChange | ( | const polyMesh & | mesh, |
| const bool | strict = true |
||
| ) |
Construct from mesh. Adds all points/face/cells from mesh.
Definition at line 1540 of file polyTopoChange.C.
References polyTopoChange::addCell(), polyTopoChange::addFace(), polyTopoChange::addPoint(), polyMesh::boundaryMesh(), polyMesh::faceNeighbour(), polyTopoChange::faceNeighbour(), polyMesh::faceOwner(), polyTopoChange::faceOwner(), polyMesh::faces(), polyTopoChange::faces(), forAll, SortableList< T >::indices(), mesh, primitiveMesh::nCells(), primitiveMesh::nInternalFaces(), primitiveMesh::nPoints(), patches, patchi, polyMesh::points(), polyTopoChange::points(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::setCapacity(), PackedList< nBits >::setCapacity(), List< T >::size(), SortableList< T >::sort(), and polyPatch::start().

| ClassName | ( | "polyTopoChange" | ) |
Runtime type information.
|
inline |
Points. Shrunk after constructing mesh (or calling of compact())
Definition at line 369 of file polyTopoChange.H.
Referenced by polyTopoChange::polyTopoChange(), duplicatePoints::setRefinement(), and addPatchCellLayer::setRefinement().

|
inline |
Definition at line 374 of file polyTopoChange.H.
Referenced by polyTopoChange::polyTopoChange().

|
inline |
Definition at line 379 of file polyTopoChange.H.
|
inline |
Definition at line 384 of file polyTopoChange.H.
Referenced by polyTopoChange::polyTopoChange().

|
inline |
Definition at line 389 of file polyTopoChange.H.
Referenced by polyTopoChange::polyTopoChange().

|
inline |
Is point removed?
Definition at line 30 of file polyTopoChangeI.H.
References VectorSpace< Form, Cmpt, Ncmpts >::max, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

|
inline |
Is face removed?
Definition at line 41 of file polyTopoChangeI.H.
|
inline |
Is cell removed?
Definition at line 47 of file polyTopoChangeI.H.
| void clear | ( | ) |
Clear all storage.
Definition at line 1669 of file polyTopoChange.C.
Explicitly pre-size the dynamic storage for expected mesh.
size for if construct-without-mesh
Definition at line 1691 of file polyTopoChange.C.
References nPoints.
| Foam::label addPoint | ( | const point & | pt, |
| const label | masterPointID, | ||
| const bool | inCell | ||
| ) |
Add point and return new point index.
Notes:
Definition at line 1715 of file polyTopoChange.C.
References Foam::inCell.
Referenced by polyTopoChange::polyTopoChange(), meshCutter::setRefinement(), hexRef8::setRefinement(), duplicatePoints::setRefinement(), createShellMesh::setRefinement(), addPatchCellLayer::setRefinement(), removePoints::setUnrefinement(), and combineFaces::setUnrefinement().

Modify coordinate.
Notes:
Definition at line 1737 of file polyTopoChange.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and Foam::inCell.
Referenced by edgeCollapser::setRefinement().


Remove point / merge points.
Definition at line 1772 of file polyTopoChange.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, VectorSpace< Form, Cmpt, Ncmpts >::max, and Foam::nl.
Referenced by removePoints::setRefinement(), removeCells::setRefinement(), combineFaces::setRefinement(), and edgeCollapser::setRefinement().


| Foam::label addFace | ( | const face & | f, |
| const label | own, | ||
| const label | nei, | ||
| const label | masterFaceID, | ||
| const bool | flipFaceFlux, | ||
| const label | patchID | ||
| ) |
Add face to cells and return new face index.
own, nei <0 >=0 : add inactive face (to end of face list)
Definition at line 1820 of file polyTopoChange.C.
References f().
Referenced by polyTopoChange::polyTopoChange(), meshCutter::setRefinement(), createShellMesh::setRefinement(), addPatchCellLayer::setRefinement(), combineFaces::setUnrefinement(), and meshRefinement::splitFaces().


| void modifyFace | ( | const face & | f, |
| const label | facei, | ||
| const label | own, | ||
| const label | nei, | ||
| const bool | flipFaceFlux, | ||
| const label | patchID | ||
| ) |
Modify vertices or cell of face.
Definition at line 1864 of file polyTopoChange.C.
References f().
Referenced by meshRefinement::mergeBaffles(), Foam::polyMeshUnMergeCyclics(), removeCells::setRefinement(), combineFaces::setRefinement(), edgeCollapser::setRefinement(), duplicatePoints::setRefinement(), addPatchCellLayer::setRefinement(), combineFaces::setUnrefinement(), and meshRefinement::splitFaces().


Remove face / merge faces.
Definition at line 1889 of file polyTopoChange.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.
Referenced by meshRefinement::mergeBaffles(), removeCells::setRefinement(), combineFaces::setRefinement(), and edgeCollapser::setRefinement().


| Foam::label addCell | ( | const label | masterCellID | ) |
Add cell and return new cell index.
Definition at line 1928 of file polyTopoChange.C.
Referenced by polyTopoChange::polyTopoChange(), meshCutter::setRefinement(), hexRef8::setRefinement(), createShellMesh::setRefinement(), and addPatchCellLayer::setRefinement().

Remove cell / merge cells.
Definition at line 1938 of file polyTopoChange.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.
Referenced by removeCells::setRefinement(), and edgeCollapser::setRefinement().


|
inline |
Explicitly set the number of patches if construct-without-mesh.
used
Definition at line 53 of file polyTopoChangeI.H.
References nPatches.
| Foam::autoPtr< Foam::polyTopoChangeMap > changeMesh | ( | polyMesh & | mesh, |
| const bool | syncParallel = true, |
||
| const bool | orderCells = false, |
||
| const bool | orderPoints = false |
||
| ) |
Inplace changes mesh without change of patches.
Adapts patch start/end and by default does parallel matching. Clears all data. Returns map. orderCells : whether to order the cells (see bandCompression.H) orderPoints : whether to order the points into internal first followed by boundary points. This is not fully consistent with upper-triangular ordering of points and edges so is only done when explicitly asked for.
Definition at line 1968 of file polyTopoChange.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellVolumes(), Foam::endl(), mesh, primitiveMesh::nCells(), primitiveMesh::nFaces(), Foam::nl, primitiveMesh::nPoints(), Foam::Pout, polyMesh::resetPrimitives(), and UPtrList< T >::size().
Referenced by snappyLayerDriver::addLayers(), meshRefinement::createBaffles(), meshRefinement::doRemovePoints(), meshRefinement::doRestorePoints(), meshRefinement::dupNonManifoldPoints(), meshRefinement::mergeBaffles(), meshRefinement::mergePatchFacesUndo(), Foam::polyMeshUnMergeCyclics(), meshRefinement::refine(), refinementIterator::setRefinement(), meshRefinement::splitFaces(), and meshRefinement::zonify().


| Foam::autoPtr< Foam::polyTopoChangeMap > makeMesh | ( | autoPtr< fvMesh > & | newMesh, |
| const IOobject & | io, | ||
| const polyMesh & | mesh, | ||
| const bool | syncParallel = true, |
||
| const bool | orderCells = false, |
||
| const bool | orderPoints = false |
||
| ) |
Create new mesh with old mesh patches.
Definition at line 2159 of file polyTopoChange.C.
References fvMesh::addFvPatches(), polyMesh::addZones(), polyMesh::boundaryMesh(), primitiveMesh::cellVolumes(), polyMesh::cellZones(), IOobject::clone(), Foam::endl(), polyMesh::faceZones(), forAll, mesh, primitiveMesh::nCells(), primitiveMesh::nFaces(), Foam::nl, IOobject::NO_READ, primitiveMesh::nPoints(), patchi, polyMesh::pointZones(), Foam::Pout, IOobject::readOpt(), autoPtr< T >::reset(), and UPtrList< T >::size().
Referenced by snappyLayerDriver::addLayers(), polyMeshFilter::copyMesh(), and fvMeshSubset::setLargeCellSubset().

