Adds layers of cells to outside of polyPatch. Can optionally create stand-alone extruded mesh (addToMesh=false). More...
Data Structures | |
class | uniqueEqOp |
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 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. Uses. 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... | |
Private Member Functions | |
bool | sameEdgeNeighbour (const indirectPrimitivePatch &pp, const labelListList &globalEdgeFaces, const boolList &doneEdge, const label thisGlobalFaceI, const label nbrGlobalFaceI, const label edgeI) const |
labelPair | getEdgeString (const indirectPrimitivePatch &pp, const labelListList &globalEdgeFaces, const boolList &doneEdge, const label patchFaceI, const label globalFaceI) const |
label | addSideFace (const indirectPrimitivePatch &, const labelListList &addedCells, const face &newFace, const label newPatchID, const label newZoneI, const bool newFlip, const label inflateFaceI, const label ownFaceI, const label nbrFaceI, const label meshEdgeI, const label layerI, const label numEdgeFaces, const labelList &meshFaces, polyTopoChange &) const |
Add face between layer-1 and layer. More... | |
addPatchCellLayer (const addPatchCellLayer &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const addPatchCellLayer &) |
Disallow default bitwise assignment. More... | |
Static Private Member Functions | |
static label | nbrFace (const labelListList &edgeFaces, const label edgeI, const label faceI) |
Get the face on the other side of the edge. More... | |
static void | addVertex (const label, face &, label &fp) |
Add vertex to face if unique. More... | |
static label | findProcPatch (const polyMesh &, const label nbrProcID) |
Find patch to neighbouring processor. More... | |
static void | setFaceProps (const polyMesh &, const label, label &, label &, bool &) |
Extract properties from mesh face. More... | |
static void | setFaceProps (const polyMesh &mesh, const indirectPrimitivePatch &pp, const label ppEdgeI, const label faceI, label &patchI, label &zoneI, bool &zoneFlip, label &inflateFaceI) |
Extract properties from mesh face in pp edge ordering. More... | |
static void | findZoneFace (const bool useInternalFaces, const bool useBoundaryFaces, const polyMesh &mesh, const indirectPrimitivePatch &pp, const label ppEdgeI, const UIndirectList< label > &excludeFaces, const labelList &meshFaces, label &inflateFaceI, label &patchI, label &zoneI, bool &zoneFlip) |
Find internal or boundary face to get extrude properties. More... | |
Private Attributes | |
const polyMesh & | mesh_ |
Reference to mesh. More... | |
const bool | addToMesh_ |
Add layers to existing mesh or create new mesh. More... | |
labelListList | addedPoints_ |
For all patchpoints: list of added points (size 0 or nLayers) More... | |
labelListList | layerFaces_ |
For all patchfaces: list of layer faces. 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.
|
private |
Disallow default bitwise copy construct.
addPatchCellLayer | ( | const polyMesh & | mesh, |
const bool | addToMesh = true |
||
) |
Construct from mesh.
Definition at line 569 of file addPatchCellLayer.C.
|
staticprivate |
Get the face on the other side of the edge.
Definition at line 51 of file addPatchCellLayer.C.
References List::size().
Add vertex to face if unique.
Definition at line 71 of file addPatchCellLayer.C.
References f().
|
private |
Definition at line 94 of file addPatchCellLayer.C.
References Foam::constant::electromagnetic::e, and PrimitivePatch< Face, FaceList, PointField, PointType >::edges().
|
private |
Definition at line 122 of file addPatchCellLayer.C.
References Foam::constant::electromagnetic::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceEdges(), and forAll.
|
private |
Add face between layer-1 and layer.
Definition at line 227 of file addPatchCellLayer.C.
References forAll, polyTopoChange::setAction(), and List::size().
|
staticprivate |
Find patch to neighbouring processor.
Definition at line 393 of file addPatchCellLayer.C.
|
staticprivate |
Extract properties from mesh face.
Definition at line 418 of file addPatchCellLayer.C.
References mesh.
|
staticprivate |
Extract properties from mesh face in pp edge ordering.
Definition at line 438 of file addPatchCellLayer.C.
References Foam::constant::electromagnetic::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::exit(), f(), Foam::FatalError, FatalErrorInFunction, forAll, found, edge::line(), mesh, and PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints().
|
staticprivate |
Find internal or boundary face to get extrude properties.
from. zoneFlip consistent with ppEdge ordering
Definition at line 509 of file addPatchCellLayer.C.
References Foam::findIndex(), forAll, k, and mesh.
|
private |
Disallow default bitwise assignment.
ClassName | ( | "addPatchCellLayer" | ) |
Runtime type information.
|
inline |
Added points per patch point.
Definition at line 306 of file addPatchCellLayer.H.
References addPatchCellLayer::addedPoints_.
Referenced by main().
|
inline |
Layer faces per patch face. See above.
Definition at line 312 of file addPatchCellLayer.H.
References addPatchCellLayer::layerFaces_.
Referenced by autoLayerDriver::checkAndUnmark(), autoLayerDriver::getLayerCellsFaces(), and main().
|
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 584 of file addPatchCellLayer.C.
References forAll, mesh, List::setSize(), and List::size().
Referenced by main().
Foam::labelListList addedCells | ( | ) | const |
Added cells given current mesh & layerfaces.
Definition at line 610 of file addPatchCellLayer.C.
References addPatchCellLayer::layerFaces_, and addPatchCellLayer::mesh_.
Referenced by autoLayerDriver::checkAndUnmark(), and autoLayerDriver::getLayerCellsFaces().
|
static |
Per patch edge the pp faces (in global indices) using it. Uses.
uniqueEqOp() to remove duplicates.
Definition at line 618 of file addPatchCellLayer.C.
References PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), primitiveMesh::edges(), forAll, mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshEdges(), primitiveMesh::nEdges(), primitiveMesh::pointEdges(), List::setSize(), List::size(), syncTools::syncEdgeList(), and globalIndex::toGlobal().
Referenced by autoLayerDriver::addLayers(), main(), and addPatchCellLayer::setRefinement().
|
static |
Determine extrude information per patch edge:
patchID : get patch from any boundary face connected to the edge. The patch 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 663 of file addPatchCellLayer.C.
References polyMesh::boundaryMesh(), globalMeshData::coupledPatch(), Foam::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), primitiveMesh::edgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), primitiveMesh::edges(), Foam::endl(), f1, Foam::findIndex(), forAll, polyMesh::globalData(), globalMeshData::globalEdgeSlaves(), globalMeshData::globalEdgeSlavesMap(), globalMeshData::globalEdgeTransformedSlaves(), globalMeshData::globalTransforms(), primitiveMesh::isInternalFace(), globalIndex::isLocal(), k, PatchTools::matchEdges(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshEdges(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), UPstream::myProcNo(), PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), nPatches, UPstream::parRun(), patches, primitiveMesh::pointEdges(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), ProcessorTopology< Container, ProcPatch >::procPatchMap(), List::setSize(), List::size(), globalMeshData::syncData(), WarningInFunction, and globalIndex::whichProcID().
Referenced by autoLayerDriver::determineSidePatches(), and main().
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 | ||
) |
Play commands into polyTopoChange to create layers on top.
of indirectPrimitivePatch (have to be outside faces). Gets displacement per patch point.
Definition at line 1008 of file addPatchCellLayer.C.
References Foam::abort(), Foam::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::endl(), f(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceEdges(), Foam::FatalError, FatalErrorInFunction, faceZone::flipMap(), forAll, forAllReverse, Foam::gMax(), HashSet< Key, Hash >::insert(), PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), Foam::mag(), Vector< scalar >::max, Foam::max(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshEdges(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), n, PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), PrimitivePatch< Face, FaceList, PointField, PointType >::nInternalEdges(), Foam::nl, PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), patches, PrimitivePatch< Face, FaceList, PointField, PointType >::points(), polyTopoChange::points(), Foam::Pout, polyTopoChange::setAction(), List::setSize(), List::size(), syncTools::syncEdgeList(), syncTools::syncPointList(), globalIndex::toGlobal(), and faceZone::whichFace().
Referenced by autoLayerDriver::addLayers(), main(), and addPatchCellLayer::setRefinement().
|
inline |
Add with constant expansion ratio and same nLayers everywhere.
Definition at line 416 of file addPatchCellLayer.H.
References addPatchCellLayer::globalEdgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), 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 1972 of file addPatchCellLayer.C.
References Foam::faceMap(), forAll, mapPolyMesh::reverseFaceMap(), mapPolyMesh::reversePointMap(), List::setSize(), and List::size().
Referenced by autoLayerDriver::addLayers(), and main().
|
private |
Reference to mesh.
Definition at line 164 of file addPatchCellLayer.H.
Referenced by addPatchCellLayer::addedCells().
|
private |
Add layers to existing mesh or create new mesh.
Definition at line 167 of file addPatchCellLayer.H.
|
private |
For all patchpoints: list of added points (size 0 or nLayers)
First point in list is one nearest to original point in patch, last one is the new point on the surface.
Definition at line 172 of file addPatchCellLayer.H.
Referenced by addPatchCellLayer::addedPoints().
|
private |
For all patchfaces: list of layer faces.
first face is original boundary face
Definition at line 178 of file addPatchCellLayer.H.
Referenced by addPatchCellLayer::addedCells(), and addPatchCellLayer::layerFaces().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.