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, 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... | |
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 474 of file addPatchCellLayer.C.
References addPatchCellLayer::addedCells().
|
delete |
Disallow default bitwise copy construction.
ClassName | ( | "addPatchCellLayer" | ) |
Runtime type information.
|
inline |
Added points per patch point.
Definition at line 267 of file addPatchCellLayer.H.
|
inline |
Layer faces per patch face. See above.
Definition at line 273 of file addPatchCellLayer.H.
References addPatchCellLayer::addedCells(), addPatchCellLayer::calcSidePatch(), addPatchCellLayer::globalEdgeFaces(), nPatches, and addPatchCellLayer::setRefinement().
|
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 489 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 515 of file addPatchCellLayer.C.
References addPatchCellLayer::globalEdgeFaces().
Referenced by addPatchCellLayer::addPatchCellLayer(), and addPatchCellLayer::layerFaces().
|
static |
Per patch edge the pp faces (in global indices) using it. Uses.
uniqueEqOp() to remove duplicates.
Definition at line 523 of file addPatchCellLayer.C.
References addPatchCellLayer::calcSidePatch(), 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 addPatchCellLayer::addedCells(), snappyLayerDriver::addLayers(), and addPatchCellLayer::layerFaces().
|
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 568 of file addPatchCellLayer.C.
References polyMesh::boundaryMesh(), PrimitivePatch< FaceList, PointField >::edgeFaces(), primitiveMesh::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), primitiveMesh::edges(), Foam::endl(), f1, 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, primitiveMesh::pointEdges(), PrimitivePatch< FaceList, PointField >::points(), addPatchCellLayer::setRefinement(), List< T >::setSize(), UPtrList< T >::size(), List< T >::size(), WarningInFunction, polyBoundaryMesh::whichPatch(), and globalIndex::whichProcID().
Referenced by addPatchCellLayer::globalEdgeFaces(), and addPatchCellLayer::layerFaces().
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, | ||
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 779 of file addPatchCellLayer.C.
References Foam::abort(), PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), Foam::endl(), f(), PrimitivePatch< FaceList, PointField >::faceEdges(), Foam::FatalError, FatalErrorInFunction, UList< T >::fcIndex(), faceZone::flipMap(), forAll, forAllReverse, Foam::gMax(), UList< T >::last(), edge::line(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), Foam::mag(), VectorSpace< Vector< scalar >, scalar, 3 >::max, Foam::max(), PrimitivePatch< FaceList, PointField >::meshEdges(), PrimitivePatch< FaceList, PointField >::meshPoints(), n, PrimitivePatch< FaceList, PointField >::nEdges(), PrimitivePatch< FaceList, PointField >::nInternalEdges(), Foam::nl, PrimitivePatch< FaceList, PointField >::nPoints(), patchi, PrimitivePatch< FaceList, PointField >::points(), polyTopoChange::points(), Foam::Pout, polyTopoChange::setAction(), List< T >::setSize(), List< T >::size(), syncTools::syncEdgeList(), syncTools::syncPointList(), globalIndex::toGlobal(), addPatchCellLayer::updateMesh(), faceZone::whichFace(), and polyBoundaryMesh::whichPatch().
Referenced by snappyLayerDriver::addLayers(), addPatchCellLayer::calcSidePatch(), addPatchCellLayer::layerFaces(), and addPatchCellLayer::setRefinement().
|
inline |
Add with constant expansion ratio and same nLayers everywhere.
Definition at line 357 of file addPatchCellLayer.H.
References Foam::faceMap(), PrimitivePatch< FaceList, PointField >::nPoints(), addPatchCellLayer::operator=(), addPatchCellLayer::setRefinement(), and addPatchCellLayer::updateMesh().
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 1723 of file addPatchCellLayer.C.
References forAll, newPointi, mapPolyMesh::reverseFaceMap(), mapPolyMesh::reversePointMap(), List< T >::setSize(), and List< T >::size().
Referenced by snappyLayerDriver::addLayers(), and addPatchCellLayer::setRefinement().
|
delete |
Disallow default bitwise assignment.
Referenced by addPatchCellLayer::setRefinement().