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< mapPolyMesh > | changeMesh (polyMesh &mesh, const labelUList &patchMap, const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false) |
autoPtr< mapPolyMesh > | changeMesh (polyMesh &mesh, const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false) |
template<class Type > | |
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) |
template<class Type > | |
autoPtr< mapPolyMesh > | makeMesh (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::mapPolyMesh > | makeMesh (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::mapPolyMesh > | makeMesh (autoPtr< Type > &newMeshPtr, const IOobject &io, const polyMesh &mesh, const bool syncParallel, const bool orderCells, const bool orderPoints) |
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 95 of file polyTopoChange.H.
polyTopoChange | ( | const label | nPatches, |
const bool | strict = true |
||
) |
Definition at line 2130 of file polyTopoChange.C.
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().
ClassName | ( | "polyTopoChange" | ) |
|
inline |
Definition at line 446 of file polyTopoChange.H.
Referenced by duplicatePoints::setRefinement(), addPatchCellLayer::setRefinement(), cyclicAMIPolyPatch::setTopology(), and meshRefinement::splitFacesUndo().
|
inline |
Definition at line 451 of file polyTopoChange.H.
Referenced by meshRefinement::splitFacesUndo().
|
inline |
Definition at line 456 of file polyTopoChange.H.
|
inline |
Definition at line 461 of file polyTopoChange.H.
|
inline |
Definition at line 466 of file polyTopoChange.H.
|
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().
|
inline |
Definition at line 36 of file polyTopoChangeI.H.
|
inline |
Definition at line 42 of file polyTopoChangeI.H.
void clear | ( | ) |
Definition at line 2206 of file polyTopoChange.C.
void addMesh | ( | const polyMesh & | mesh, |
const labelUList & | patchMap, | ||
const labelUList & | pointZoneMap, | ||
const labelUList & | faceZoneMap, | ||
const labelUList & | cellZoneMap | ||
) |
Definition at line 2237 of file polyTopoChange.C.
References Foam::abort(), polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), polyMesh::cellZones(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::max(), mesh, patchIdentifier::name(), primitiveMesh::nCells(), primitiveMesh::nInternalFaces(), primitiveMesh::nPoints(), patches, pointLabels(), points, polyMesh::points(), polyMesh::pointZones(), List::resize(), polyPatch::start(), and WarningInFunction.
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().
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().
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().
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().
Definition at line 2631 of file polyTopoChange.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and zoneID.
Referenced by edgeCollapser::setRefinement().
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().
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().
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().
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().
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().
void modifyCell | ( | const label | celli, |
const label | zoneID | ||
) |
Definition at line 2925 of file polyTopoChange.C.
References zoneID.
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().
|
inline |
Definition at line 48 of file polyTopoChangeI.H.
References nPatches.
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 |
||
) |
Definition at line 2973 of file polyTopoChange.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellVolumes(), polyMesh::cellZones(), Foam::expressions::patchExpr::debug, Foam::endl(), polyMesh::faceZones(), forAll, mesh, primitiveMesh::nCells(), autoPtr::New(), newPointi, primitiveMesh::nFaces(), Foam::nl, primitiveMesh::nPoints(), polyMesh::points(), polyMesh::pointZones(), Foam::Pout, polyMesh::resetPrimitives(), polyMesh::topoChanging(), Foam::HashSetOps::used(), and Foam::Zero.
Referenced by fvMeshAdder::add(), snappyLayerDriver::addLayers(), meshRefinement::createBaffles(), meshRefinement::directionalRefine(), meshRefinement::doRemoveCells(), meshRefinement::doRemovePoints(), meshRefinement::doRestorePoints(), meshRefinement::dupNonManifoldPoints(), meshRefinement::mergeBaffles(), meshRefinement::mergePatchFaces(), meshRefinement::mergePatchFacesUndo(), meshRefinement::mergePoints(), dynamicRefineFvMesh::refine(), meshRefinement::refine(), refinementIterator::setRefinement(), meshRefinement::splitFacesUndo(), dynamicRefineFvMesh::unrefine(), dynamicMotionSolverFvMeshAMI::update(), and meshRefinement::zonify().
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.
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().
autoPtr<mapPolyMesh> makeMesh | ( | autoPtr< Type > & | newMesh, |
const IOobject & | io, | ||
const polyMesh & | mesh, | ||
const bool | syncParallel = true , |
||
const bool | orderCells = false , |
||
const bool | orderPoints = false |
||
) |
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 | ||
) |
Definition at line 98 of file polyTopoChangeTemplates.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellVolumes(), polyMesh::cellZones(), PtrList::clone(), Foam::expressions::patchExpr::debug, Foam::endl(), polyMesh::faceZones(), forAll, mesh, Foam::name(), primitiveMesh::nCells(), autoPtr::New(), primitiveMesh::nFaces(), Foam::nl, primitiveMesh::nPoints(), word::null, polyMesh::pointZones(), Foam::Pout, autoPtr::reset(), UList::size(), and Foam::HashSetOps::used().
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.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.