Data Structures | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
autoLayerDriver Class Reference

All to do with adding layers. More...

Collaboration diagram for autoLayerDriver:
Collaboration graph
[legend]

Data Structures

class  nomalsCombine
 Combine operator class to combine normal with other normal. More...
 

Public Types

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

Public Member Functions

 ClassName ("autoLayerDriver")
 Runtime type information. More...
 
 autoLayerDriver (meshRefinement &meshRefiner, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch)
 Construct from components. More...
 
void mergePatchFacesUndo (const layerParameters &layerParams, const dictionary &motionDict)
 Merge patch faces on same cell. More...
 
void addLayers (const layerParameters &layerParams, const dictionary &motionDict, const labelList &patchIDs, const label nAllowableErrors, decompositionMethod &decomposer, fvMeshDistribute &distributor)
 Add cell layers. More...
 
void doLayers (const dictionary &shrinkDict, const dictionary &motionDict, const layerParameters &layerParams, const bool mergePatchFaces, const bool preBalance, decompositionMethod &decomposer, fvMeshDistribute &distributor)
 Add layers according to the dictionary settings. More...
 

Private Member Functions

void checkMeshManifold () const
 Check that mesh outside is not multiply connected. More...
 
void handleNonManifolds (const indirectPrimitivePatch &pp, const labelList &meshEdges, const labelListList &edgeGlobalFaces, pointField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus) const
 No extrusion at non-manifold points. More...
 
void handleFeatureAngle (const indirectPrimitivePatch &pp, const labelList &meshEdges, const scalar minCos, pointField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus) const
 No extrusion on feature edges. Assumes non-manifold. More...
 
void handleWarpedFaces (const indirectPrimitivePatch &pp, const scalar faceRatio, const scalar edge0Len, const labelList &cellLevel, pointField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus) const
 No extrusion on warped faces. More...
 
void setNumLayers (const labelList &patchToNLayers, const labelList &patchIDs, const indirectPrimitivePatch &pp, pointField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus, label &nIdealAddedCells) const
 Determine the number of layers per point from the number of. More...
 
void growNoExtrusion (const indirectPrimitivePatch &pp, pointField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus) const
 Grow no-extrusion layer. More...
 
void determineSidePatches (const globalIndex &globalFaces, const labelListList &edgeGlobalFaces, const indirectPrimitivePatch &pp, labelList &edgePatchID, labelList &edgeZoneID, boolList &edgeFlip, labelList &inflateFaceID)
 See what zones and patches edges should be extruded into. More...
 
void calculateLayerThickness (const indirectPrimitivePatch &pp, const labelList &patchIDs, const layerParameters &layerParams, const labelList &cellLevel, const labelList &patchNLayers, const scalar edge0Len, scalarField &thickness, scalarField &minThickness, scalarField &expansionRatio) const
 Calculate pointwise wanted and minimum thickness. More...
 
void syncPatchDisplacement (const indirectPrimitivePatch &pp, const scalarField &minThickness, pointField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus) const
 Synchronize displacement among coupled patches. More...
 
void getPatchDisplacement (const indirectPrimitivePatch &pp, const scalarField &thickness, const scalarField &minThickness, pointField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus) const
 Get nearest point on surface to snap to. More...
 
bool sameEdgeNeighbour (const labelListList &globalEdgeFaces, const label myGlobalFaceI, const label nbrGlobFaceI, const label edgeI) const
 For truncateDisplacement: find strings of edges. More...
 
void getVertexString (const indirectPrimitivePatch &pp, const labelListList &globalEdgeFaces, const label faceI, const label edgeI, const label myGlobFaceI, const label nbrGlobFaceI, DynamicList< label > &vertices) const
 For truncateDisplacement: find strings of edges. More...
 
label truncateDisplacement (const globalIndex &globalFaces, const labelListList &edgeGlobalFaces, const indirectPrimitivePatch &pp, const scalarField &minThickness, const faceSet &illegalPatchFaces, pointField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus) const
 Truncates displacement. More...
 
void setupLayerInfoTruncation (const indirectPrimitivePatch &pp, const labelList &patchNLayers, const List< extrudeMode > &extrudeStatus, const label nBufferCellsNoExtrude, labelList &nPatchPointLayers, labelList &nPatchFaceLayers) const
 Setup layer information (at points and faces) to. More...
 
void printLayerData (const fvMesh &mesh, const labelList &patchIDs, const labelList &cellNLayers, const scalarField &faceWantedThickness, const scalarField &faceRealThickness) const
 Print layer coverage table. More...
 
bool writeLayerSets (const fvMesh &mesh, const labelList &cellNLayers, const scalarField &faceRealThickness) const
 Write cellSet,faceSet for layers. More...
 
bool writeLayerData (const fvMesh &mesh, const labelList &patchIDs, const labelList &cellNLayers, const scalarField &faceWantedThickness, const scalarField &faceRealThickness) const
 Write volFields,cellSet,faceSet for layers depending. More...
 
void sumWeights (const PackedBoolList &isMasterEdge, const labelList &meshEdges, const labelList &meshPoints, const edgeList &edges, scalarField &invSumWeight) const
 Calculate inverse sum of edge weights (currently always 1.0) More...
 
void smoothField (const motionSmoother &meshMover, const PackedBoolList &isMasterPoint, const PackedBoolList &isMasterEdge, const labelList &meshEdges, const scalarField &fieldMin, const label nSmoothDisp, scalarField &field) const
 Smooth scalar field on patch. More...
 
void smoothPatchNormals (const motionSmoother &meshMover, const PackedBoolList &isMasterPoint, const PackedBoolList &isMasterEdge, const labelList &meshEdges, const label nSmoothDisp, pointField &normals) const
 Smooth normals on patch. More...
 
void smoothNormals (const label nSmoothDisp, const PackedBoolList &isMasterPoint, const PackedBoolList &isMasterEdge, const labelList &fixedPoints, pointVectorField &normals) const
 Smooth normals in interior. More...
 
void handleFeatureAngleLayerTerminations (const scalar minCos, const PackedBoolList &isMasterPoint, const indirectPrimitivePatch &pp, const labelList &meshEdges, List< extrudeMode > &extrudeStatus, pointField &patchDisp, labelList &patchNLayers, label &nPointCounter) const
 Stop layer growth where mesh wraps around edge with a. More...
 
void findIsolatedRegions (const scalar minCosLayerTermination, const PackedBoolList &isMasterPoint, const PackedBoolList &isMasterEdge, const indirectPrimitivePatch &pp, const labelList &meshEdges, const scalarField &minThickness, List< extrudeMode > &extrudeStatus, pointField &patchDisp, labelList &patchNLayers) const
 Find isolated islands (points, edges and faces and. More...
 
void medialAxisSmoothingInfo (const motionSmoother &meshMover, const label nSmoothNormals, const label nSmoothSurfaceNormals, const scalar minMedialAxisAngleCos, const scalar featureAngle, pointVectorField &dispVec, pointScalarField &medialRatio, pointScalarField &medialDist, pointVectorField &medialVec) const
 
void shrinkMeshMedialDistance (motionSmoother &meshMover, const dictionary &meshQualityDict, const List< labelPair > &baffles, const label nSmoothPatchThickness, const label nSmoothDisplacement, const scalar maxThicknessToMedialRatio, const label nAllowableErrors, const label nSnap, const scalar minCosLayerTermination, const scalarField &layerThickness, const scalarField &minThickness, const pointVectorField &dispVec, const pointScalarField &medialRatio, const pointScalarField &medialDist, const pointVectorField &medialVec, List< extrudeMode > &extrudeStatus, pointField &patchDisp, labelList &patchNLayers) const
 Main routine to shrink mesh. More...
 
 autoLayerDriver (const autoLayerDriver &)
 Disallow default bitwise copy construct. More...
 
void operator= (const autoLayerDriver &)
 Disallow default bitwise assignment. More...
 

Static Private Member Functions

static void dumpDisplacement (const fileName &, const indirectPrimitivePatch &, const vectorField &, const List< extrudeMode > &)
 For debugging: Dump displacement to .obj files. More...
 
static tmp< scalarFieldavgPointData (const indirectPrimitivePatch &, const scalarField &pointFld)
 Average point wise data to face wise. More...
 
static void checkManifold (const indirectPrimitivePatch &, pointSet &nonManifoldPoints)
 Check that primitivePatch is not multiply connected. More...
 
static bool unmarkExtrusion (const label patchPointI, pointField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus)
 Unset extrusion on point. Returns true if anything unset. More...
 
static bool unmarkExtrusion (const face &localFace, pointField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus)
 Unset extrusion on face. Returns true if anything unset. More...
 
static tmp< pointVectorFieldmakeLayerDisplacementField (const pointMesh &pMesh, const labelList &numLayers)
 Helper function to make a pointVectorField with correct. More...
 
static bool cellsUseFace (const polyMesh &mesh, const labelList &cellLabels, const labelHashSet &faces)
 Does any of the cells use a face from faces? More...
 
static label checkAndUnmark (const addPatchCellLayer &addLayer, const dictionary &motionDict, const bool additionalReporting, const List< labelPair > &baffles, const indirectPrimitivePatch &pp, const fvMesh &, pointField &patchDisp, labelList &patchNLayers, List< extrudeMode > &extrudeStatus)
 Checks the newly added cells and locally unmarks points. More...
 
static label countExtrusion (const indirectPrimitivePatch &pp, const List< extrudeMode > &extrudeStatus)
 Count global number of extruded faces. More...
 
static List< labelPairgetBafflesOnAddedMesh (const polyMesh &mesh, const labelList &newToOldFaces, const List< labelPair > &baffles)
 After adding to mesh get the new baffles. More...
 
static void getLayerCellsFaces (const polyMesh &, const addPatchCellLayer &, const scalarField &oldRealThickness, labelList &cellStatus, scalarField &faceRealThickness)
 Collect layer faces and layer cells into bools. More...
 
template<class Type >
static void averageNeighbours (const polyMesh &mesh, const PackedBoolList &isMasterEdge, const labelList &meshEdges, const labelList &meshPoints, const edgeList &edges, const scalarField &invSumWeight, const Field< Type > &data, Field< Type > &average)
 Average field (over all subset of mesh points) by. More...
 

Private Attributes

meshRefinementmeshRefiner_
 Mesh+surface. More...
 
const labelList globalToMasterPatch_
 From surface region to patch. More...
 
const labelList globalToSlavePatch_
 From surface region to patch. More...
 

Detailed Description

All to do with adding layers.

Source files

Definition at line 56 of file autoLayerDriver.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 63 of file autoLayerDriver.H.

Constructor & Destructor Documentation

◆ autoLayerDriver() [1/2]

autoLayerDriver ( const autoLayerDriver )
private

Disallow default bitwise copy construct.

◆ autoLayerDriver() [2/2]

autoLayerDriver ( meshRefinement meshRefiner,
const labelList globalToMasterPatch,
const labelList globalToSlavePatch 
)

Construct from components.

Definition at line 2858 of file autoLayerDriver.C.

Member Function Documentation

◆ dumpDisplacement()

void dumpDisplacement ( const fileName prefix,
const indirectPrimitivePatch pp,
const vectorField patchDisp,
const List< extrudeMode > &  extrudeStatus 
)
staticprivate

For debugging: Dump displacement to .obj files.

Definition at line 75 of file autoLayerDriver.C.

References Foam::endl(), forAll, Foam::Info, PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), OFstream::name(), and OBJstream::write().

Here is the call graph for this function:

◆ avgPointData()

Foam::tmp< Foam::scalarField > avgPointData ( const indirectPrimitivePatch pp,
const scalarField pointFld 
)
staticprivate

Average point wise data to face wise.

Definition at line 107 of file autoLayerDriver.C.

References f(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), and scalarField().

Here is the call graph for this function:

◆ checkManifold()

void checkManifold ( const indirectPrimitivePatch fp,
pointSet nonManifoldPoints 
)
staticprivate

◆ checkMeshManifold()

void checkMeshManifold ( ) const
private

Check that mesh outside is not multiply connected.

Definition at line 160 of file autoLayerDriver.C.

References autoLayerDriver::checkManifold(), Foam::endl(), Foam::Info, mesh, meshRefinement::mesh(), autoLayerDriver::meshRefiner_, Foam::nl, Foam::returnReduce(), and HashTable::size().

Here is the call graph for this function:

◆ unmarkExtrusion() [1/2]

bool unmarkExtrusion ( const label  patchPointI,
pointField patchDisp,
labelList patchNLayers,
List< extrudeMode > &  extrudeStatus 
)
staticprivate

Unset extrusion on point. Returns true if anything unset.

Definition at line 215 of file autoLayerDriver.C.

References Vector< scalar >::zero.

◆ unmarkExtrusion() [2/2]

bool unmarkExtrusion ( const face localFace,
pointField patchDisp,
labelList patchNLayers,
List< extrudeMode > &  extrudeStatus 
)
staticprivate

Unset extrusion on face. Returns true if anything unset.

Definition at line 245 of file autoLayerDriver.C.

References forAll.

◆ handleNonManifolds()

void handleNonManifolds ( const indirectPrimitivePatch pp,
const labelList meshEdges,
const labelListList edgeGlobalFaces,
pointField patchDisp,
labelList patchNLayers,
List< extrudeMode > &  extrudeStatus 
) const
private

◆ handleFeatureAngle()

void handleFeatureAngle ( const indirectPrimitivePatch pp,
const labelList meshEdges,
const scalar  minCos,
pointField patchDisp,
labelList patchNLayers,
List< extrudeMode > &  extrudeStatus 
) const
private

◆ handleWarpedFaces()

void handleWarpedFaces ( const indirectPrimitivePatch pp,
const scalar  faceRatio,
const scalar  edge0Len,
const labelList cellLevel,
pointField patchDisp,
labelList patchNLayers,
List< extrudeMode > &  extrudeStatus 
) const
private

◆ setNumLayers()

void setNumLayers ( const labelList patchToNLayers,
const labelList patchIDs,
const indirectPrimitivePatch pp,
pointField patchDisp,
labelList patchNLayers,
List< extrudeMode > &  extrudeStatus,
label nIdealAddedCells 
) const
private

◆ makeLayerDisplacementField()

Foam::tmp< Foam::pointVectorField > makeLayerDisplacementField ( const pointMesh pMesh,
const labelList numLayers 
)
staticprivate

Helper function to make a pointVectorField with correct.

bcs for layer addition:

  • numLayers > 0 : fixedValue
  • numLayers == 0 : fixedValue (always zero)
  • processor : calculated (so free to move)
  • cyclic/wedge/symmetry : slip
  • other : slip

Definition at line 805 of file autoLayerDriver.C.

References IOobject::AUTO_WRITE, pointMesh::boundary(), Foam::dimLength, forAll, mesh, IOobject::NO_READ, List::size(), PtrList::size(), fvMesh::time(), Time::timeName(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ growNoExtrusion()

void growNoExtrusion ( const indirectPrimitivePatch pp,
pointField patchDisp,
labelList patchNLayers,
List< extrudeMode > &  extrudeStatus 
) const
private

◆ determineSidePatches()

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

See what zones and patches edges should be extruded into.

Definition at line 969 of file autoLayerDriver.C.

References dictionary::add(), polyMesh::boundaryMesh(), addPatchCellLayer::calcExtrudeInfo(), fvMesh::clearOut(), Foam::endl(), forAll, Foam::Info, mesh, UPstream::myProcNo(), Foam::name(), primitiveMesh::nFaces(), Foam::nl, nPatches, Foam::returnReduce(), and PtrList::size().

Here is the call graph for this function:

◆ calculateLayerThickness()

void calculateLayerThickness ( const indirectPrimitivePatch pp,
const labelList patchIDs,
const layerParameters layerParams,
const labelList cellLevel,
const labelList patchNLayers,
const scalar  edge0Len,
scalarField thickness,
scalarField minThickness,
scalarField expansionRatio 
) const
private

◆ syncPatchDisplacement()

void syncPatchDisplacement ( const indirectPrimitivePatch pp,
const scalarField minThickness,
pointField patchDisp,
labelList patchNLayers,
List< extrudeMode > &  extrudeStatus 
) const
private

Synchronize displacement among coupled patches.

Definition at line 1361 of file autoLayerDriver.C.

References forAll, Foam::labelMax, Foam::labelMin, Foam::mag(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), Foam::returnReduce(), Vector< scalar >::rootMax, and syncTools::syncPointList().

Here is the call graph for this function:

◆ getPatchDisplacement()

void getPatchDisplacement ( const indirectPrimitivePatch pp,
const scalarField thickness,
const scalarField minThickness,
pointField patchDisp,
labelList patchNLayers,
List< extrudeMode > &  extrudeStatus 
) const
private

◆ sameEdgeNeighbour()

bool sameEdgeNeighbour ( const labelListList globalEdgeFaces,
const label  myGlobalFaceI,
const label  nbrGlobFaceI,
const label  edgeI 
) const
private

For truncateDisplacement: find strings of edges.

Definition at line 1628 of file autoLayerDriver.C.

References List::size().

Here is the call graph for this function:

◆ getVertexString()

void getVertexString ( const indirectPrimitivePatch pp,
const labelListList globalEdgeFaces,
const label  faceI,
const label  edgeI,
const label  myGlobFaceI,
const label  nbrGlobFaceI,
DynamicList< label > &  vertices 
) const
private

◆ truncateDisplacement()

Foam::label truncateDisplacement ( const globalIndex globalFaces,
const labelListList edgeGlobalFaces,
const indirectPrimitivePatch pp,
const scalarField minThickness,
const faceSet illegalPatchFaces,
pointField patchDisp,
labelList patchNLayers,
List< extrudeMode > &  extrudeStatus 
) const
private

◆ setupLayerInfoTruncation()

void setupLayerInfoTruncation ( const indirectPrimitivePatch pp,
const labelList patchNLayers,
const List< extrudeMode > &  extrudeStatus,
const label  nBufferCellsNoExtrude,
labelList nPatchPointLayers,
labelList nPatchFaceLayers 
) const
private

Setup layer information (at points and faces) to.

modify mesh topology in regions where layer mesh terminates. Guarantees an optional slow decreasing of the number of layers. Returns the number of layers per face and per point to go into the actual layer addition engine.

Definition at line 2042 of file autoLayerDriver.C.

References Foam::endl(), f(), forAll, Foam::gMax(), Foam::Info, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), Foam::max(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), Foam::nl, PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), PrimitivePatch< Face, FaceList, PointField, PointType >::pointFaces(), and syncTools::syncPointList().

Here is the call graph for this function:

◆ cellsUseFace()

bool cellsUseFace ( const polyMesh mesh,
const labelList cellLabels,
const labelHashSet faces 
)
staticprivate

Does any of the cells use a face from faces?

Definition at line 2246 of file autoLayerDriver.C.

References primitiveMesh::cells(), forAll, HashTable::found(), and mesh.

Here is the call graph for this function:

◆ checkAndUnmark()

Foam::label checkAndUnmark ( const addPatchCellLayer addLayer,
const dictionary motionDict,
const bool  additionalReporting,
const List< labelPair > &  baffles,
const indirectPrimitivePatch pp,
const fvMesh newMesh,
pointField patchDisp,
labelList patchNLayers,
List< extrudeMode > &  extrudeStatus 
)
staticprivate

◆ countExtrusion()

Foam::label countExtrusion ( const indirectPrimitivePatch pp,
const List< extrudeMode > &  extrudeStatus 
)
staticprivate

Count global number of extruded faces.

Definition at line 2407 of file autoLayerDriver.C.

References forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), and Foam::returnReduce().

Here is the call graph for this function:

◆ getBafflesOnAddedMesh()

Foam::List< Foam::labelPair > getBafflesOnAddedMesh ( const polyMesh mesh,
const labelList newToOldFaces,
const List< labelPair > &  baffles 
)
staticprivate

After adding to mesh get the new baffles.

Definition at line 2437 of file autoLayerDriver.C.

References Foam::exit(), primitiveMesh::faceCentres(), Foam::FatalError, FatalErrorInFunction, forAll, mesh, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), p, and List::size().

Here is the call graph for this function:

◆ getLayerCellsFaces()

void getLayerCellsFaces ( const polyMesh mesh,
const addPatchCellLayer addLayer,
const scalarField oldRealThickness,
labelList cellStatus,
scalarField faceRealThickness 
)
staticprivate

Collect layer faces and layer cells into bools.

for ease of handling

Definition at line 2499 of file autoLayerDriver.C.

References addPatchCellLayer::addedCells(), forAll, addPatchCellLayer::layerFaces(), mesh, primitiveMesh::nCells(), primitiveMesh::nFaces(), List::setSize(), and List::size().

Here is the call graph for this function:

◆ printLayerData()

void printLayerData ( const fvMesh mesh,
const labelList patchIDs,
const labelList cellNLayers,
const scalarField faceWantedThickness,
const scalarField faceRealThickness 
) const
private

Print layer coverage table.

Definition at line 2554 of file autoLayerDriver.C.

References polyMesh::boundaryMesh(), Foam::endl(), polyPatch::faceCells(), forAll, Foam::Info, Foam::max(), mesh, IOobject::name(), Foam::nl, Foam::reduce(), Foam::setf(), Foam::setprecision(), Foam::setw(), and Foam::sum().

Here is the call graph for this function:

◆ writeLayerSets()

bool writeLayerSets ( const fvMesh mesh,
const labelList cellNLayers,
const scalarField faceRealThickness 
) const
private

◆ writeLayerData()

bool writeLayerData ( const fvMesh mesh,
const labelList patchIDs,
const labelList cellNLayers,
const scalarField faceWantedThickness,
const scalarField faceRealThickness 
) const
private

◆ averageNeighbours()

void averageNeighbours ( const polyMesh mesh,
const PackedBoolList isMasterEdge,
const labelList meshEdges,
const labelList meshPoints,
const edgeList edges,
const scalarField invSumWeight,
const Field< Type > &  data,
Field< Type > &  average 
)
staticprivate

Average field (over all subset of mesh points) by.

summing contribution from edges. Global parallel since only does master edges for coupled edges.

Definition at line 33 of file autoLayerDriverTemplates.C.

References Foam::fvc::average(), Foam::constant::electromagnetic::e, forAll, PackedList::get(), Foam::mag(), Foam::max(), and mesh.

Here is the call graph for this function:

◆ sumWeights()

void sumWeights ( const PackedBoolList isMasterEdge,
const labelList meshEdges,
const labelList meshPoints,
const edgeList edges,
scalarField invSumWeight 
) const
private

Calculate inverse sum of edge weights (currently always 1.0)

◆ smoothField()

void smoothField ( const motionSmoother meshMover,
const PackedBoolList isMasterPoint,
const PackedBoolList isMasterEdge,
const labelList meshEdges,
const scalarField fieldMin,
const label  nSmoothDisp,
scalarField field 
) const
private

Smooth scalar field on patch.

◆ smoothPatchNormals()

void smoothPatchNormals ( const motionSmoother meshMover,
const PackedBoolList isMasterPoint,
const PackedBoolList isMasterEdge,
const labelList meshEdges,
const label  nSmoothDisp,
pointField normals 
) const
private

Smooth normals on patch.

◆ smoothNormals()

void smoothNormals ( const label  nSmoothDisp,
const PackedBoolList isMasterPoint,
const PackedBoolList isMasterEdge,
const labelList fixedPoints,
pointVectorField normals 
) const
private

Smooth normals in interior.

◆ handleFeatureAngleLayerTerminations()

void handleFeatureAngleLayerTerminations ( const scalar  minCos,
const PackedBoolList isMasterPoint,
const indirectPrimitivePatch pp,
const labelList meshEdges,
List< extrudeMode > &  extrudeStatus,
pointField patchDisp,
labelList patchNLayers,
label nPointCounter 
) const
private

Stop layer growth where mesh wraps around edge with a.

large feature angle

◆ findIsolatedRegions()

void findIsolatedRegions ( const scalar  minCosLayerTermination,
const PackedBoolList isMasterPoint,
const PackedBoolList isMasterEdge,
const indirectPrimitivePatch pp,
const labelList meshEdges,
const scalarField minThickness,
List< extrudeMode > &  extrudeStatus,
pointField patchDisp,
labelList patchNLayers 
) const
private

Find isolated islands (points, edges and faces and.

layer terminations) in the layer mesh and stop any layer growth at these points.

◆ medialAxisSmoothingInfo()

void medialAxisSmoothingInfo ( const motionSmoother meshMover,
const label  nSmoothNormals,
const label  nSmoothSurfaceNormals,
const scalar  minMedialAxisAngleCos,
const scalar  featureAngle,
pointVectorField dispVec,
pointScalarField medialRatio,
pointScalarField medialDist,
pointVectorField medialVec 
) const
private

◆ shrinkMeshMedialDistance()

void shrinkMeshMedialDistance ( motionSmoother meshMover,
const dictionary meshQualityDict,
const List< labelPair > &  baffles,
const label  nSmoothPatchThickness,
const label  nSmoothDisplacement,
const scalar  maxThicknessToMedialRatio,
const label  nAllowableErrors,
const label  nSnap,
const scalar  minCosLayerTermination,
const scalarField layerThickness,
const scalarField minThickness,
const pointVectorField dispVec,
const pointScalarField medialRatio,
const pointScalarField medialDist,
const pointVectorField medialVec,
List< extrudeMode > &  extrudeStatus,
pointField patchDisp,
labelList patchNLayers 
) const
private

Main routine to shrink mesh.

◆ operator=()

void operator= ( const autoLayerDriver )
private

Disallow default bitwise assignment.

◆ ClassName()

ClassName ( "autoLayerDriver"  )

Runtime type information.

◆ mergePatchFacesUndo()

void mergePatchFacesUndo ( const layerParameters layerParams,
const dictionary motionDict 
)

◆ addLayers()

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

Add cell layers.

Get baffles in newMesh numbering. Note that we cannot detect

baffles here since the points are duplicated

Definition at line 2924 of file autoLayerDriver.C.

References dictionary::add(), layerParameters::additionalReporting(), DynamicList::append(), surfaceZonesInfo::BAFFLE, polyMesh::boundaryMesh(), polyTopoChange::changeMesh(), fvMesh::clearOut(), PackedList::count(), cpuTime::cpuTimeIncrement(), Foam::degToRad(), layerParameters::dict(), primitiveMesh::edges(), Foam::endl(), f(), f1, Foam::faceMap(), polyMesh::faces(), polyMesh::faceZones(), layerParameters::featureAngle(), layerParameters::finalLayerThicknessRatio(), localPointRegion::findDuplicateFacePairs(), forAll, HashTable::found(), addPatchCellLayer::globalEdgeFaces(), Foam::identity(), Foam::Info, Foam::inplaceReorder(), IOobject::instance(), surfaceZonesInfo::INTERNAL, meshRefinement::LAYERINFO, Foam::mag(), polyTopoChange::makeMesh(), meshRefinement::makePatch(), Foam::max(), layerParameters::maxFaceThicknessRatio(), dictionary::merge(), mesh, meshRefinement::MESH, layerParameters::meshShrinker(), fvMesh::movePoints(), n, OFstream::name(), fvMesh::name(), IOobject::name(), layerParameters::nBufferCellsNoExtrude(), primitiveMesh::nCells(), MeshObject< polyMesh, UpdateableMeshObject, pointMesh >::New(), externalDisplacementMeshMover::New(), primitiveMesh::nFaces(), layerParameters::nGrow(), primitiveMesh::nInternalFaces(), Foam::nl, layerParameters::nLayerIter(), IOobject::NO_READ, nPoints, primitiveMesh::nPoints(), layerParameters::nRelaxedIter(), layerParameters::numLayers(), p, UPstream::parRun(), Time::path(), primitiveMesh::pointEdges(), polyMesh::points(), Foam::reduce(), layerParameters::relativeSizes(), Foam::returnReduce(), motionSmootherAlgo::setDisplacement(), polyMesh::setInstance(), addPatchCellLayer::setRefinement(), List::setSize(), List::size(), PtrList::size(), dictionary::subDict(), meshRefinement::subsetBaffles(), syncTools::syncPointList(), fvMesh::time(), meshRefinement::updateList(), fvMesh::updateMesh(), addPatchCellLayer::updateMesh(), autoPtr::valid(), WarningInFunction, Ostream::write(), OBJstream::write(), fvMesh::write(), meshRefinement::writeLevel(), meshRefinement::WRITEMESH, IOobject::writeOpt(), List::xfer(), and Vector< scalar >::zero.

◆ doLayers()

void doLayers ( const dictionary shrinkDict,
const dictionary motionDict,
const layerParameters layerParams,
const bool  mergePatchFaces,
const bool  preBalance,
decompositionMethod decomposer,
fvMeshDistribute distributor 
)

Field Documentation

◆ meshRefiner_

meshRefinement& meshRefiner_
private

Mesh+surface.

Definition at line 100 of file autoLayerDriver.H.

Referenced by autoLayerDriver::checkMeshManifold().

◆ globalToMasterPatch_

const labelList globalToMasterPatch_
private

From surface region to patch.

Definition at line 103 of file autoLayerDriver.H.

◆ globalToSlavePatch_

const labelList globalToSlavePatch_
private

From surface region to patch.

Definition at line 106 of file autoLayerDriver.H.


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