snappyLayerDriver Class Reference

All to do with adding layers. More...

Public Types

enum  extrudeMode { NOEXTRUDE, EXTRUDE, EXTRUDEREMOVE }
 Extrusion controls. More...
 

Public Member Functions

 ClassName ("snappyLayerDriver")
 Runtime type information. More...
 
 snappyLayerDriver (meshRefinement &meshRefiner, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const bool dryRun=false)
 Construct from components. More...
 
label mergePatchFacesUndo (const layerParameters &layerParams, const dictionary &motionDict, const meshRefinement::FaceMergeType mergeType)
 Merge patch faces on same cell. Return total number of faces/edges changed. More...
 
void addLayers (const layerParameters &layerParams, const label nLayerIter, const dictionary &motionDict, const label nRelaxedIter, const label nAllowableErrors, const labelList &patchIDs, const labelList &internalFaceZones, const List< labelPair > &baffles, const labelList &numLayers, const label nIdealTotAddedCells, const globalIndex &globalFaces, indirectPrimitivePatch &pp, const labelListList &edgeGlobalFaces, const labelList &edgePatchID, const labelList &edgeZoneID, const boolList &edgeFlip, const labelList &inflateFaceID, const scalarField &thickness, const scalarIOField &minThickness, const scalarField &expansionRatio, vectorField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus, polyTopoChange &savedMeshMod, labelList &cellNLayers, scalarField &faceRealThickness)
 
void addLayers (const layerParameters &layerParams, const dictionary &motionDict, const labelList &patchIDs, const label nAllowableErrors, decompositionMethod &decomposer, fvMeshDistribute &distributor)
 Add cell layers. More...
 
void addLayersSinglePass (const layerParameters &layerParams, const dictionary &motionDict, const labelList &patchIDs, const label nAllowableErrors, decompositionMethod &decomposer, fvMeshDistribute &distributor)
 For debugging. Can be removed. More...
 
void doLayers (const dictionary &shrinkDict, const dictionary &motionDict, const layerParameters &layerParams, const meshRefinement::FaceMergeType mergeType, const bool preBalance, decompositionMethod &decomposer, fvMeshDistribute &distributor)
 Add layers according to the dictionary settings. More...
 

Static Public Member Functions

static void determineSidePatches (meshRefinement &meshRefiner, const globalIndex &globalFaces, const labelListList &edgeGlobalFaces, const indirectPrimitivePatch &pp, labelList &edgePatchID, labelList &edgeZoneID, boolList &edgeFlip, labelList &inflateFaceID)
 Helper: see what zones and patches edges should be extruded into. More...
 
static autoPtr< mapPolyMeshdupFaceZonePoints (meshRefinement &meshRefiner, const labelList &patchIDs, const labelList &numLayers, List< labelPair > baffles, labelList &pointToMaster)
 Duplicate points on faceZones with layers. Re-used when adding buffer layers. Can be made private again once multi-side layer addition working. More...
 
static void mapFaceZonePoints (meshRefinement &meshRefiner, const mapPolyMesh &map, labelPairList &baffles, labelList &pointToMaster)
 Map numbering after adding cell layers. More...
 

Detailed Description

All to do with adding layers.

Source files

Definition at line 58 of file snappyLayerDriver.H.

Member Enumeration Documentation

◆ extrudeMode

Extrusion controls.

Enumerator
NOEXTRUDE 

Do not extrude. No layers added.

EXTRUDE 

Extrude.

EXTRUDEREMOVE 

Extrude but afterwards remove added faces locally

Definition at line 67 of file snappyLayerDriver.H.

Constructor & Destructor Documentation

◆ snappyLayerDriver()

snappyLayerDriver ( meshRefinement meshRefiner,
const labelList globalToMasterPatch,
const labelList globalToSlavePatch,
const bool  dryRun = false 
)

Construct from components.

Definition at line 4619 of file snappyLayerDriver.C.

Member Function Documentation

◆ ClassName()

ClassName ( "snappyLayerDriver"  )

Runtime type information.

◆ mergePatchFacesUndo()

Foam::label mergePatchFacesUndo ( const layerParameters layerParams,
const dictionary motionDict,
const meshRefinement::FaceMergeType  mergeType 
)

Merge patch faces on same cell. Return total number of faces/edges changed.

Definition at line 4636 of file snappyLayerDriver.C.

References layerParameters::concaveAngle(), Foam::cos(), Foam::degToRad(), Foam::endl(), localPointRegion::findDuplicateFacePairs(), forAll, Foam::Info, layerParameters::mergePatchFacesAngle(), mesh, primitiveMesh::nFaces(), and Foam::nl.

Here is the call graph for this function:

◆ addLayers() [1/2]

void addLayers ( const layerParameters layerParams,
const label  nLayerIter,
const dictionary motionDict,
const label  nRelaxedIter,
const label  nAllowableErrors,
const labelList patchIDs,
const labelList internalFaceZones,
const List< labelPair > &  baffles,
const labelList numLayers,
const label  nIdealTotAddedCells,
const globalIndex globalFaces,
indirectPrimitivePatch pp,
const labelListList edgeGlobalFaces,
const labelList edgePatchID,
const labelList edgeZoneID,
const boolList edgeFlip,
const labelList inflateFaceID,
const scalarField thickness,
const scalarIOField minThickness,
const scalarField expansionRatio,
vectorField patchDisp,
labelList patchNLayers,
List< extrudeMode > &  extrudeStatus,
polyTopoChange savedMeshMod,
labelList cellNLayers,
scalarField faceRealThickness 
)

Get baffles in newMesh numbering. Note that we cannot detect

baffles here since the points are duplicated

Definition at line 3918 of file snappyLayerDriver.C.

References layerParameters::additionalReporting(), addProfiling, fvMesh::clearOut(), Foam::ensightOutput::debug, layerParameters::dict(), Foam::endl(), mapPolyMesh::faceMap(), layerParameters::finalLayerThicknessRatio(), forAll, mapPolyMesh::hasMotionPoints(), Foam::identity(), Foam::Info, meshRefinement::LAYERINFO, PrimitivePatch< FaceList, PointField >::localPoints(), Foam::mag(), polyTopoChange::makeMesh(), dictionary::merge(), mesh, meshRefinement::MESH, fvMesh::movePoints(), PrimitivePatch< FaceList, PointField >::movePoints(), polyMesh::moving(), fvMesh::name(), IOobject::name(), layerParameters::nBufferCellsNoExtrude(), MeshObject< polyMesh, UpdateableMeshObject, pointMesh >::New(), primitiveMesh::nFaces(), layerParameters::nGrow(), primitiveMesh::nInternalFaces(), Foam::nl, PrimitivePatch< FaceList, PointField >::nPoints(), p, patchIDs, Time::path(), polyMesh::points(), pp(), mapPolyMesh::preMotionPoints(), IOobjectOption::READ_IF_PRESENT, Foam::returnReduce(), motionSmootherAlgo::setDisplacement(), polyMesh::setInstance(), addPatchCellLayer::setRefinement(), FixedList< T, N >::setSize(), polyTopoChange::shrink(), UList< T >::size(), dictionary::subDict(), meshRefinement::subsetBaffles(), fvMesh::time(), addPatchCellLayer::updateMesh(), fvMesh::updateMesh(), Ostream::write(), fvMesh::write(), meshRefinement::writeLevel(), meshRefinement::WRITEMESH, and Foam::Zero.

Here is the call graph for this function:

◆ addLayers() [2/2]

void addLayers ( const layerParameters layerParams,
const dictionary motionDict,
const labelList patchIDs,
const label  nAllowableErrors,
decompositionMethod decomposer,
fvMeshDistribute distributor 
)

Add cell layers.

Definition at line 4691 of file snappyLayerDriver.C.

References surfaceZonesInfo::BAFFLE, polyMesh::boundaryMesh(), mapPolyMesh::cellMap(), fvMesh::clearOut(), Foam::ensightOutput::debug, Foam::endl(), mapPolyMesh::faceMap(), polyMesh::faceZones(), forAll, HashTable< T, Key, Hash >::found(), addPatchCellLayer::globalEdgeFaces(), Foam::gSum(), mapPolyMesh::hasMotionPoints(), Foam::identity(), Foam::Info, surfaceZonesInfo::INTERNAL, meshRefinement::LAYERINFO, layerParameters::layerThickness(), meshRefinement::makePatch(), Foam::max(), mesh, meshRefinement::MESH, PrimitivePatch< FaceList, PointField >::meshPointMap(), PrimitivePatch< FaceList, PointField >::meshPoints(), Foam::min(), fvMesh::movePoints(), polyMesh::moving(), IOobject::name(), primitiveMesh::nCells(), primitiveMesh::nFaces(), Foam::nl, layerParameters::nLayerIter(), IOobjectOption::NO_READ, mapPolyMesh::nOldCells(), mapPolyMesh::nOldFaces(), layerParameters::nOuterIter(), nPoints, PrimitivePatch< FaceList, PointField >::nPoints(), layerParameters::nRelaxedIter(), List< label >::null(), layerParameters::numLayers(), UPstream::parRun(), patchIDs, Time::path(), pbm, pp(), mapPolyMesh::preMotionPoints(), mapPolyMesh::reverseFaceMap(), polyMesh::setInstance(), List< T >::setSize(), UList< T >::size(), UPtrList< T >::size(), fvMesh::time(), meshRefinement::updateList(), fvMesh::updateMesh(), Ostream::write(), meshRefinement::writeLevel(), meshRefinement::WRITEMESH, and Foam::Zero.

Here is the call graph for this function:

◆ addLayersSinglePass()

void addLayersSinglePass ( const layerParameters layerParams,
const dictionary motionDict,
const labelList patchIDs,
const label  nAllowableErrors,
decompositionMethod decomposer,
fvMeshDistribute distributor 
)

◆ doLayers()

◆ determineSidePatches()

void determineSidePatches ( meshRefinement meshRefiner,
const globalIndex globalFaces,
const labelListList edgeGlobalFaces,
const indirectPrimitivePatch pp,
labelList edgePatchID,
labelList edgeZoneID,
boolList edgeFlip,
labelList inflateFaceID 
)
static

◆ dupFaceZonePoints()

◆ mapFaceZonePoints()


The documentation for this class was generated from the following files: