All to do with adding layers. More...
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< scalarField > | avgPointData (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< pointVectorField > | makeLayerDisplacementField (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< labelPair > | getBafflesOnAddedMesh (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 | |
meshRefinement & | meshRefiner_ |
Mesh+surface. More... | |
const labelList | globalToMasterPatch_ |
From surface region to patch. More... | |
const labelList | globalToSlavePatch_ |
From surface region to patch. More... | |
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 63 of file autoLayerDriver.H.
|
private |
Disallow default bitwise copy construct.
autoLayerDriver | ( | meshRefinement & | meshRefiner, |
const labelList & | globalToMasterPatch, | ||
const labelList & | globalToSlavePatch | ||
) |
Construct from components.
Definition at line 2858 of file autoLayerDriver.C.
|
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().
|
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().
|
staticprivate |
Check that primitivePatch is not multiply connected.
Collect non-manifold points in pointSet.
Definition at line 134 of file autoLayerDriver.C.
References PrimitivePatch< Face, FaceList, PointField, PointType >::checkPointManifold(), Foam::constant::electromagnetic::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), forAll, HashSet< Key, Hash >::insert(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), and List::size().
Referenced by autoLayerDriver::checkMeshManifold().
|
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().
|
staticprivate |
Unset extrusion on point. Returns true if anything unset.
Definition at line 215 of file autoLayerDriver.C.
References Vector< scalar >::zero.
|
staticprivate |
Unset extrusion on face. Returns true if anything unset.
Definition at line 245 of file autoLayerDriver.C.
References forAll.
|
private |
No extrusion at non-manifold points.
Definition at line 276 of file autoLayerDriver.C.
References globalMeshData::coupledPatchMeshEdges(), Foam::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::endl(), forAll, HashTable::found(), polyMesh::globalData(), Foam::Info, HashSet< Key, Hash >::insert(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), primitiveMesh::nEdges(), Foam::nl, PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), Foam::returnReduce(), List::size(), HashTable::size(), and syncTools::syncEdgeList().
|
private |
No extrusion on feature edges. Assumes non-manifold.
edges already handled.
Definition at line 387 of file autoLayerDriver.C.
References Foam::cos(), Foam::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::endl(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceNormals(), forAll, Foam::Info, PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), Vector< scalar >::max, mesh, meshRefinement::MESH, n, primitiveMesh::nEdges(), Foam::nl, Time::path(), autoPtr::reset(), Foam::returnReduce(), syncTools::syncEdgeList(), fvMesh::time(), and autoPtr::valid().
|
private |
No extrusion on warped faces.
Definition at line 506 of file autoLayerDriver.C.
References Foam::endl(), f(), primitiveMesh::faceCentres(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceNormals(), polyMesh::faceOwner(), forAll, Foam::Info, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), Foam::max(), mesh, Foam::min(), n, Foam::nl, points, polyMesh::points(), Foam::returnReduce(), and List::size().
|
private |
Determine the number of layers per point from the number of.
layers per surface.
Definition at line 681 of file autoLayerDriver.C.
References Foam::abort(), polyMesh::boundaryMesh(), Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, Foam::labelMax, Foam::labelMin, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), Foam::max(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPointMap(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), Foam::min(), Foam::nl, Foam::reduce(), List::size(), and syncTools::syncPointList().
|
staticprivate |
Helper function to make a pointVectorField with correct.
bcs for layer addition:
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.
|
private |
Grow no-extrusion layer.
Definition at line 879 of file autoLayerDriver.C.
References Foam::endl(), f(), forAll, Foam::Info, Foam::labelMax, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), Foam::nl, Foam::reduce(), List::size(), syncTools::syncPointList(), List::transfer(), and Vector< scalar >::zero.
|
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().
|
private |
Calculate pointwise wanted and minimum thickness.
thickness: wanted thickness minthickness: when to give up and not extrude Gets per patch parameters and determine pp pointwise parameters.
Definition at line 1073 of file autoLayerDriver.C.
References polyMesh::boundaryMesh(), Foam::endl(), Foam::exit(), layerParameters::expansionRatio(), f(), polyMesh::faceOwner(), Foam::FatalError, FatalErrorInFunction, layerParameters::finalLayerThickness(), layerParameters::firstLayerThickness(), forAll, syncTools::getMasterPoints(), Foam::Info, Foam::labelMin, layerParameters::layerExpansionRatio(), layerParameters::layerThickness(), PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), Foam::max(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPointMap(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), Foam::min(), layerParameters::minThickness(), Foam::nl, PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), layerParameters::numLayers(), patches, layerParameters::relativeSizes(), Foam::returnReduce(), Foam::setf(), Foam::setprecision(), Foam::setw(), syncTools::syncPointList(), and layerParameters::thickness().
|
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().
|
private |
Get nearest point on surface to snap to.
Definition at line 1492 of file autoLayerDriver.C.
References meshRefinement::ATTRACTION, PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::endl(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceNormals(), forAll, Foam::Info, PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), n, Foam::nl, nPoints, PrimitivePatch< Face, FaceList, PointField, PointType >::pointEdges(), PrimitivePatch< Face, FaceList, PointField, PointType >::pointFaces(), PatchTools::pointNormals(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), Foam::Pout, Foam::returnReduce(), Foam::meshTools::visNormal(), and Vector< scalar >::zero.
|
private |
For truncateDisplacement: find strings of edges.
Definition at line 1628 of file autoLayerDriver.C.
References List::size().
|
private |
For truncateDisplacement: find strings of edges.
Definition at line 1648 of file autoLayerDriver.C.
References Foam::abort(), DynamicList::append(), DynamicList::clear(), f(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceEdges(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), forAll, and PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces().
|
private |
Truncates displacement.
all displacement < minThickness gets set to zero
Definition at line 1727 of file autoLayerDriver.C.
References Foam::abort(), PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::endl(), f(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIter(), Foam::Info, primitiveMesh::isInternalFace(), PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), Foam::mag(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPointMap(), IOobject::name(), Foam::nl, face::prevLabel(), Foam::reduce(), List::size(), globalIndex::toGlobal(), and Vector< scalar >::zero.
|
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().
|
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.
|
staticprivate |
Checks the newly added cells and locally unmarks points.
so they will not get extruded next time round. Returns global number of unmarked points (0 if all was fine)
Definition at line 2272 of file autoLayerDriver.C.
References addPatchCellLayer::addedCells(), DynamicField::append(), motionSmootherAlgo::checkMesh(), Foam::endl(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceCentres(), forAll, Foam::identity(), Foam::Info, addPatchCellLayer::layerFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), Foam::max(), Foam::min(), primitiveMesh::nFaces(), Foam::nl, UPstream::nProcs(), Foam::Pout, Foam::returnReduce(), and HashTable::size().
|
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().
|
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().
|
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().
|
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().
|
private |
Write cellSet,faceSet for layers.
Definition at line 2649 of file autoLayerDriver.C.
References Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), IOobject::instance(), mesh, IOobject::name(), primitiveMesh::nInternalFaces(), Foam::returnReduce(), HashTable::size(), and regIOobject::write().
|
private |
Write volFields,cellSet,faceSet for layers depending.
on write level
Definition at line 2712 of file autoLayerDriver.C.
References IOobject::AUTO_WRITE, polyMesh::boundaryMesh(), Foam::decrIndent(), Foam::dimless, Foam::endl(), polyPatch::faceCells(), fld(), forAll, Foam::incrIndent(), Foam::indent(), Foam::Info, mesh, Foam::nl, IOobject::NO_READ, List::size(), fvMesh::time(), Time::timeName(), meshRefinement::WRITELAYERFIELDS, meshRefinement::WRITELAYERSETS, and meshRefinement::writeLevel().
|
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.
|
private |
Calculate inverse sum of edge weights (currently always 1.0)
|
private |
Smooth scalar field on patch.
|
private |
Smooth normals on patch.
|
private |
Smooth normals in interior.
|
private |
Stop layer growth where mesh wraps around edge with a.
large feature angle
|
private |
Find isolated islands (points, edges and faces and.
layer terminations) in the layer mesh and stop any layer growth at these points.
|
private |
|
private |
Main routine to shrink mesh.
|
private |
Disallow default bitwise assignment.
ClassName | ( | "autoLayerDriver" | ) |
Runtime type information.
void mergePatchFacesUndo | ( | const layerParameters & | layerParams, |
const dictionary & | motionDict | ||
) |
Merge patch faces on same cell.
Definition at line 2873 of file autoLayerDriver.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 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.
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.
Definition at line 4263 of file autoLayerDriver.C.
References DynamicList::append(), polyMesh::boundaryMesh(), motionSmootherAlgo::checkMesh(), polyPatch::coupled(), Foam::endl(), polyPatch::faceCells(), polyMesh::faceZones(), forAll, Foam::Info, faceZone::masterCells(), Foam::help::mergePatchFaces(), mesh, patchIdentifier::name(), zone::name(), Foam::name(), primitiveMesh::nCells(), primitiveMesh::nFaces(), Foam::nl, layerParameters::numLayers(), UPstream::parRun(), Foam::returnReduce(), DynamicList::shrink(), List::size(), PtrList::size(), HashTable::size(), faceZone::slaveCells(), and WarningInFunction.
Referenced by main().
|
private |
Mesh+surface.
Definition at line 100 of file autoLayerDriver.H.
Referenced by autoLayerDriver::checkMeshManifold().
|
private |
From surface region to patch.
Definition at line 103 of file autoLayerDriver.H.
|
private |
From surface region to patch.
Definition at line 106 of file autoLayerDriver.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.