Adds layers of cells to outside of polyPatch. Can optionally create stand-alone extruded mesh (addToMesh=false). More...
Public Member Functions | |
ClassName ("addPatchCellLayer") | |
addPatchCellLayer (const polyMesh &, const bool addToMesh=true) | |
const labelListList & | addedPoints () const |
const labelListList & | layerFaces () const |
labelListList | addedCells () const |
void | setRefinement (const globalIndex &globalFaces, const labelListList &globalEdgeFaces, const scalarField &expansionRatio, const indirectPrimitivePatch &pp, 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) |
void | setRefinement (const globalIndex &globalFaces, const labelListList &globalEdgeFaces, const label nLayers, const indirectPrimitivePatch &pp, const labelList &sidePatchID, const vectorField &overallDisplacement, polyTopoChange &meshMod) |
void | updateMesh (const mapPolyMesh &, const labelList &faceMap, const labelList &pointMap) |
Static Public Member Functions | |
static labelListList | addedCells (const polyMesh &, const labelListList &layerFaces) |
static labelListList | globalEdgeFaces (const polyMesh &, const globalIndex &globalFaces, const indirectPrimitivePatch &pp) |
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) |
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 |
Definition at line 592 of file addPatchCellLayer.C.
ClassName | ( | "addPatchCellLayer" | ) |
|
inline |
Definition at line 303 of file addPatchCellLayer.H.
|
inline |
Definition at line 309 of file addPatchCellLayer.H.
|
static |
Definition at line 607 of file addPatchCellLayer.C.
References polyMesh::faceNeighbour(), forAll, mesh, and List::setSize().
Foam::labelListList addedCells | ( | ) | const |
Definition at line 633 of file addPatchCellLayer.C.
|
static |
Definition at line 640 of file addPatchCellLayer.C.
References PrimitivePatch< FaceList, PointField >::edgeFaces(), primitiveMesh::edges(), forAll, mesh, PrimitivePatch< FaceList, PointField >::meshEdges(), primitiveMesh::nEdges(), primitiveMesh::pointEdges(), List::setSize(), syncTools::syncEdgeList(), and globalIndex::toGlobal().
Referenced by snappyLayerDriver::addLayers(), and addPatchCellLayer::setRefinement().
|
static |
Definition at line 1083 of file addPatchCellLayer.C.
References polyMesh::boundaryMesh(), globalMeshData::coupledPatch(), Foam::expressions::patchExpr::debug, Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edgeFaces(), primitiveMesh::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), primitiveMesh::edges(), Foam::endl(), forAll, found, polyMesh::globalData(), globalMeshData::globalEdgeSlaves(), globalMeshData::globalEdgeSlavesMap(), globalMeshData::globalEdgeTransformedSlaves(), globalMeshData::globalTransforms(), primitiveMesh::isInternalFace(), globalIndex::isLocal(), k, PatchTools::matchEdges(), mesh, PrimitivePatch< FaceList, PointField >::meshEdges(), PrimitivePatch< FaceList, PointField >::meshPoints(), UPstream::myProcNo(), PrimitivePatch< FaceList, PointField >::nEdges(), nPatches, UPstream::parRun(), patches, primitiveMesh::pointEdges(), PrimitivePatch< FaceList, PointField >::points(), ProcessorTopology< Container, ProcPatch >::procPatchMap(), List::setSize(), globalMeshData::syncData(), globalIndex::toLocal(), 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 & | sideZoneID, | ||
const boolList & | sideFlip, | ||
const labelList & | inflateFaceID, | ||
const labelList & | exposedPatchID, | ||
const labelList & | nFaceLayers, | ||
const labelList & | nPointLayers, | ||
const vectorField & | firstLayerDisp, | ||
polyTopoChange & | meshMod | ||
) |
Definition at line 1411 of file addPatchCellLayer.C.
References Foam::abort(), Foam::expressions::patchExpr::debug, Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), Foam::endl(), f(), PrimitivePatch< FaceList, PointField >::faceEdges(), Foam::FatalError, FatalErrorInFunction, faceZone::flipMap(), forAll, forAllReverse, Foam::gMax(), HashSet::insert(), 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(), patches, patchID, PrimitivePatch< FaceList, PointField >::points(), polyTopoChange::points(), Foam::Pout, polyTopoChange::setAction(), List::setSize(), syncTools::syncEdgeList(), syncTools::syncPointList(), globalIndex::toGlobal(), faceZone::whichFace(), polyBoundaryMesh::whichPatch(), and Foam::Zero.
Referenced by snappyLayerDriver::addLayers(), and addPatchCellLayer::setRefinement().
|
inline |
Definition at line 413 of file addPatchCellLayer.H.
References addPatchCellLayer::globalEdgeFaces(), PrimitivePatch< FaceList, PointField >::nEdges(), PrimitivePatch< FaceList, PointField >::nPoints(), and addPatchCellLayer::setRefinement().
void updateMesh | ( | const mapPolyMesh & | morphMap, |
const labelList & | faceMap, | ||
const labelList & | pointMap | ||
) |
Definition at line 2372 of file addPatchCellLayer.C.
References Foam::faceMap(), forAll, newPointi, mapPolyMesh::reverseFaceMap(), mapPolyMesh::reversePointMap(), and List::setSize().
Referenced by snappyLayerDriver::addLayers().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.