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 polyMesh &) const |
| Added cells given current mesh & layerfaces. More... | |
| void | setRefinement (const polyMesh &mesh, const globalIndex &globalFaces, const labelListList &globalEdgeFaces, const scalarField &expansionRatio, const indirectPrimitivePatch &pp, const labelList &sidePatchID, const labelList &exposedPatchID, const labelList &nFaceLayers, const labelList &nPointLayers, const vectorField &firstLayerDisp, const labelList &faceCellZones, polyTopoChange &meshMod) |
| Play commands into polyTopoChange to create layers on top. More... | |
| void | setRefinement (const polyMesh &mesh, const globalIndex &globalFaces, const labelListList &globalEdgeFaces, const label nLayers, const indirectPrimitivePatch &pp, const labelList &sidePatchID, const vectorField &overallDisplacement, const labelList &faceCellZones, polyTopoChange &meshMod) |
| Add with constant expansion ratio and same nLayers everywhere. More... | |
| void | topoChange (const polyTopoChangeMap &, const labelList &faceMap, const labelList &pointMap) |
| Update any locally stored mesh information. Gets additional. More... | |
| void | updateZones (polyMesh &mesh) |
| Update the mesh zones. 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. Uses. More... | |
| static void | calcSidePatch (const polyMesh &, const globalIndex &globalFaces, const labelListList &globalEdgeFaces, const indirectPrimitivePatch &pp, labelList &sidePatchID, label &nPatches, Map< label > &nbrProcToPatch, Map< label > &patchToNbrProc) |
| Boundary edges get extruded into boundary faces. Determine patch. 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 125 of file addPatchCellLayer.H.
| addPatchCellLayer | ( | const polyMesh & | mesh, |
| const bool | addToMesh = true |
||
| ) |
Construct from mesh.
Definition at line 387 of file addPatchCellLayer.C.
| ClassName | ( | "addPatchCellLayer" | ) |
Runtime type information.
|
inline |
Added points per patch point.
Definition at line 262 of file addPatchCellLayer.H.
|
inline |
Layer faces per patch face. See above.
Definition at line 268 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 404 of file addPatchCellLayer.C.
References polyMesh::faceNeighbour(), forAll, mesh, List< T >::setSize(), and List< T >::size().

| Foam::labelListList addedCells | ( | const polyMesh & | mesh | ) | const |
Added cells given current mesh & layerfaces.
Definition at line 431 of file addPatchCellLayer.C.
References mesh.
|
static |
Per patch edge the pp faces (in global indices) using it. Uses.
uniqueEqOp() to remove duplicates.
Definition at line 440 of file addPatchCellLayer.C.
References UIndirectList< T >::addressing(), PrimitivePatch< FaceList, PointField >::edgeFaces(), primitiveMesh::edges(), forAll, mesh, PrimitivePatch< FaceList, PointField >::meshEdges(), primitiveMesh::nEdges(), primitiveMesh::pointEdges(), List< T >::setSize(), List< T >::size(), syncTools::syncEdgeList(), and globalIndex::toGlobal().
Referenced by snappyLayerDriver::addLayers(), and addPatchCellLayer::setRefinement().


|
static |
Boundary edges get extruded into boundary faces. Determine patch.
for these faces. This might be a to-be-created processor patch (patchi >= mesh.boundaryMesh().size()) in which case the nbrProcToPatch, patchToNbrProc give the correspondence. nPatches is the new number of patches.
Definition at line 485 of file addPatchCellLayer.C.
References UIndirectList< T >::addressing(), polyMesh::boundaryMesh(), Foam::e, primitiveMesh::edgeFaces(), PrimitivePatch< FaceList, PointField >::edgeFaces(), primitiveMesh::edges(), PrimitivePatch< FaceList, PointField >::edges(), Foam::endl(), forAll, HashTable< T, Key, Hash >::found(), HashTable< T, Key, Hash >::insert(), primitiveMesh::isInternalFace(), globalIndex::isLocal(), k, mesh, PrimitivePatch< FaceList, PointField >::meshEdges(), PrimitivePatch< FaceList, PointField >::meshPoints(), PrimitivePatch< FaceList, PointField >::nEdges(), nPatches, patches, primitiveMesh::pointEdges(), PrimitivePatch< FaceList, PointField >::points(), List< T >::setSize(), UPtrList< T >::size(), List< T >::size(), WarningInFunction, polyBoundaryMesh::whichPatch(), and globalIndex::whichProcID().

| void setRefinement | ( | const polyMesh & | mesh, |
| const globalIndex & | globalFaces, | ||
| const labelListList & | globalEdgeFaces, | ||
| const scalarField & | expansionRatio, | ||
| const indirectPrimitivePatch & | pp, | ||
| const labelList & | sidePatchID, | ||
| const labelList & | exposedPatchID, | ||
| const labelList & | nFaceLayers, | ||
| const labelList & | nPointLayers, | ||
| const vectorField & | firstLayerDisp, | ||
| const labelList & | faceCellZones, | ||
| 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 666 of file addPatchCellLayer.C.
References Foam::abort(), polyTopoChange::addCell(), polyTopoChange::addFace(), polyTopoChange::addPoint(), UIndirectList< T >::addressing(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), polyMesh::boundaryMesh(), polyMesh::cellZones(), edge::compare(), Foam::e, face::edgeDirection(), primitiveMesh::edgeFaces(), PrimitivePatch< FaceList, PointField >::edgeFaces(), primitiveMesh::edges(), PrimitivePatch< FaceList, PointField >::edges(), Foam::endl(), f(), primitiveMesh::faceCentres(), PrimitivePatch< FaceList, PointField >::faceEdges(), polyMesh::faceOwner(), polyMesh::faces(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, UList< T >::fcIndex(), faceZone::flipMap(), forAll, forAllConstIter, forAllReverse, Foam::gMax(), Foam::identityMap(), HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), UList< T >::last(), PrimitivePatch< FaceList, PointField >::localFaces(), Zone< ZoneType, ZonesType >::localIndex(), PrimitivePatch< FaceList, PointField >::localPoints(), Foam::mag(), Foam::max(), VectorSpace< Form, Cmpt, Ncmpts >::max, mesh, Foam::meshEdge(), PrimitivePatch< FaceList, PointField >::meshEdges(), PrimitivePatch< FaceList, PointField >::meshPoints(), polyTopoChange::modifyFace(), n, PrimitivePatch< FaceList, PointField >::nEdges(), primitiveMesh::nFaces(), PrimitivePatch< FaceList, PointField >::nInternalEdges(), Foam::nl, primitiveMesh::nPoints(), PrimitivePatch< FaceList, PointField >::nPoints(), Foam::offset(), faceZone::oriented(), UPstream::parRun(), patches, patchi, primitiveMesh::pointEdges(), polyMesh::points(), PrimitivePatch< FaceList, PointField >::points(), polyTopoChange::points(), polyMesh::pointZones(), Foam::Pout, List< T >::setSize(), PtrList< T >::setSize(), Foam::sign(), UIndirectList< T >::size(), UPtrList< T >::size(), List< T >::size(), syncTools::syncEdgeList(), syncTools::syncPointList(), globalIndex::toGlobal(), List< T >::transfer(), and ZoneList< ZoneType, ZonesType, MeshType >::whichZones().
Referenced by snappyLayerDriver::addLayers(), and addPatchCellLayer::setRefinement().


|
inline |
Add with constant expansion ratio and same nLayers everywhere.
Definition at line 352 of file addPatchCellLayer.H.
References addPatchCellLayer::globalEdgeFaces(), mesh, PrimitivePatch< FaceList, PointField >::nPoints(), addPatchCellLayer::setRefinement(), and UIndirectList< T >::size().

| void topoChange | ( | const polyTopoChangeMap & | map, |
| 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 1689 of file addPatchCellLayer.C.
References Foam::faceMap(), forAll, newPointi, polyTopoChangeMap::reverseFaceMap(), polyTopoChangeMap::reversePointMap(), List< T >::setSize(), and List< T >::size().
Referenced by snappyLayerDriver::addLayers().


| void updateZones | ( | polyMesh & | mesh | ) |
Update the mesh zones.
adding the point and cell zones for the added layer
Definition at line 1752 of file addPatchCellLayer.C.
References polyMesh::cellZones(), polyMesh::faceZones(), ZoneList< ZoneType, ZonesType, MeshType >::insert(), faceZoneList::insert(), mesh, and polyMesh::pointZones().
Referenced by snappyLayerDriver::addLayers().

