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... | |
addPatchCellLayer (const addPatchCellLayer &)=delete | |
Disallow default bitwise copy construction. 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 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 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... | |
void | operator= (const addPatchCellLayer &)=delete |
Disallow default bitwise assignment. 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 386 of file addPatchCellLayer.C.
|
delete |
Disallow default bitwise copy construction.
ClassName | ( | "addPatchCellLayer" | ) |
Runtime type information.
|
inline |
Added points per patch point.
Definition at line 268 of file addPatchCellLayer.H.
|
inline |
Layer faces per patch face. See above.
Definition at line 274 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 403 of file addPatchCellLayer.C.
References polyMesh::faceNeighbour(), forAll, List< T >::setSize(), and List< T >::size().
Foam::labelListList addedCells | ( | ) | const |
Added cells given current mesh & layerfaces.
Definition at line 430 of file addPatchCellLayer.C.
|
static |
Per patch edge the pp faces (in global indices) using it. Uses.
uniqueEqOp() to remove duplicates.
Definition at line 436 of file addPatchCellLayer.C.
References UIndirectList< T >::addressing(), PrimitivePatch< FaceList, PointField >::edgeFaces(), primitiveMesh::edges(), forAll, 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 481 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, 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 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 662 of file addPatchCellLayer.C.
References Foam::abort(), polyTopoChange::addCell(), polyTopoChange::addFace(), polyTopoChange::addPoint(), UIndirectList< T >::addressing(), Foam::e, PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), Foam::endl(), f(), PrimitivePatch< FaceList, PointField >::faceEdges(), Foam::FatalError, FatalErrorInFunction, UList< T >::fcIndex(), forAll, forAllReverse, Foam::gMax(), HashSet< Key, Hash >::insert(), UList< T >::last(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), Foam::mag(), Foam::max(), VectorSpace< Form, Cmpt, Ncmpts >::max, PrimitivePatch< FaceList, PointField >::meshEdges(), PrimitivePatch< FaceList, PointField >::meshPoints(), polyTopoChange::modifyFace(), n, PrimitivePatch< FaceList, PointField >::nEdges(), PrimitivePatch< FaceList, PointField >::nInternalEdges(), Foam::nl, PrimitivePatch< FaceList, PointField >::nPoints(), Foam::offset(), patches, patchi, PrimitivePatch< FaceList, PointField >::points(), polyTopoChange::points(), Foam::Pout, List< T >::setSize(), PtrList< T >::setSize(), UIndirectList< T >::size(), List< T >::size(), syncTools::syncEdgeList(), syncTools::syncPointList(), and globalIndex::toGlobal().
Referenced by snappyLayerDriver::addLayers(), and addPatchCellLayer::setRefinement().
|
inline |
Add with constant expansion ratio and same nLayers everywhere.
Definition at line 358 of file addPatchCellLayer.H.
References addPatchCellLayer::globalEdgeFaces(), 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 1581 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 1644 of file addPatchCellLayer.C.
References polyMesh::cellZones(), ZoneList< ZoneType, ZonesType, MeshType >::insert(), and polyMesh::pointZones().
|
delete |
Disallow default bitwise assignment.