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< mapPolyMesh > | dupFaceZonePoints (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... | |
All to do with adding layers.
Definition at line 58 of file snappyLayerDriver.H.
| enum 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.
| snappyLayerDriver | ( | meshRefinement & | meshRefiner, |
| const labelList & | globalToMasterPatch, | ||
| const labelList & | globalToSlavePatch, | ||
| const bool | dryRun = false |
||
| ) |
Construct from components.
Definition at line 4619 of file snappyLayerDriver.C.
| ClassName | ( | "snappyLayerDriver" | ) |
Runtime type information.
| 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.

| 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.

| 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.

| void addLayersSinglePass | ( | const layerParameters & | layerParams, |
| const dictionary & | motionDict, | ||
| const labelList & | patchIDs, | ||
| const label | nAllowableErrors, | ||
| decompositionMethod & | decomposer, | ||
| fvMeshDistribute & | distributor | ||
| ) |
For debugging. Can be removed.
Definition at line 42 of file snappyLayerDriverSinglePass.C.
References Foam::ensightOutput::debug, Foam::endl(), mapPolyMesh::faceMap(), forAll, HashTable< T, Key, Hash >::found(), mapPolyMesh::hasMotionPoints(), Foam::identity(), Foam::Info, mesh, Foam::nl, layerParameters::nLayerIter(), nPoints, layerParameters::nRelaxedIter(), layerParameters::numLayers(), patchIDs, pbm, pp(), mapPolyMesh::preMotionPoints(), Ostream::write(), and Foam::Zero.

| 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.
Definition at line 5372 of file snappyLayerDriver.C.
References addProfiling, List< T >::append(), polyMesh::boundaryMesh(), motionSmootherAlgo::checkMesh(), Foam::endl(), polyMesh::faceZones(), forAll, syncTools::getInternalOrCoupledFaces(), Foam::Info, Foam::mag(), faceZone::masterCells(), mesh, zoneIdentifier::name(), Foam::name(), primitiveMesh::nCells(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, layerParameters::nOuterIter(), UPstream::nProcs(), List< label >::null(), layerParameters::numLayers(), UPstream::parRun(), patchIDs, pp(), UPstream::reduceOr(), Foam::returnReduce(), Foam::returnReduceOr(), UList< T >::size(), UPtrList< T >::size(), faceZone::slaveCells(), Foam::sum(), bitSet::test(), and WarningInFunction.

|
static |
Helper: see what zones and patches edges should be extruded into.
Definition at line 1280 of file snappyLayerDriver.C.
References dictionary::add(), meshRefinement::appendPatch(), polyMesh::boundaryMesh(), addPatchCellLayer::calcExtrudeInfo(), HashTable< T, Key, Hash >::cfind(), fvMesh::clearOut(), Foam::endl(), forAll, Foam::Info, HashTable< T, Key, Hash >::insert(), mesh, meshRefinement::mesh(), UPstream::myProcNo(), Foam::name(), processorPolyPatch::newName(), primitiveMesh::nFaces(), Foam::nl, nPatches, pp(), Foam::returnReduce(), and UPtrList< T >::size().

|
static |
Duplicate points on faceZones with layers. Re-used when adding buffer layers. Can be made private again once multi-side layer addition working.
Definition at line 3361 of file snappyLayerDriver.C.
References Foam::ensightOutput::debug, meshRefinement::dupNonManifoldPoints(), Foam::endl(), polyMesh::faceZones(), localPointRegion::findDuplicateFacePairs(), UList< T >::first(), forAll, UList< T >::found(), meshRefinement::getFaceZoneInfo(), Foam::Info, Foam::labelMax, meshRefinement::LAYERINFO, meshRefinement::makePatch(), mesh, meshRefinement::MESH, meshRefinement::mesh(), PrimitivePatch< FaceList, PointField >::meshPoints(), n, IOobject::name(), nPoints, primitiveMesh::nPoints(), p, patchIDs, Time::path(), polyMesh::points(), pp(), List< T >::setSize(), UList< T >::size(), UPtrList< T >::size(), meshRefinement::subsetBaffles(), syncTools::syncPointList(), fvMesh::time(), meshRefinement::timeName(), meshRefinement::write(), meshRefinement::writeLevel(), meshRefinement::WRITEMESH, and Foam::Zero.
Referenced by snappySnapDriver::doSnap().


|
static |
Map numbering after adding cell layers.
Definition at line 4420 of file snappyLayerDriver.C.
References List< T >::append(), Foam::exit(), f(), primitiveMesh::faceCentres(), mapPolyMesh::faceMap(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, UList< T >::find(), forAll, Foam::invertOneToMany(), meshRefinement::mergeDistance(), Foam::mergePoints(), mesh, meshRefinement::mesh(), Foam::min(), n, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), primitiveMesh::nPoints(), mapPolyMesh::pointMap(), polyMesh::points(), Foam::returnReduceOr(), FixedList< T, N >::setSize(), List< T >::setSize(), UList< T >::size(), and List< T >::transfer().
Referenced by snappySnapDriver::doSnap().

