All to do with adding layers. More...
#include <snappyLayerDriver.H>
Public Types | |
| enum | extrudeMode { NOEXTRUDE , EXTRUDE , EXTRUDEREMOVE } |
| Extrusion controls. More... | |
Public Member Functions | |
| ClassName ("snappyLayerDriver") | |
| Runtime type information. | |
| snappyLayerDriver (meshRefinement &meshRefiner, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const bool dryRun=false) | |
| Construct from components. | |
| 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. | |
| 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. | |
| void | addLayersSinglePass (const layerParameters &layerParams, const dictionary &motionDict, const labelList &patchIDs, const label nAllowableErrors, decompositionMethod &decomposer, fvMeshDistribute &distributor) |
| For debugging. Can be removed. | |
| 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. | |
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. | |
| 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. | |
| static void | mapFaceZonePoints (meshRefinement &meshRefiner, const mapPolyMesh &map, labelPairList &baffles, labelList &pointToMaster) |
| Map numbering after adding cell layers. | |
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 4618 of file snappyLayerDriver.C.
| ClassName | ( | "snappyLayerDriver" | ) |
| 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 4635 of file snappyLayerDriver.C.
References layerParameters::concaveAngle(), Foam::cos(), Foam::degToRad(), Foam::endl(), localPointRegion::findDuplicateFacePairs(), forAll, Foam::Info, layerParameters::mergePatchFacesAngle(), mesh, and Foam::nl.
Referenced by doLayers().


| 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 3917 of file snappyLayerDriver.C.
References dictionary::add(), layerParameters::additionalReporting(), addProfiling, fvMesh::clearOut(), layerParameters::dict(), Foam::endl(), mapPolyMesh::faceMap(), layerParameters::finalLayerThicknessRatio(), forAll, mapPolyMesh::hasMotionPoints(), Foam::identity(), Foam::Info, IOobject::instance(), meshRefinement::LAYERINFO, Foam::mag(), polyTopoChange::makeMesh(), dictionary::merge(), meshRefinement::MESH, mesh, fvMesh::movePoints(), IOobject::name(), layerParameters::nBufferCellsNoExtrude(), MeshObject< polyMesh, UpdateableMeshObject, pointMesh >::New(), primitiveMesh::nFaces(), layerParameters::nGrow(), primitiveMesh::nInternalFaces(), Foam::nl, p, patchIDs, pp(), mapPolyMesh::preMotionPoints(), IOobjectOption::READ_IF_PRESENT, Foam::returnReduce(), motionSmootherAlgo::setDisplacement(), polyMesh::setInstance(), addPatchCellLayer::setRefinement(), List< T >::setSize(), polyTopoChange::shrink(), UList< T >::size(), dictionary::subDict(), meshRefinement::subsetBaffles(), addPatchCellLayer::updateMesh(), fvMesh::updateMesh(), fvMesh::write(), meshRefinement::writeLevel(), meshRefinement::WRITEMESH, IOobjectOption::writeOpt(), and Foam::Zero.
Referenced by addLayers(), addLayersSinglePass(), and doLayers().


| void addLayers | ( | const layerParameters & | layerParams, |
| const dictionary & | motionDict, | ||
| const labelList & | patchIDs, | ||
| const label | nAllowableErrors, | ||
| decompositionMethod & | decomposer, | ||
| fvMeshDistribute & | distributor ) |
Add cell layers.
Definition at line 4690 of file snappyLayerDriver.C.
References addLayers(), surfaceZonesInfo::BAFFLE, mapPolyMesh::cellMap(), polyTopoChange::changeMesh(), determineSidePatches(), dupFaceZonePoints(), Foam::endl(), EXTRUDE, mapPolyMesh::faceMap(), UList< T >::first(), forAll, HashTable< T, Key, Hash >::found(), addPatchCellLayer::globalEdgeFaces(), Foam::gSum(), mapPolyMesh::hasMotionPoints(), Foam::identity(), Foam::Info, surfaceZonesInfo::INTERNAL, meshRefinement::LAYERINFO, layerParameters::layerThickness(), meshRefinement::makePatch(), mapFaceZonePoints(), Foam::max(), meshRefinement::MESH, mesh, PrimitivePatch< FaceList, PointField >::meshPointMap(), PrimitivePatch< FaceList, PointField >::meshPoints(), Foam::min(), Foam::nl, layerParameters::nLayerIter(), IOobjectOption::NO_READ, NOEXTRUDE, mapPolyMesh::nOldCells(), mapPolyMesh::nOldFaces(), layerParameters::nOuterIter(), nPoints, layerParameters::nRelaxedIter(), List< label >::null(), layerParameters::numLayers(), UPstream::parRun(), patchIDs, pbm, pp(), mapPolyMesh::preMotionPoints(), globalIndex::reset(), List< T >::setSize(), UList< T >::size(), VectorSpace< Form, Cmpt, Ncmpts >::uniform(), meshRefinement::updateList(), 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 41 of file snappyLayerDriverSinglePass.C.
References addLayers(), surfaceZonesInfo::BAFFLE, polyTopoChange::changeMesh(), determineSidePatches(), dupFaceZonePoints(), Foam::endl(), EXTRUDE, mapPolyMesh::faceMap(), UList< T >::first(), forAll, HashTable< T, Key, Hash >::found(), addPatchCellLayer::globalEdgeFaces(), mapPolyMesh::hasMotionPoints(), Foam::identity(), Foam::Info, surfaceZonesInfo::INTERNAL, meshRefinement::LAYERINFO, meshRefinement::makePatch(), mapFaceZonePoints(), meshRefinement::MESH, mesh, Foam::nl, layerParameters::nLayerIter(), IOobjectOption::NO_READ, nPoints, layerParameters::nRelaxedIter(), List< label >::null(), layerParameters::numLayers(), UPstream::parRun(), patchIDs, pbm, pp(), mapPolyMesh::preMotionPoints(), meshRefinement::updateList(), meshRefinement::writeLevel(), meshRefinement::WRITEMESH, and Foam::Zero.
Referenced by doLayers().


| 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 5371 of file snappyLayerDriver.C.
References addLayers(), addLayersSinglePass(), addProfiling, motionSmootherAlgo::checkMesh(), Foam::endl(), forAll, meshRefinement::GEOMETRIC, syncTools::getInternalOrCoupledFaces(), meshRefinement::IGNOREPATCH, Foam::Info, Foam::mag(), faceZone::masterCells(), mergePatchFacesUndo(), mesh, zoneIdentifier::name(), name, Foam::nl, layerParameters::nOuterIter(), UPstream::nProcs(), List< label >::null(), layerParameters::numLayers(), UPstream::parRun(), patchIDs, pp(), UPstream::reduceOr(), Foam::returnReduce(), Foam::returnReduceOr(), bitSet::set(), HashTable< T, Key, Hash >::size(), 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 1279 of file snappyLayerDriver.C.
References dictionary::add(), meshRefinement::appendPatch(), addPatchCellLayer::calcExtrudeInfo(), HashTable< T, Key, Hash >::cfind(), Foam::endl(), forAll, Foam::Info, HashTable< T, Key, Hash >::insert(), meshRefinement::mesh(), mesh, UPstream::myProcNo(), Foam::name(), name, processorPolyPatch::newName(), Foam::nl, nPatches, pp(), Foam::returnReduce(), and polyBoundaryMesh::updateMesh().
Referenced by addLayers(), and addLayersSinglePass().


|
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 3360 of file snappyLayerDriver.C.
References DynamicList< T, SizeMin >::append(), meshRefinement::dupNonManifoldPoints(), Foam::endl(), EXTRUDE, EXTRUDEREMOVE, localPointRegion::findDuplicateFacePairs(), UList< T >::first(), forAll, HashTable< T, Key, Hash >::found(), meshRefinement::getFaceZoneInfo(), Foam::Info, Foam::labelMax, meshRefinement::LAYERINFO, meshRefinement::makePatch(), meshRefinement::MESH, meshRefinement::mesh(), mesh, PrimitivePatch< FaceList, PointField >::meshPoints(), n, OFstream::name(), nPoints, p, patchIDs, pp(), List< T >::setSize(), UList< T >::size(), meshRefinement::subsetBaffles(), syncTools::syncPointList(), meshRefinement::timeName(), meshRefinement::write(), meshRefinement::writeLevel(), OBJstream::writeLine(), meshRefinement::WRITEMESH, and Foam::Zero.
Referenced by addLayers(), addLayersSinglePass(), and snappySnapDriver::doSnap().


|
static |
Map numbering after adding cell layers.
Definition at line 4419 of file snappyLayerDriver.C.
References DynamicList< T, SizeMin >::append(), Foam::exit(), f(), mapPolyMesh::faceMap(), Foam::FatalError, FatalErrorInFunction, HashTable< T, Key, Hash >::find(), forAll, HashTable< T, Key, Hash >::insert(), Foam::invertOneToMany(), meshRefinement::mergeDistance(), Foam::mergePoints(), meshRefinement::mesh(), mesh, Foam::min(), n, mapPolyMesh::pointMap(), Foam::returnReduceOr(), List< T >::setSize(), UList< T >::size(), and List< T >::transfer().
Referenced by addLayers(), addLayersSinglePass(), and snappySnapDriver::doSnap().

