Adds layers of cells to outside of polyPatch. More...
#include <dynamicMesh/addPatchCellLayer.H>
Adds layers of cells to outside of polyPatch.
Call setRefinement with offset vector for every patch point and number of layers per patch face and number of layers per patch point.
point nlayers:
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.
Classes | |
class | uniqueEqOp |
Public Member Functions | |
ClassName ("addPatchCellLayer") | |
Runtime type information.
| |
addPatchCellLayer (const polyMesh &mesh) | |
Construct from mesh.
| |
const labelListList & | addedPoints () const |
Added points per patch point.
| |
const labelListList & | layerFaces () const |
Layer faces per patch face. See above.
| |
labelListList | addedCells () const |
added cells given current mesh & layerfaces.
| |
void | setRefinement (const scalarField &expansionRatio, const indirectPrimitivePatch &pp, const labelList &nFaceLayers, const labelList &nPointLayers, const vectorField &firstLayerDisp, polyTopoChange &meshMod) |
Play commands into polyTopoChange to create layers on top.
| |
void | setRefinement (const label nLayers, const indirectPrimitivePatch &pp, const vectorField &overallDisplacement, polyTopoChange &meshMod) |
Add with constant expansion ratio and same nLayers everywhere.
| |
void | updateMesh (const mapPolyMesh &, const labelList &faceMap, const labelList &pointMap) |
Update any locally stored mesh information. Gets additional.
| |
Static Public Member Functions | |
static labelListList | addedCells (const polyMesh &, const labelListList &layerFaces) |
Helper: get added cells per patch face.
| |
static labelList | calcMeshEdges (const primitiveMesh &mesh, const indirectPrimitivePatch &) |
Per patch edge the corresponding mesh edge.
|
addPatchCellLayer | ( | const polyMesh & | mesh ) |
Construct from mesh.
Definition at line 515 of file addPatchCellLayer.C.
ClassName | ( | "addPatchCellLayer" | ) |
Runtime type information.
const labelListList& addedPoints | ( | ) | const [inline]
|
Added points per patch point.
Definition at line 264 of file addPatchCellLayer.H.
const labelListList& layerFaces | ( | ) | const [inline]
|
Layer faces per patch face. See above.
Definition at line 270 of file addPatchCellLayer.H.
Foam::labelListList addedCells | ( | const polyMesh & | mesh, |
const labelListList & | layerFaces | ||
) | [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 526 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 552 of file addPatchCellLayer.C.
void setRefinement | ( | const scalarField & | expansionRatio, |
const indirectPrimitivePatch & | pp, | ||
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 559 of file addPatchCellLayer.C.
References Foam::abort(), d, PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::endl(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceEdges(), Foam::FatalError, FatalErrorIn, UList< T >::fcIndex(), faceZone::flipMap(), forAll, forAllReverse, wallPoint::greatPoint, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), Foam::mag(), Foam::max(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), PrimitivePatch< Face, FaceList, PointField, PointType >::nInternalEdges(), Foam::nl, PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), Foam::Pout, polyTopoChange::setAction(), List< T >::setSize(), List< T >::size(), syncTools::syncEdgeList(), syncTools::syncPointList(), faceZone::whichFace(), and polyBoundaryMesh::whichPatch().
Referenced by autoLayerDriver::addLayers(), and addPatchCellLayer::setRefinement().
void setRefinement | ( | const label | nLayers, |
const indirectPrimitivePatch & | pp, | ||
const vectorField & | overallDisplacement, | ||
polyTopoChange & | meshMod | ||
) | [inline]
|
Add with constant expansion ratio and same nLayers everywhere.
Definition at line 320 of file addPatchCellLayer.H.
References 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 1400 of file addPatchCellLayer.C.
References forAll, mapPolyMesh::reverseFaceMap(), mapPolyMesh::reversePointMap(), List< T >::setSize(), and List< T >::size().
Referenced by autoLayerDriver::addLayers().
Foam::labelList calcMeshEdges | ( | const primitiveMesh & | mesh, |
const indirectPrimitivePatch & | pp | ||
) | [static]
|
Per patch edge the corresponding mesh edge.
Definition at line 1463 of file addPatchCellLayer.C.
References primitiveMesh::edges(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::meshTools::findEdge(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), primitiveMesh::pointEdges(), and v1.