Adds layers of cells to outside of polyPatch. Can optionally create stand-alone extruded mesh (addToMesh=false). More...
Public Member Functions | |
ClassName ("addPatchCellLayer") | |
Runtime type information. More... | |
addPatchCellLayer (const polyMesh &, const bool addToMesh=true) | |
Construct from mesh. More... | |
const labelListList & | addedPoints () const |
Added points per patch point. More... | |
const labelListList & | layerFaces () const |
Layer faces per patch face. See above. More... | |
labelListList | addedCells () const |
Added cells given current mesh & layerfaces. More... | |
void | setRefinement (const globalIndex &globalFaces, const labelListList &globalEdgeFaces, const scalarField &expansionRatio, const indirectPrimitivePatch &pp, const bitSet &flip, const labelList &sidePatchID, const labelList &sideZoneID, const boolList &sideFlip, const labelList &inflateFaceID, const labelList &exposedPatchID, const labelList &nFaceLayers, const labelList &nPointLayers, const vectorField &firstLayerDisp, polyTopoChange &meshMod) |
Play commands into polyTopoChange to create layers on top. More... | |
void | setRefinement (const globalIndex &globalFaces, const labelListList &globalEdgeFaces, const label nLayers, const indirectPrimitivePatch &pp, const labelList &sidePatchID, const vectorField &overallDisplacement, polyTopoChange &meshMod) |
Add with constant expansion ratio and same nLayers everywhere. More... | |
void | updateMesh (const mapPolyMesh &, const labelList &faceMap, const labelList &pointMap) |
Update any locally stored mesh information. Gets additional. More... | |
Static Public Member Functions | |
static labelListList | addedCells (const polyMesh &, const labelListList &layerFaces) |
Helper: get added cells per patch face. More... | |
static labelListList | globalEdgeFaces (const polyMesh &, const globalIndex &globalFaces, const indirectPrimitivePatch &pp) |
Per patch edge the pp faces (in global indices) using it. More... | |
static void | calcExtrudeInfo (const bool zoneFromAnyFace, const polyMesh &, const globalIndex &globalFaces, const labelListList &globalEdgeFaces, const indirectPrimitivePatch &pp, labelList &edgePatchID, label &nPatches, Map< label > &nbrProcToPatch, Map< label > &patchToNbrProc, labelList &edgeZoneID, boolList &edgeFlip, labelList &inflateFaceID) |
Determine extrude information per patch edge: More... | |
Adds layers of cells to outside of polyPatch. Can optionally create stand-alone extruded mesh (addToMesh=false).
Call setRefinement with offset vector for every patch point and number of layers per patch face and number of layers per patch point.
gets supplied the number of extruded layers both per face and per point. Usually the point nlayers is the max of surrounding face nlayers.
point nlayers:
differing face nlayers: 'termination' : (e.g. from 2 to 4 layers) match at original patch face side.
E.g. 2 boundary faces on patches a,b. 2 layers for a, 3 for b.
Was: a b <- patch of boundary face +------+------+ | | | <- original cells +------+------+ Becomes: a b <- patch of boundary face +------+------+ + +------+ +------+------+ +------+------+ | | | <- original cells +------+------+
E.g. 3 boundary faces on patches a,b. b gets extruded, a doesn't.
a b b <- patch of boundary face +------+------+------+ | | | | <- cells +------+------+------+ ^ ^ <- wanted extrusion vector (none at far right) a | b | b <- patch of boundary face +------+------+------+ | | | | <- cells +------+------+------+ b +------+\ b 1. prism cell added onto second b face since a a| | ----\ only one side gets extruded. +------+------+------+ 2. side-face gets patch a, not b. | | | | +------+------+------+
Definition at line 124 of file addPatchCellLayer.H.
|
explicit |
Construct from mesh.
Definition at line 605 of file addPatchCellLayer.C.
ClassName | ( | "addPatchCellLayer" | ) |
Runtime type information.
|
inline |
Added points per patch point.
Definition at line 338 of file addPatchCellLayer.H.
|
inline |
Layer faces per patch face. See above.
Definition at line 346 of file addPatchCellLayer.H.
|
static |
Helper: get added cells per patch face.
addedCells[patchFace] is list of cells added. Last element is the top cells (i.e. the boundary cell)
Definition at line 620 of file addPatchCellLayer.C.
References faceLabels(), polyMesh::faceNeighbour(), forAll, mesh, List< T >::setSize(), and UList< T >::size().
Foam::labelListList addedCells | ( | ) | const |
Added cells given current mesh & layerfaces.
Definition at line 646 of file addPatchCellLayer.C.
|
static |
Per patch edge the pp faces (in global indices) using it.
Uses ListOps::uniqueEqOp to remove duplicates.
Definition at line 653 of file addPatchCellLayer.C.
References PrimitivePatch< FaceList, PointField >::edgeFaces(), primitiveMesh::edges(), forAll, mesh, PrimitivePatch< FaceList, PointField >::meshEdges(), primitiveMesh::nEdges(), primitiveMesh::pointEdges(), pp(), List< T >::setSize(), UList< T >::size(), syncTools::syncEdgeList(), and globalIndex::toGlobal().
Referenced by snappyLayerDriver::addLayers(), and addPatchCellLayer::setRefinement().
|
static |
Determine extrude information per patch edge:
Definition at line 1098 of file addPatchCellLayer.C.
References polyMesh::boundaryMesh(), globalMeshData::coupledPatch(), Foam::ensightOutput::debug, Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edgeFaces(), primitiveMesh::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), primitiveMesh::edges(), Foam::endl(), forAll, polyMesh::globalData(), globalMeshData::globalEdgeSlaves(), globalMeshData::globalEdgeSlavesMap(), globalMeshData::globalEdgeTransformedSlaves(), globalMeshData::globalTransforms(), HashTable< T, Key, Hash >::insert(), primitiveMesh::isInternalFace(), globalIndex::isLocal(), k, HashTable< T, Key, Hash >::lookup(), PatchTools::matchEdges(), mesh, PrimitivePatch< FaceList, PointField >::meshEdges(), PrimitivePatch< FaceList, PointField >::meshPoints(), PrimitivePatch< FaceList, PointField >::nEdges(), nPatches, UPstream::parRun(), patches, primitiveMesh::pointEdges(), PrimitivePatch< FaceList, PointField >::points(), pp(), processorTopology::procPatchLookup(), List< T >::setSize(), UList< T >::size(), UPtrList< T >::size(), globalMeshData::syncData(), globalIndex::toLocal(), globalMeshData::topology(), WarningInFunction, polyBoundaryMesh::whichPatch(), and globalIndex::whichProcID().
void setRefinement | ( | const globalIndex & | globalFaces, |
const labelListList & | globalEdgeFaces, | ||
const scalarField & | expansionRatio, | ||
const indirectPrimitivePatch & | pp, | ||
const bitSet & | flip, | ||
const labelList & | sidePatchID, | ||
const labelList & | sideZoneID, | ||
const boolList & | sideFlip, | ||
const labelList & | inflateFaceID, | ||
const labelList & | exposedPatchID, | ||
const labelList & | nFaceLayers, | ||
const labelList & | nPointLayers, | ||
const vectorField & | firstLayerDisp, | ||
polyTopoChange & | meshMod | ||
) |
Play commands into polyTopoChange to create layers on top.
of indirectPrimitivePatch (have to be outside faces). Gets displacement per patch point.
Definition at line 1426 of file addPatchCellLayer.C.
References Foam::abort(), HashTable< T, Key, Hash >::clear(), bitSet::count(), Foam::ensightOutput::debug, Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), UList< T >::empty(), Foam::endl(), Foam::exit(), f(), PrimitivePatch< FaceList, PointField >::faceEdges(), Foam::FatalError, FatalErrorInFunction, UList< T >::fcIndex(), HashTable< T, Key, Hash >::find(), faceZone::flipMap(), forAll, forAllReverse, Foam::gMax(), HashTable< T, Key, Hash >::insert(), isBlockedFace(), Foam::labelMax, UList< T >::last(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), Foam::mag(), Foam::max(), PrimitivePatch< FaceList, PointField >::meshEdges(), PrimitivePatch< FaceList, PointField >::meshPointMap(), PrimitivePatch< FaceList, PointField >::meshPoints(), polyTopoChange::modifyFace(), n, PrimitivePatch< FaceList, PointField >::nEdges(), PrimitivePatch< FaceList, PointField >::nInternalEdges(), Foam::nl, PrimitivePatch< FaceList, PointField >::nPoints(), Foam::foamVersion::patch, patches, patchID, PrimitivePatch< FaceList, PointField >::points(), polyTopoChange::points(), Foam::Pout, pp(), Foam::returnReduceOr(), face::reverseFace(), bitSet::set(), List< T >::set(), polyTopoChange::setAction(), List< T >::setSize(), UList< T >::size(), PackedList< Width >::size(), syncTools::swapBoundaryFaceList(), syncTools::syncBoundaryFaceList(), syncTools::syncEdgeList(), syncTools::syncPointList(), globalIndex::toGlobal(), faceZone::whichFace(), polyBoundaryMesh::whichPatch(), and Foam::Zero.
Referenced by snappyLayerDriver::addLayers(), and addPatchCellLayer::setRefinement().
|
inline |
Add with constant expansion ratio and same nLayers everywhere.
Definition at line 467 of file addPatchCellLayer.H.
References addPatchCellLayer::globalEdgeFaces(), pp(), and addPatchCellLayer::setRefinement().
void updateMesh | ( | const mapPolyMesh & | morphMap, |
const labelList & | faceMap, | ||
const labelList & | pointMap | ||
) |
Update any locally stored mesh information. Gets additional.
map from new to old patch (since patch needs to be recreated since has to be on outside).
Definition at line 2881 of file addPatchCellLayer.C.
References Foam::faceMap(), forAll, newPointi, mapPolyMesh::reverseFaceMap(), mapPolyMesh::reversePointMap(), List< T >::setSize(), and UList< T >::size().
Referenced by snappyLayerDriver::addLayers().