Helper class which maintains intersections of (changing) mesh with (static) surfaces. More...
Public Types | |
enum | IOdebugType { IOMESH, IOOBJINTERSECTIONS, IOFEATURESEEDS, IOATTRACTION, IOLAYERINFO } |
Enumeration for what to debug. More... | |
enum | debugType { MESH = 1<<IOMESH, OBJINTERSECTIONS = 1<<IOOBJINTERSECTIONS, FEATURESEEDS = 1<<IOFEATURESEEDS, ATTRACTION = 1<< IOATTRACTION, LAYERINFO = 1<<IOLAYERINFO } |
enum | IOoutputType { IOOUTPUTLAYERINFO } |
Enumeration for what to output. More... | |
enum | outputType { OUTPUTLAYERINFO = 1<<IOOUTPUTLAYERINFO } |
enum | IOwriteType { IOWRITEMESH, IOWRITELEVELS, IOWRITELAYERSETS, IOWRITELAYERFIELDS } |
Enumeration for what to write. More... | |
enum | writeType { WRITEMESH = 1<<IOWRITEMESH, WRITELEVELS = 1<<IOWRITELEVELS, WRITELAYERSETS = 1<<IOWRITELAYERSETS, WRITELAYERFIELDS = 1<<IOWRITELAYERFIELDS } |
enum | mapType { MASTERONLY = 1, KEEPALL = 2, REMOVE = 4 } |
Enumeration for how the userdata is to be mapped upon refinement. More... | |
Public Member Functions | |
ClassName ("meshRefinement") | |
Runtime type information. More... | |
meshRefinement (fvMesh &mesh, const scalar mergeDistance, const bool overwrite, const refinementSurfaces &, const refinementFeatures &, const shellSurfaces &, const shellSurfaces &) | |
Construct from components. More... | |
const fvMesh & | mesh () const |
Reference to mesh. More... | |
fvMesh & | mesh () |
scalar | mergeDistance () const |
bool | overwrite () const |
Overwrite the mesh? More... | |
const word & | oldInstance () const |
(points)instance of mesh upon construction More... | |
const refinementSurfaces & | surfaces () const |
Reference to surface search engines. More... | |
const refinementFeatures & | features () const |
Reference to feature edge mesh. More... | |
const shellSurfaces & | shells () const |
Reference to refinement shells (regions) More... | |
const hexRef8 & | meshCutter () const |
Reference to meshcutting engine. More... | |
const labelList & | surfaceIndex () const |
Per start-end edge the index of the surface hit. More... | |
labelList & | surfaceIndex () |
const Map< label > & | faceToCoupledPatch () const |
For faces originating from processor faces store the original. More... | |
const List< Tuple2< mapType, labelList > > & | userFaceData () const |
Additional face data that is maintained across. More... | |
List< Tuple2< mapType, labelList > > & | userFaceData () |
label | countHits () const |
Count number of intersections (local) More... | |
autoPtr< mapDistributePolyMesh > | balance (const bool keepZoneFaces, const bool keepBaffles, const scalarField &cellWeights, decompositionMethod &decomposer, fvMeshDistribute &distributor) |
Redecompose according to cell count. More... | |
labelList | intersectedFaces () const |
Get faces with intersection. More... | |
labelList | intersectedPoints () const |
Get points on surfaces with intersection and boundary faces. More... | |
bool | isGap (const scalar, const vector &, const vector &, const vector &, const vector &) const |
Is local topology a small gap? More... | |
bool | isNormalGap (const scalar, const vector &, const vector &, const vector &, const vector &) const |
Is local topology a small gap normal to the test vector. More... | |
labelList | refineCandidates (const pointField &keepPoints, const scalar curvature, const scalar planarAngle, const bool featureRefinement, const bool featureDistanceRefinement, const bool internalRefinement, const bool surfaceRefinement, const bool curvatureRefinement, const bool smallFeatureRefinement, const bool gapRefinement, const bool bigGapRefinement, const bool spreadGapSize, const label maxGlobalCells, const label maxLocalCells) const |
Calculate list of cells to refine. More... | |
autoPtr< mapPolyMesh > | refine (const labelList &cellsToRefine) |
Refine some cells. More... | |
autoPtr< mapDistributePolyMesh > | refineAndBalance (const string &msg, decompositionMethod &decomposer, fvMeshDistribute &distributor, const labelList &cellsToRefine, const scalar maxLoadUnbalance) |
Refine some cells and rebalance. More... | |
autoPtr< mapDistributePolyMesh > | balanceAndRefine (const string &msg, decompositionMethod &decomposer, fvMeshDistribute &distributor, const labelList &cellsToRefine, const scalar maxLoadUnbalance) |
Balance before refining some cells. More... | |
void | baffleAndSplitMesh (const bool handleSnapProblems, const snapParameters &snapParams, const bool useTopologicalSnapDetection, const bool removeEdgeConnectedCells, const scalarField &perpendicularAngle, const dictionary &motionDict, Time &runTime, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const wordList ®ionsInMesh, const pointField &locationsOutsideMesh) |
Split off unreachable areas of mesh. More... | |
void | mergeFreeStandingBaffles (const snapParameters &snapParams, const bool useTopologicalSnapDetection, const bool removeEdgeConnectedCells, const scalarField &perpendicularAngle, const scalar planarAngle, const dictionary &motionDict, Time &runTime, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const pointField &locationsOutsideMesh) |
Merge free-standing baffles. More... | |
autoPtr< mapPolyMesh > | splitMesh (const label nBufferLayers, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const wordList ®ionsInMesh, const pointField &locationsOutsideMesh) |
Split off (with optional buffer layers) unreachable areas. More... | |
autoPtr< mapPolyMesh > | dupNonManifoldPoints (const localPointRegion &) |
Find boundary points that connect to more than one cell. More... | |
autoPtr< mapPolyMesh > | dupNonManifoldPoints () |
Find boundary points that connect to more than one cell. More... | |
autoPtr< mapPolyMesh > | dupNonManifoldBoundaryPoints () |
Find boundary points that are on faceZones of type boundary. More... | |
autoPtr< mapPolyMesh > | mergePoints (const labelList &pointToDuplicate) |
Merge duplicate points. More... | |
autoPtr< mapPolyMesh > | createBaffles (const labelList &ownPatch, const labelList &neiPatch) |
Create baffle for every internal face where ownPatch != -1. More... | |
labelList | getZones (const List< surfaceZonesInfo::faceZoneType > &fzTypes) const |
Get zones of given type. More... | |
autoPtr< mapPolyMesh > | createZoneBaffles (const labelList &zoneIDs, List< labelPair > &baffles, labelList &originatingFaceZone) |
Create baffles for faces on faceZones. Return created baffles. More... | |
autoPtr< mapPolyMesh > | mergeBaffles (const List< labelPair > &, const Map< label > &faceToPatch) |
Merge baffles. Gets pairs of faces and boundary faces to move. More... | |
autoPtr< mapPolyMesh > | mergeZoneBaffles (const bool doInternalZones, const bool doBaffleZones) |
Merge all baffles on faceZones. More... | |
autoPtr< mapPolyMesh > | zonify (const bool allowFreeStandingZoneFaces, const pointField &locationsInMesh, const wordList ®ionsInMesh, wordPairHashTable &zonesToFaceZone) |
Put faces/cells into zones according to surface specification. More... | |
label | addMeshedPatch (const word &name, const dictionary &) |
Add patch originating from meshing. Update meshedPatches_. More... | |
labelList | meshedPatches () const |
Get patchIDs for patches added in addMeshedPatch. More... | |
label | addFaceZone (const word &fzName, const word &masterPatch, const word &slavePatch, const surfaceZonesInfo::faceZoneType &fzType) |
Add/lookup faceZone and update information. Return index of. More... | |
bool | getFaceZoneInfo (const word &fzName, label &masterPatchID, label &slavePatchID, surfaceZonesInfo::faceZoneType &fzType) const |
Lookup faceZone information. Return false if no information. More... | |
void | selectSeparatedCoupledFaces (boolList &) const |
Select coupled faces that are not collocated. More... | |
void | updateIntersections (const labelList &changedFaces) |
Find any intersection of surface. Store in surfaceIndex_. More... | |
autoPtr< mapPolyMesh > | splitMeshRegions (const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const pointField &locationsInMesh, const pointField &locationsOutsideMesh) |
Split mesh. Keep part containing point. Return empty map if. More... | |
void | doSplitFaces (const labelList &splitFaces, const labelPairList &splits, polyTopoChange &meshMod) const |
Split faces into two. More... | |
label | splitFacesUndo (const labelList &splitFaces, const labelPairList &splits, const dictionary &motionDict, labelList &duplicateFace, List< labelPair > &baffles) |
Split faces along diagonal. Maintain mesh quality. Return. More... | |
void | distribute (const mapDistributePolyMesh &) |
Update local numbering for mesh redistribution. More... | |
void | updateMesh (const mapPolyMesh &, const labelList &changedFaces) |
Update for external change to mesh. changedFaces are in new mesh. More... | |
void | storeData (const labelList &pointsToStore, const labelList &facesToStore, const labelList &cellsToStore) |
Signal points/face/cells for which to store data. More... | |
void | updateMesh (const mapPolyMesh &, const labelList &changedFaces, const Map< label > &pointsToRestore, const Map< label > &facesToRestore, const Map< label > &cellsToRestore) |
Update local numbering + undo. More... | |
label | mergePatchFaces (const scalar minCos, const scalar concaveCos, const label mergeSize, const labelList &patchIDs) |
Merge coplanar faces if sets are of size mergeSize. More... | |
label | mergePatchFacesUndo (const scalar minCos, const scalar concaveCos, const labelList &patchIDs, const dictionary &motionDict, const labelList &preserveFaces) |
Merge coplanar faces. preserveFaces is != -1 for faces. More... | |
autoPtr< mapPolyMesh > | doRemovePoints (removePoints &pointRemover, const boolList &pointCanBeDeleted) |
autoPtr< mapPolyMesh > | doRestorePoints (removePoints &pointRemover, const labelList &facesToRestore) |
labelList | collectFaces (const labelList &candidateFaces, const labelHashSet &set) const |
labelList | growFaceCellFace (const labelHashSet &set) const |
label | mergeEdgesUndo (const scalar minCos, const dictionary &motionDict) |
Merge edges, maintain mesh quality. Return global number. More... | |
void | checkData () |
Debugging: check that all faces still obey start()>end() More... | |
template<class T > | |
void | testSyncBoundaryFaceList (const scalar mergeDistance, const string &, const UList< T > &, const UList< T > &) const |
Compare two lists over all boundary faces. More... | |
void | printMeshInfo (const bool, const string &) const |
Print some mesh stats. More... | |
word | timeName () const |
Replacement for Time::timeName() : return oldInstance (if. More... | |
void | setInstance (const fileName &) |
Set instance of all local IOobjects. More... | |
bool | write () const |
Write mesh and all data. More... | |
void | dumpRefinementLevel () const |
Write refinement level as volScalarFields for postprocessing. More... | |
void | dumpIntersections (const fileName &prefix) const |
Debug: Write intersection information to OBJ format. More... | |
void | write (const debugType debugFlags, const writeType writeFlags, const fileName &) const |
Do any one of above IO functions. More... | |
Static Public Member Functions | |
static autoPtr< indirectPrimitivePatch > | makePatch (const polyMesh &, const labelList &) |
Create patch from set of patches. More... | |
static tmp< pointVectorField > | makeDisplacementField (const pointMesh &pMesh, const labelList &adaptPatchIDs) |
Helper function to make a pointVectorField with correct. More... | |
static void | checkCoupledFaceZones (const polyMesh &) |
Helper function: check that face zones are synced. More... | |
static void | calculateEdgeWeights (const polyMesh &mesh, const PackedBoolList &isMasterEdge, const labelList &meshPoints, const edgeList &edges, scalarField &edgeWeights, scalarField &invSumWeight) |
Helper: calculate edge weights (1/length) More... | |
template<class Type > | |
static void | weightedSum (const polyMesh &mesh, const PackedBoolList &isMasterEdge, const labelList &meshPoints, const edgeList &edges, const scalarField &edgeWeights, const Field< Type > &data, Field< Type > &sum) |
Helper: weighted sum (over all subset of mesh points) by. More... | |
static List< labelPair > | subsetBaffles (const polyMesh &mesh, const labelList &zoneIDs, const List< labelPair > &baffles) |
Subset baffles according to zones. More... | |
static label | appendPatch (fvMesh &, const label insertPatchI, const word &, const dictionary &) |
Helper:append patch to end of mesh. More... | |
static label | addPatch (fvMesh &, const word &name, const dictionary &) |
Helper:add patch to mesh. Update all registered fields. More... | |
static label | findRegion (const polyMesh &, const labelList &cellRegion, const vector &perturbVec, const point &p) |
Find region point is in. Uses optional perturbation to re-test. More... | |
static void | findRegions (const polyMesh &, const vector &perturbVec, const pointField &locationsInMesh, const pointField &locationsOutsideMesh, const label nRegions, labelList &cellRegion) |
template<class T > | |
static void | updateList (const labelList &newToOld, const T &nullValue, List< T > &elems) |
Helper: reorder list according to map. More... | |
static void | testSyncPointList (const string &msg, const polyMesh &mesh, const List< scalar > &fld) |
static void | testSyncPointList (const string &msg, const polyMesh &mesh, const List< point > &fld) |
template<class T > | |
static void | collectAndPrint (const UList< point > &points, const UList< T > &data) |
Print list according to (collected and) sorted coordinate. More... | |
static PackedBoolList | getMasterPoints (const polyMesh &mesh, const labelList &meshPoints) |
Determine master point for subset of points. If coupled. More... | |
static PackedBoolList | getMasterEdges (const polyMesh &mesh, const labelList &meshEdges) |
Determine master edge for subset of edges. If coupled. More... | |
template<class T > | |
static T | gAverage (const PackedBoolList &isMasterElem, const UList< T > &values) |
Helper: calculate average. More... | |
static writeType | writeLevel () |
Get/set write level. More... | |
static void | writeLevel (const writeType) |
static outputType | outputLevel () |
Get/set output level. More... | |
static void | outputLevel (const outputType) |
template<class Enum > | |
static int | readFlags (const Enum &namedEnum, const wordList &) |
Helper: convert wordList into bit pattern using provided. More... | |
Static Public Attributes | |
static const NamedEnum< IOdebugType, 5 > | IOdebugTypeNames |
static const NamedEnum< IOoutputType, 1 > | IOoutputTypeNames |
static const NamedEnum< IOwriteType, 4 > | IOwriteTypeNames |
Private Member Functions | |
void | calcNeighbourData (labelList &neiLevel, pointField &neiCc) const |
Calculate coupled boundary end vector and refinement level. More... | |
void | calcCellCellRays (const pointField &neiCc, const labelList &neiLevel, const labelList &testFaces, pointField &start, pointField &end, labelList &minLevel) const |
Calculate rays from cell-centre to cell-centre and corresponding. More... | |
autoPtr< mapPolyMesh > | doRemoveCells (const labelList &cellsToRemove, const labelList &exposedFaces, const labelList &exposedPatchIDs, removeCells &cellRemover) |
Remove cells. Put exposedFaces into exposedPatchIDs. More... | |
labelList | getInsideCells (const word &) const |
Get cells which are inside any closed surface. Note that. More... | |
autoPtr< mapPolyMesh > | removeInsideCells (const string &msg, const label exposedPatchI) |
Do all to remove inside cells. More... | |
void | markFeatureCellLevel (const pointField &keepPoints, labelList &maxFeatureLevel) const |
Mark every cell with level of feature passing through it. More... | |
label | markFeatureRefinement (const pointField &keepPoints, const label nAllowRefine, labelList &refineCell, label &nRefine) const |
Calculate list of cells to refine based on intersection of. More... | |
label | markInternalDistanceToFeatureRefinement (const label nAllowRefine, labelList &refineCell, label &nRefine) const |
Mark cells for distance-to-feature based refinement. More... | |
label | markInternalRefinement (const label nAllowRefine, labelList &refineCell, label &nRefine) const |
Mark cells for refinement-shells based refinement. More... | |
label | unmarkInternalRefinement (labelList &refineCell, label &nRefine) const |
Unmark cells for refinement based on limit-shells. Return number. More... | |
labelList | getRefineCandidateFaces (const labelList &refineCell) const |
Collect faces that are intersected and whose neighbours aren't. More... | |
label | markSurfaceRefinement (const label nAllowRefine, const labelList &neiLevel, const pointField &neiCc, labelList &refineCell, label &nRefine) const |
Mark cells for surface intersection based refinement. More... | |
label | markSurfaceGapRefinement (const scalar planarCos, const label nAllowRefine, const labelList &neiLevel, const pointField &neiCc, labelList &refineCell, label &nRefine) const |
Mark cells intersected by the surface if they are inside. More... | |
label | generateRays (const point &nearPoint, const vector &nearNormal, const FixedList< label, 3 > &gapInfo, const volumeType &mode, const label cLevel, DynamicField< point > &start, DynamicField< point > &end) const |
Generate single ray from nearPoint in direction of nearNormal. More... | |
label | generateRays (const bool useSurfaceNormal, const point &nearPoint, const vector &nearNormal, const FixedList< label, 3 > &gapInfo, const volumeType &mode, const point &cc, const label cLevel, DynamicField< point > &start, DynamicField< point > &end, DynamicField< scalar > &gapSize, DynamicField< point > &start2, DynamicField< point > &end2, DynamicField< scalar > &gapSize2) const |
Generate pairs of rays through cell centre. More... | |
void | selectGapCandidates (const labelList &refineCell, const label nRefine, labelList &cellMap, List< FixedList< label, 3 > > &shellGapInfo, List< volumeType > &shellGapMode) const |
Select candidate cells (cells inside a shell with gapLevel. More... | |
void | mergeGapInfo (const FixedList< label, 3 > &shellGapInfo, const volumeType shellGapMode, const FixedList< label, 3 > &surfGapInfo, const volumeType surfGapMode, FixedList< label, 3 > &gapInfo, volumeType &gapMode) const |
Merge gap information coming from shell and from surface. More... | |
label | markInternalGapRefinement (const scalar planarCos, const bool spreadGapSize, const label nAllowRefine, labelList &refineCell, label &nRefine, labelList &numGapCells, scalarField &gapSize) const |
Mark cells for non-surface intersection based gap refinement. More... | |
label | markSmallFeatureRefinement (const scalar planarCos, const label nAllowRefine, const labelList &neiLevel, const pointField &neiCc, labelList &refineCell, label &nRefine) const |
Refine cells containing small gaps. More... | |
label | countMatches (const List< point > &normals1, const List< point > &normals2, const scalar tol=1e-6) const |
Helper: count number of normals1 that are in normals2. More... | |
label | markSurfaceCurvatureRefinement (const scalar curvature, const label nAllowRefine, const labelList &neiLevel, const pointField &neiCc, labelList &refineCell, label &nRefine) const |
Mark cells for surface curvature based refinement. Marks if. More... | |
bool | checkProximity (const scalar planarCos, const label nAllowRefine, const label surfaceLevel, const vector &surfaceLocation, const vector &surfaceNormal, const label cellI, label &cellMaxLevel, vector &cellMaxLocation, vector &cellMaxNormal, labelList &refineCell, label &nRefine) const |
Mark cell if local a gap topology or. More... | |
label | markProximityRefinement (const scalar curvature, const label nAllowRefine, const labelList &neiLevel, const pointField &neiCc, labelList &refineCell, label &nRefine) const |
Mark cells for surface proximity based refinement. More... | |
Map< labelPair > | getZoneBafflePatches (const bool allowBoundary, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch) const |
Get faces to repatch. Returns map from face to patch. More... | |
void | getIntersections (const labelList &surfacesToTest, const pointField &neiCc, const labelList &testFaces, labelList &globalRegion1, labelList &globalRegion2) const |
Calculate intersections. Return per face -1 or the global. More... | |
void | getIntersections (const labelList &surfacesToTest, const pointField &neiCc, const labelList &testFaces, labelList &namedSurfaceIndex, PackedBoolList &posOrientation) const |
Calculate intersections on zoned faces. Return per face -1. More... | |
void | getBafflePatches (const labelList &globalToMasterPatch, const pointField &locationsInMesh, const wordList ®ionsInMesh, const labelList &neiLevel, const pointField &neiCc, labelList &ownPatch, labelList &neiPatch) const |
Determine patches for baffles. More... | |
label | createBaffle (const label faceI, const label ownPatch, const label neiPatch, polyTopoChange &meshMod) const |
Repatches external face or creates baffle for internal face. More... | |
void | markBoundaryFace (const label faceI, boolList &isBoundaryFace, boolList &isBoundaryEdge, boolList &isBoundaryPoint) const |
Helper function to mark face as being on 'boundary'. Used by. More... | |
void | findNearest (const labelList &meshFaces, List< pointIndexHit > &nearestInfo, labelList &nearestSurface, labelList &nearestRegion, vectorField &nearestNormal) const |
Map< label > | findEdgeConnectedProblemCells (const scalarField &perpendicularAngle, const labelList &) const |
bool | isCollapsedFace (const pointField &, const pointField &neiCc, const scalar minFaceArea, const scalar maxNonOrtho, const label faceI) const |
bool | isCollapsedCell (const pointField &, const scalar volFraction, const label cellI) const |
labelList | markFacesOnProblemCells (const dictionary &motionDict, const bool removeEdgeConnectedCells, const scalarField &perpendicularAngle, const labelList &globalToMasterPatch) const |
Returns list with for every internal face -1 or the patch. More... | |
labelList | nearestPatch (const labelList &adaptPatchIDs) const |
Returns list with for every face the label of the nearest. More... | |
labelList | markFacesOnProblemCellsGeometric (const snapParameters &snapParams, const dictionary &motionDict, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch) const |
Returns list with for every internal face -1 or the patch. More... | |
List< labelPair > | freeStandingBaffles (const List< labelPair > &, const scalar freeStandingAngle) const |
Extract those baffles (duplicate) faces that are on the edge. More... | |
void | findCellZoneGeometric (const pointField &neiCc, const labelList &closedNamedSurfaces, labelList &namedSurfaceIndex, const labelList &surfaceToCellZone, labelList &cellToZone) const |
Finds zone per cell for cells inside closed named surfaces. More... | |
void | findCellZoneInsideWalk (const pointField &locationsInMesh, const labelList &zonesInMesh, const labelList &blockedFace, labelList &cellToZone) const |
Finds zone per cell for cells inside region for which name. More... | |
void | findCellZoneInsideWalk (const pointField &locationsInMesh, const wordList &zoneNamesInMesh, const labelList &faceToZone, labelList &cellToZone) const |
Finds zone per cell for cells inside region for which name. More... | |
bool | calcRegionToZone (const label surfZoneI, const label ownRegion, const label neiRegion, labelList ®ionToCellZone) const |
Determines cell zone from cell region information. More... | |
void | findCellZoneTopo (const pointField &locationsInMesh, const labelList &allSurfaceIndex, const labelList &namedSurfaceIndex, const labelList &surfaceToCellZone, labelList &cellToZone) const |
Finds zone per cell. Uses topological walk with all faces. More... | |
void | makeConsistentFaceIndex (const labelList &zoneToNamedSurface, const labelList &cellToZone, labelList &namedSurfaceIndex) const |
Make namedSurfaceIndex consistent with cellToZone. More... | |
void | zonify (const bool allowFreeStandingZoneFaces, const pointField &locationsInMesh, const wordList &zonesInMesh, labelList &cellToZone, labelList &namedSurfaceIndex, PackedBoolList &posOrientation) const |
Calculate cellZone allocation. More... | |
void | zonify (const PackedBoolList &isMasterFace, const labelList &cellToZone, const labelList &neiCellZone, const labelList &faceToZone, const PackedBoolList &meshFlipMap, polyTopoChange &meshMod) const |
Put cells into cellZone, faces into faceZone. More... | |
void | allocateInterRegionFaceZone (const label ownZone, const label neiZone, wordPairHashTable &zonesToFaceZone, HashTable< word, labelPair, labelPair::Hash<> > &) const |
Allocate faceZoneName. More... | |
void | handleSnapProblems (const snapParameters &snapParams, const bool useTopologicalSnapDetection, const bool removeEdgeConnectedCells, const scalarField &perpendicularAngle, const dictionary &motionDict, Time &runTime, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch) |
Remove any loose standing cells. More... | |
labelList | freeStandingBaffleFaces (const labelList &faceToZone, const labelList &cellToZone, const labelList &neiCellZone) const |
Get all faces in faceToZone that have no cellZone on. More... | |
void | calcPatchNumMasterFaces (const PackedBoolList &isMasterFace, const indirectPrimitivePatch &patch, labelList &nMasterFaces) const |
Determine per patch edge the number of master faces. Used. More... | |
label | markPatchZones (const indirectPrimitivePatch &patch, const labelList &nMasterFaces, labelList &faceToZone) const |
Determine per patch face the (singly-) connected zone it. More... | |
void | consistentOrientation (const PackedBoolList &isMasterFace, const indirectPrimitivePatch &patch, const labelList &nMasterFaces, const labelList &faceToZone, const Map< label > &zoneToOrientation, PackedBoolList &meshFlipMap) const |
Make faces consistent. More... | |
meshRefinement (const meshRefinement &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const meshRefinement &) |
Disallow default bitwise assignment. More... | |
Static Private Member Functions | |
template<class GeoField > | |
static void | addPatchFields (fvMesh &, const word &patchFieldType) |
Add patchfield of given type to all fields on mesh. More... | |
template<class GeoField > | |
static void | reorderPatchFields (fvMesh &, const labelList &oldToNew) |
Reorder patchfields of all fields on mesh. More... | |
static labelList | getChangedFaces (const mapPolyMesh &, const labelList &oldCellsToRefine) |
Find out which faces have changed given cells (old mesh labels) More... | |
static bool | markForRefine (const label markValue, const label nAllowRefine, label &cellValue, label &nRefine) |
Mark cell for refinement (if not already marked). Return false. More... | |
Private Attributes | |
fvMesh & | mesh_ |
Reference to mesh. More... | |
const scalar | mergeDistance_ |
Tolerance used for sorting coordinates (used in 'less' routine) More... | |
const bool | overwrite_ |
Overwrite the mesh? More... | |
const word | oldInstance_ |
Instance of mesh upon construction. Used when in overwrite_ mode. More... | |
const refinementSurfaces & | surfaces_ |
All surface-intersection interaction. More... | |
const refinementFeatures & | features_ |
All feature-edge interaction. More... | |
const shellSurfaces & | shells_ |
All shell-refinement interaction. More... | |
const shellSurfaces & | limitShells_ |
All limit-refinement interaction. More... | |
hexRef8 | meshCutter_ |
Refinement engine. More... | |
labelIOList | surfaceIndex_ |
Per cc-cc vector the index of the surface hit. More... | |
Map< label > | faceToCoupledPatch_ |
Original patch for baffle faces that used to be on. More... | |
List< Tuple2< mapType, labelList > > | userFaceData_ |
User supplied face based data. More... | |
wordList | meshedPatches_ |
Meshed patches - are treated differently. Stored as wordList since. More... | |
HashTable< word, word > | faceZoneToMasterPatch_ |
FaceZone to master patch name. More... | |
HashTable< word, word > | faceZoneToSlavePatch_ |
FaceZone to slave patch name. More... | |
HashTable< surfaceZonesInfo::faceZoneType, word > | faceZoneToType_ |
FaceZone to method to handle faces. More... | |
Static Private Attributes | |
static writeType | writeLevel_ |
Control of writing level. More... | |
static outputType | outputLevel_ |
Control of output/log level. More... | |
Helper class which maintains intersections of (changing) mesh with (static) surfaces.
Definition at line 82 of file meshRefinement.H.
enum IOdebugType |
Enumeration for what to debug.
Enumerator | |
---|---|
IOMESH | |
IOOBJINTERSECTIONS | |
IOFEATURESEEDS | |
IOATTRACTION | |
IOLAYERINFO |
Definition at line 90 of file meshRefinement.H.
enum debugType |
Enumerator | |
---|---|
MESH | |
OBJINTERSECTIONS | |
FEATURESEEDS | |
ATTRACTION | |
LAYERINFO |
Definition at line 100 of file meshRefinement.H.
enum IOoutputType |
Enumeration for what to output.
Enumerator | |
---|---|
IOOUTPUTLAYERINFO |
Definition at line 111 of file meshRefinement.H.
enum outputType |
Enumerator | |
---|---|
OUTPUTLAYERINFO |
Definition at line 116 of file meshRefinement.H.
enum IOwriteType |
Enumeration for what to write.
Enumerator | |
---|---|
IOWRITEMESH | |
IOWRITELEVELS | |
IOWRITELAYERSETS | |
IOWRITELAYERFIELDS |
Definition at line 122 of file meshRefinement.H.
enum writeType |
Enumerator | |
---|---|
WRITEMESH | |
WRITELEVELS | |
WRITELAYERSETS | |
WRITELAYERFIELDS |
Definition at line 130 of file meshRefinement.H.
enum mapType |
Enumeration for how the userdata is to be mapped upon refinement.
Enumerator | |
---|---|
MASTERONLY | maintain master only |
KEEPALL | have slaves (upon refinement) from master |
REMOVE | set value to -1 any face that was refined |
Definition at line 139 of file meshRefinement.H.
|
private |
Disallow default bitwise copy construct.
meshRefinement | ( | fvMesh & | mesh, |
const scalar | mergeDistance, | ||
const bool | overwrite, | ||
const refinementSurfaces & | surfaces, | ||
const refinementFeatures & | features, | ||
const shellSurfaces & | shells, | ||
const shellSurfaces & | limitShells | ||
) |
Construct from components.
Definition at line 1227 of file meshRefinement.C.
References Foam::identity().
Add patchfield of given type to all fields on mesh.
Definition at line 205 of file meshRefinementTemplates.C.
References fld(), forAllIter, mesh, and Foam::compressible::New().
Reorder patchfields of all fields on mesh.
Definition at line 239 of file meshRefinementTemplates.C.
References fld(), forAllIter, and mesh.
|
staticprivate |
Find out which faces have changed given cells (old mesh labels)
that were marked for refinement.
Definition at line 117 of file meshRefinementRefine.C.
References mapPolyMesh::cellMap(), cells, Foam::endl(), Foam::findIndices(), forAll, PackedList::get(), mesh, MESH, mapPolyMesh::mesh(), IOobject::name(), mapPolyMesh::nOldCells(), Foam::Pout, Foam::returnReduce(), PackedBoolList::set(), List::size(), polyPatch::start(), and regIOobject::write().
|
private |
Calculate coupled boundary end vector and refinement level.
Definition at line 125 of file meshRefinement.C.
References Foam::abort(), polyPatch::coupled(), polyPatch::faceAreas(), polyPatch::faceCells(), polyPatch::faceCentres(), Foam::FatalError, FatalErrorInFunction, forAll, HashTable::found(), Foam::mag(), patches, List::size(), and polyPatch::start().
Referenced by meshRefinement::updateIntersections().
|
private |
Calculate rays from cell-centre to cell-centre and corresponding.
min cell refinement level
Definition at line 219 of file meshRefinement.C.
References forAll, Foam::min(), List::setSize(), and List::size().
|
private |
Remove cells. Put exposedFaces into exposedPatchIDs.
Definition at line 680 of file meshRefinement.C.
References polyTopoChange::changeMesh(), Foam::renumber(), removeCells::setRefinement(), timeName, and removeCells::updateMesh().
Get cells which are inside any closed surface. Note that.
all closed surfaces will have already been oriented to have keepPoint outside.
|
private |
Do all to remove inside cells.
|
staticprivate |
Mark cell for refinement (if not already marked). Return false.
if refinelimit hit. Keeps running count (in nRefine) of cells marked for refinement
Definition at line 297 of file meshRefinementRefine.C.
|
private |
Mark every cell with level of feature passing through it.
(or -1 if not passed through). Uses tracking.
Definition at line 316 of file meshRefinementRefine.C.
References Cloud::addParticle(), Cloud::clear(), Foam::constant::electromagnetic::e, edgeMesh::edges(), Foam::endl(), forAll, forAllIter, trackedParticle::i(), trackedParticle::j(), Cloud::move(), edgeMesh::pointEdges(), edgeMesh::points(), Foam::Pout, edgeMesh::regions(), Foam::returnReduce(), PackedBoolList::set(), List::setSize(), List::size(), Cloud::size(), HashTable::size(), and tp().
|
private |
Calculate list of cells to refine based on intersection of.
features.
Definition at line 656 of file meshRefinementRefine.C.
References Foam::endl(), forAll, Foam::Info, and Foam::returnReduce().
|
private |
Mark cells for distance-to-feature based refinement.
Definition at line 712 of file meshRefinementRefine.C.
References Foam::endl(), forAll, Foam::Info, Foam::Pout, Foam::returnReduce(), and List::size().
|
private |
Mark cells for refinement-shells based refinement.
Definition at line 796 of file meshRefinementRefine.C.
References Foam::endl(), forAll, Foam::Info, Foam::Pout, Foam::returnReduce(), and List::size().
|
private |
Unmark cells for refinement based on limit-shells. Return number.
of limited cells.
Definition at line 873 of file meshRefinementRefine.C.
References forAll, and Foam::returnReduce().
|
private |
Collect faces that are intersected and whose neighbours aren't.
yet marked for refinement.
Definition at line 925 of file meshRefinementRefine.C.
References forAll, and List::setSize().
|
private |
Mark cells for surface intersection based refinement.
Definition at line 965 of file meshRefinementRefine.C.
References Foam::endl(), forAll, Foam::Info, Foam::returnReduce(), and List::size().
|
private |
Mark cells intersected by the surface if they are inside.
close gaps
Definition at line 43 of file meshRefinementGapRefine.C.
References DynamicList::append(), DynamicField::append(), DynamicField::capacity(), List::clear(), Foam::endl(), forAll, Foam::identity(), Foam::Info, Foam::mag(), Foam::magSqr(), Foam::max(), Foam::returnReduce(), DynamicList::shrink(), DynamicField::shrink(), List::size(), and Foam::sqr().
|
private |
Generate single ray from nearPoint in direction of nearNormal.
Definition at line 686 of file meshRefinementGapRefine.C.
References DynamicField::append(), Foam::constant::electromagnetic::e, Foam::mode(), n, and Foam::pow().
|
private |
Generate pairs of rays through cell centre.
Each ray pair has start, end, and expected gap size
Definition at line 737 of file meshRefinementGapRefine.C.
References DynamicField::append(), Foam::constant::electromagnetic::e, Foam::mag(), Foam::mode(), n, Foam::pow(), and s().
|
private |
Select candidate cells (cells inside a shell with gapLevel.
specified)
Definition at line 995 of file meshRefinementGapRefine.C.
References Foam::endl(), forAll, Foam::Info, Foam::returnReduce(), List::setSize(), and List::size().
|
private |
Merge gap information coming from shell and from surface.
(surface wins)
Definition at line 1057 of file meshRefinementGapRefine.C.
|
private |
Mark cells for non-surface intersection based gap refinement.
Definition at line 1091 of file meshRefinementGapRefine.C.
References DynamicList::append(), List::clear(), FaceCellWave< Type, TrackingData >::data(), Foam::endl(), forAll, Foam::identity(), Foam::Info, Foam::mag(), Foam::magSqr(), Foam::max(), Foam::min(), Foam::pow(), Foam::returnReduce(), List::setSize(), DynamicList::shrink(), DynamicField::shrink(), List::size(), Foam::sqr(), and Foam::sqrt().
|
private |
Refine cells containing small gaps.
Force calculation of tetBasePt
Option 1: use octree nearest searching inside polyMesh
label cellI = mesh_.findCell(pt);
Option 2: use octree 'inside' searching inside polyMesh. Is
much faster.
Definition at line 1464 of file meshRefinementGapRefine.C.
References DynamicList::append(), indexedOctree::bb(), searchableSurface::boundingSpheres(), List::clear(), treeBoundBox::contains(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, indexedOctree::findInside(), searchableSurface::findNearest(), forAll, searchableSurface::getNormal(), searchableSurface::getRegion(), Foam::Info, Foam::mag(), Foam::max(), IOobject::name(), indexedOctree::nodes(), Foam::returnReduce(), DynamicList::shrink(), and DynamicField::shrink().
|
private |
Helper: count number of normals1 that are in normals2.
Definition at line 1097 of file meshRefinementRefine.C.
References forAll, and Foam::magSqr().
|
private |
Mark cells for surface curvature based refinement. Marks if.
local curvature > curvature or if on different regions (markDifferingRegions)
Definition at line 1127 of file meshRefinementRefine.C.
References List::append(), List::clear(), Foam::endl(), forAll, Foam::Info, Foam::max(), Foam::min(), Foam::Pout, Foam::reduce(), Foam::returnReduce(), List::size(), Foam::sortedOrder(), and Foam::Swap().
|
private |
Mark cell if local a gap topology or.
<< " location:" << cellMaxLocation
Definition at line 1657 of file meshRefinementRefine.C.
|
private |
Mark cells for surface proximity based refinement.
Definition at line 1740 of file meshRefinementRefine.C.
References List::clear(), Foam::endl(), forAll, Foam::Info, Foam::Pout, Foam::returnReduce(), and List::size().
|
private |
Get faces to repatch. Returns map from face to patch.
Definition at line 467 of file meshRefinementBaffles.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, ZoneMesh::findZoneID(), faceZone::flipMap(), forAll, Foam::Info, zone::name(), patches, and Foam::reverse().
|
private |
Calculate intersections. Return per face -1 or the global.
surface region
Definition at line 173 of file meshRefinementBaffles.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mkDir(), Foam::nl, Foam::Pout, autoPtr::reset(), List::setSize(), List::size(), timeName, and autoPtr::valid().
|
private |
Calculate intersections on zoned faces. Return per face -1.
or the index of the surface and the orientation w.r.t. surface
Definition at line 2163 of file meshRefinementBaffles.C.
References Foam::endl(), forAll, Foam::magSqr(), Foam::nl, Foam::Pout, List::setSize(), PackedList::setSize(), and List::size().
|
private |
Determine patches for baffles.
Definition at line 283 of file meshRefinementBaffles.C.
References forAll, and List::setSize().
|
private |
Repatches external face or creates baffle for internal face.
with user specified patches (might be different for both sides). Returns label of added face.
Definition at line 60 of file meshRefinementBaffles.C.
References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, faceZone::flipMap(), polyTopoChange::setAction(), and faceZone::whichFace().
|
private |
Helper function to mark face as being on 'boundary'. Used by.
markFacesOnProblemCells
Definition at line 49 of file meshRefinementProblemCells.C.
|
private |
Definition at line 75 of file meshRefinementProblemCells.C.
References DynamicList::append(), forAll, Foam::identity(), scalarField(), List::setSize(), List::size(), and Foam::sqr().
|
private |
Definition at line 139 of file meshRefinementProblemCells.C.
References DynamicList::append(), Foam::degToRad(), PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), Foam::endl(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceNormals(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), IOobject::instance(), Foam::mag(), MESH, n, IOobject::objectPath(), Foam::Pout, Foam::returnReduce(), DynamicList::shrink(), Foam::sin(), List::size(), HashTable::size(), timeName, and regIOobject::write().
|
private |
Definition at line 287 of file meshRefinementProblemCells.C.
References Foam::cos(), Foam::degToRad(), Foam::mag(), points, and s().
|
private |
Definition at line 358 of file meshRefinementProblemCells.C.
References points.
|
private |
Returns list with for every internal face -1 or the patch.
they should be baffled into. If removeEdgeConnectedCells is set removes cells based on perpendicularAngle.
Definition at line 472 of file meshRefinementProblemCells.C.
References polyPatch::coupled(), Foam::endl(), forAll, forAllConstIter(), PackedList::get(), Foam::Info, HashSet< Key, Hash >::insert(), IOobject::instance(), PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), dictionary::lookup(), dictionary::lookupOrDefault(), Foam::max(), MESH, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), n, nBfaces, nearestPatch(), Foam::nl, IOobject::objectPath(), patches, Foam::Pout, readScalar, Foam::returnReduce(), PackedBoolList::set(), List::size(), HashTable::size(), Foam::sqr(), polyPatch::start(), timeName, write(), and regIOobject::write().
|
private |
Returns list with for every face the label of the nearest.
patch. Any unreached face (disconnected mesh?) becomes adaptPatchIDs[0]
Definition at line 378 of file meshRefinementProblemCells.C.
References FaceCellWave< Type, TrackingData >::data(), Foam::endl(), forAll, patches, patchFaces(), List::setSize(), List::size(), polyPatch::start(), and WarningInFunction.
|
private |
Returns list with for every internal face -1 or the patch.
they should be baffled into.
Definition at line 1086 of file meshRefinementProblemCells.C.
References Foam::polyMeshGenChecks::checkMesh(), Foam::endl(), forAll, forAllConstIter(), Foam::identity(), Foam::Info, dictionary::lookup(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), nearestPatch(), Foam::compressible::New(), Foam::nl, readScalar, Foam::returnReduce(), Foam::setw(), HashTable::size(), and snapParameters::strictRegionSnap().
|
private |
Extract those baffles (duplicate) faces that are on the edge.
of a baffle region. These are candidates for merging.
Definition at line 944 of file meshRefinementBaffles.C.
References Foam::cos(), polyPatch::coupled(), Foam::degToRad(), Foam::endl(), f1, Pair::first(), forAll, Foam::identity(), Foam::Info, Foam::mag(), n, Foam::nl, patches, Foam::returnReduce(), Pair::second(), List::setSize(), List::size(), and polyPatch::start().
|
private |
Finds zone per cell for cells inside closed named surfaces.
(uses geometric test for insideness) Adapts namedSurfaceIndex so all faces on boundary of cellZone have corresponding faceZone.
Definition at line 1426 of file meshRefinementBaffles.C.
References polyPatch::coupled(), Foam::constant::electromagnetic::e, Foam::findIndex(), forAll, Foam::min(), patches, and polyPatch::start().
|
private |
Finds zone per cell for cells inside region for which name.
is specified.
Definition at line 1667 of file meshRefinementBaffles.C.
References List::clear(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, Foam::nl, regionSplit::nRegions(), and WarningInFunction.
|
private |
Finds zone per cell for cells inside region for which name.
is specified.
Definition at line 1788 of file meshRefinementBaffles.C.
References ZoneMesh::findZoneID(), forAll, and List::size().
|
private |
Determines cell zone from cell region information.
Definition at line 1814 of file meshRefinementBaffles.C.
|
private |
Finds zone per cell. Uses topological walk with all faces.
marked in namedSurfaceIndex regarded as blocked.
Definition at line 1872 of file meshRefinementBaffles.C.
References List::clear(), polyPatch::coupled(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, Foam::nl, regionSplit::nRegions(), patches, Foam::Pout, Foam::returnReduce(), and polyPatch::start().
|
private |
Make namedSurfaceIndex consistent with cellToZone.
Definition at line 2077 of file meshRefinementBaffles.C.
References polyPatch::coupled(), forAll, patches, and polyPatch::start().
|
private |
Calculate cellZone allocation.
Definition at line 2310 of file meshRefinementBaffles.C.
References Foam::abort(), List::clear(), PackedList::clear(), Foam::dimless, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::gMax(), Foam::identity(), Foam::Info, insidePoints(), MESH, Foam::name(), Foam::nl, Foam::Pout, Foam::reduce(), List::setSize(), List::size(), PtrList::size(), and timeName.
|
private |
Put cells into cellZone, faces into faceZone.
Definition at line 3224 of file meshRefinementBaffles.C.
References forAll, patches, polyTopoChange::setAction(), and polyPatch::start().
|
private |
Allocate faceZoneName.
Definition at line 3364 of file meshRefinementBaffles.C.
References HashTable::find(), Pair::first(), HashTable::insert(), Pair::second(), and Foam::Swap().
|
private |
Remove any loose standing cells.
Definition at line 2625 of file meshRefinementBaffles.C.
References cpuTime::cpuTimeIncrement(), Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), IOobject::instance(), MESH, Foam::nl, IOobject::objectPath(), Time::path(), Foam::Pout, HashTable::size(), timeName, write(), and regIOobject::write().
|
private |
Get all faces in faceToZone that have no cellZone on.
either side.
Definition at line 2719 of file meshRefinementBaffles.C.
References DynamicList::append(), forAll, patches, DynamicList::shrink(), and polyPatch::start().
|
private |
Determine per patch edge the number of master faces. Used.
to detect non-manifold situations.
Definition at line 2783 of file meshRefinementBaffles.C.
References PrimitivePatch< Face, FaceList, PointField, PointType >::faceEdges(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::meshEdges(), PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), and List::setSize().
|
private |
Determine per patch face the (singly-) connected zone it.
is in. Return overall number of zones.
Definition at line 2819 of file meshRefinementBaffles.C.
References DynamicList::append(), Foam::calc(), Foam::exit(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceCentres(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceEdges(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::labelMax, PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), Foam::reduce(), Foam::returnReduce(), List::setSize(), List::size(), globalIndex::toGlobal(), globalIndex::toLocal(), patchEdgeFaceRegion::updateEdge(), and globalIndex::whichProcID().
|
private |
Make faces consistent.
Definition at line 2974 of file meshRefinementBaffles.C.
References Foam::abort(), DynamicList::append(), Foam::calc(), Foam::endl(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceEdges(), Foam::FatalError, FatalErrorInFunction, patchFaceOrientation::flip(), forAll, Foam::Info, Foam::labelMax, PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), Foam::nl, Foam::reduce(), Foam::returnReduce(), PackedList::setSize(), globalIndex::toGlobal(), globalIndex::toLocal(), patchFaceOrientation::updateEdge(), polyBoundaryMesh::whichPatch(), and globalIndex::whichProcID().
|
private |
Disallow default bitwise assignment.
ClassName | ( | "meshRefinement" | ) |
Runtime type information.
|
inline |
Reference to mesh.
Definition at line 817 of file meshRefinement.H.
References meshRefinement::mesh_.
Referenced by autoRefineDriver::addFaceZones(), autoSnapDriver::calcNearestSurface(), autoLayerDriver::checkMeshManifold(), autoSnapDriver::getInternalOrBaffleDuplicateFace(), autoSnapDriver::preSmoothPatch(), and writeMesh().
|
inline |
Definition at line 821 of file meshRefinement.H.
References meshRefinement::mesh_.
|
inline |
Definition at line 826 of file meshRefinement.H.
References meshRefinement::mergeDistance_.
|
inline |
Overwrite the mesh?
Definition at line 832 of file meshRefinement.H.
References meshRefinement::overwrite_.
|
inline |
(points)instance of mesh upon construction
Definition at line 838 of file meshRefinement.H.
References meshRefinement::oldInstance_.
|
inline |
Reference to surface search engines.
Definition at line 844 of file meshRefinement.H.
References meshRefinement::surfaces_.
Referenced by autoSnapDriver::calcNearestSurface().
|
inline |
Reference to feature edge mesh.
Definition at line 850 of file meshRefinement.H.
References meshRefinement::features_.
|
inline |
Reference to refinement shells (regions)
Definition at line 856 of file meshRefinement.H.
References meshRefinement::shells_.
|
inline |
Reference to meshcutting engine.
Definition at line 862 of file meshRefinement.H.
References meshRefinement::meshCutter_.
Referenced by autoSnapDriver::smoothInternalDisplacement().
|
inline |
Per start-end edge the index of the surface hit.
Definition at line 868 of file meshRefinement.H.
References meshRefinement::surfaceIndex_.
|
inline |
Definition at line 873 of file meshRefinement.H.
References meshRefinement::surfaceIndex_.
For faces originating from processor faces store the original.
patch
Definition at line 880 of file meshRefinement.H.
Additional face data that is maintained across.
topo changes. Every entry is a list over all faces. Bit of a hack. Additional flag to say whether to maintain master only (false) or increase set to account for face-from-face.
Definition at line 889 of file meshRefinement.H.
Definition at line 894 of file meshRefinement.H.
References meshRefinement::userFaceData_.
Foam::label countHits | ( | ) | const |
Count number of intersections (local)
Definition at line 1273 of file meshRefinement.C.
References forAll, PackedList::get(), and syncTools::getMasterFaces().
Referenced by meshRefinement::updateIntersections().
Foam::autoPtr< Foam::mapDistributePolyMesh > balance | ( | const bool | keepZoneFaces, |
const bool | keepBaffles, | ||
const scalarField & | cellWeights, | ||
decompositionMethod & | decomposer, | ||
fvMeshDistribute & | distributor | ||
) |
Redecompose according to cell count.
keepZoneFaces : find all faceZones from zoned surfaces and keep owner and neighbour together keepBaffles : find all baffles and keep them together
Definition at line 1292 of file meshRefinement.C.
References fvMeshDistribute::countCells(), decompositionMethod::decompose(), fvMeshDistribute::distribute(), Foam::endl(), localPointRegion::findDuplicateFacePairs(), Pair::first(), forAll, Foam::Info, Pstream::listCombineGather(), Pstream::listCombineScatter(), zone::name(), IOobject::name(), UPstream::parRun(), Foam::Pout, Foam::reduce(), Foam::returnReduce(), Pair::second(), decompositionMethod::setConstraints(), List::setSize(), List::size(), syncTools::syncFaceList(), timeName, WarningInFunction, and polyBoundaryMesh::whichPatch().
Foam::labelList intersectedFaces | ( | ) | const |
Foam::labelList intersectedPoints | ( | ) | const |
Get points on surfaces with intersection and boundary faces.
Definition at line 1575 of file meshRefinement.C.
References f(), forAll, PackedList::get(), and PackedBoolList::set().
|
static |
Create patch from set of patches.
Definition at line 1644 of file meshRefinement.C.
References polyMesh::boundaryMesh(), polyMesh::faces(), forAll, mesh, patches, polyMesh::points(), and polyPatch::start().
Referenced by autoLayerDriver::addLayers(), and autoSnapDriver::doSnap().
|
static |
Helper function to make a pointVectorField with correct.
bcs for mesh movement:
Definition at line 1690 of file meshRefinement.C.
References IOobject::AUTO_WRITE, pointMesh::boundary(), Foam::dimLength, forAll, mesh, IOobject::NO_READ, PtrList::size(), fvMesh::time(), Time::timeName(), and Vector< scalar >::zero.
Referenced by autoSnapDriver::doSnap().
|
static |
Helper function: check that face zones are synced.
Definition at line 1747 of file meshRefinement.C.
References Foam::abort(), Foam::exit(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, forAll, Pstream::gatherList(), mesh, UPstream::myProcNo(), zone::name(), ZoneMesh::names(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, UPstream::nProcs(), Pstream::scatterList(), and syncTools::swapBoundaryFaceList().
Referenced by main().
|
static |
Helper: calculate edge weights (1/length)
Definition at line 1835 of file meshRefinement.C.
References Foam::e, forAll, Foam::mag(), Foam::max(), mesh, polyMesh::points(), List::size(), PackedList::size(), and w().
Referenced by fieldSmoother::smoothLambdaMuDisplacement(), fieldSmoother::smoothNormals(), and fieldSmoother::smoothPatchNormals().
|
static |
Helper: weighted sum (over all subset of mesh points) by.
summing contribution from (master) edges
Definition at line 280 of file meshRefinementTemplates.C.
References Foam::abort(), Foam::constant::electromagnetic::e, Foam::FatalError, FatalErrorInFunction, forAll, mesh, List::size(), PackedList::size(), and Foam::sum().
Referenced by fieldSmoother::smoothLambdaMuDisplacement(), fieldSmoother::smoothNormals(), and fieldSmoother::smoothPatchNormals().
bool isGap | ( | const scalar | planarCos, |
const vector & | point0, | ||
const vector & | normal0, | ||
const vector & | point1, | ||
const vector & | normal1 | ||
) | const |
Is local topology a small gap?
Hits differ and angles are oppositeish and
hits have a normal distance
Definition at line 1543 of file meshRefinementRefine.C.
References Foam::mag().
bool isNormalGap | ( | const scalar | planarCos, |
const vector & | point0, | ||
const vector & | normal0, | ||
const vector & | point1, | ||
const vector & | normal1 | ||
) | const |
Is local topology a small gap normal to the test vector.
Hits differ and angles are oppositeish and
hits have a normal distance
Definition at line 1600 of file meshRefinementRefine.C.
References Foam::cos(), Foam::degToRad(), and Foam::mag().
Foam::labelList refineCandidates | ( | const pointField & | keepPoints, |
const scalar | curvature, | ||
const scalar | planarAngle, | ||
const bool | featureRefinement, | ||
const bool | featureDistanceRefinement, | ||
const bool | internalRefinement, | ||
const bool | surfaceRefinement, | ||
const bool | curvatureRefinement, | ||
const bool | smallFeatureRefinement, | ||
const bool | gapRefinement, | ||
const bool | bigGapRefinement, | ||
const bool | spreadGapSize, | ||
const label | maxGlobalCells, | ||
const label | maxLocalCells | ||
) | const |
Calculate list of cells to refine.
Disable refinement shortcut. nAllowRefine is per processor limit.
Definition at line 2045 of file meshRefinementRefine.C.
References Foam::cos(), Foam::degToRad(), Foam::endl(), forAll, Foam::Info, Foam::labelMax, Foam::max(), and List::setSize().
Foam::autoPtr< Foam::mapPolyMesh > refine | ( | const labelList & | cellsToRefine | ) |
Refine some cells.
Definition at line 2347 of file meshRefinementRefine.C.
References polyTopoChange::changeMesh(), and timeName.
Foam::autoPtr< Foam::mapDistributePolyMesh > refineAndBalance | ( | const string & | msg, |
decompositionMethod & | decomposer, | ||
fvMeshDistribute & | distributor, | ||
const labelList & | cellsToRefine, | ||
const scalar | maxLoadUnbalance | ||
) |
Refine some cells and rebalance.
Definition at line 2388 of file meshRefinementRefine.C.
References Foam::endl(), Foam::Info, Foam::mag(), MESH, Foam::Pout, Foam::returnReduce(), timeName, and write().
Foam::autoPtr< Foam::mapDistributePolyMesh > balanceAndRefine | ( | const string & | msg, |
decompositionMethod & | decomposer, | ||
fvMeshDistribute & | distributor, | ||
const labelList & | cellsToRefine, | ||
const scalar | maxLoadUnbalance | ||
) |
Balance before refining some cells.
Definition at line 2489 of file meshRefinementRefine.C.
References Foam::endl(), forAll, Foam::Info, Foam::mag(), MESH, Foam::Pout, Foam::returnReduce(), List::size(), timeName, and write().
void baffleAndSplitMesh | ( | const bool | handleSnapProblems, |
const snapParameters & | snapParams, | ||
const bool | useTopologicalSnapDetection, | ||
const bool | removeEdgeConnectedCells, | ||
const scalarField & | perpendicularAngle, | ||
const dictionary & | motionDict, | ||
Time & | runTime, | ||
const labelList & | globalToMasterPatch, | ||
const labelList & | globalToSlavePatch, | ||
const pointField & | locationsInMesh, | ||
const wordList & | regionsInMesh, | ||
const pointField & | locationsOutsideMesh | ||
) |
Split off unreachable areas of mesh.
Definition at line 3431 of file meshRefinementBaffles.C.
References cpuTime::cpuTimeIncrement(), Foam::endl(), Foam::Info, MESH, Foam::nl, Time::path(), Foam::Pout, Foam::returnReduce(), List::setSize(), timeName, and write().
void mergeFreeStandingBaffles | ( | const snapParameters & | snapParams, |
const bool | useTopologicalSnapDetection, | ||
const bool | removeEdgeConnectedCells, | ||
const scalarField & | perpendicularAngle, | ||
const scalar | planarAngle, | ||
const dictionary & | motionDict, | ||
Time & | runTime, | ||
const labelList & | globalToMasterPatch, | ||
const labelList & | globalToSlavePatch, | ||
const pointField & | locationsInMesh, | ||
const pointField & | locationsOutsideMesh | ||
) |
Merge free-standing baffles.
Definition at line 3606 of file meshRefinementBaffles.C.
References cpuTime::cpuTimeIncrement(), Foam::endl(), Foam::Info, Foam::nl, Foam::reduce(), and List::size().
Foam::autoPtr< Foam::mapPolyMesh > splitMesh | ( | const label | nBufferLayers, |
const labelList & | globalToMasterPatch, | ||
const labelList & | globalToSlavePatch, | ||
const pointField & | locationsInMesh, | ||
const wordList & | regionsInMesh, | ||
const pointField & | locationsOutsideMesh | ||
) |
Split off (with optional buffer layers) unreachable areas.
of mesh. Does not introduce baffles.
Definition at line 3699 of file meshRefinementBaffles.C.
References DynamicList::append(), List::clear(), Foam::endl(), f(), forAll, removeCells::getExposedFaces(), Foam::Info, Foam::labelMax, Foam::max(), regionSplit::nRegions(), pFaces, Foam::reduce(), DynamicList::shrink(), List::size(), List::transfer(), and WarningInFunction.
Foam::autoPtr< Foam::mapPolyMesh > dupNonManifoldPoints | ( | const localPointRegion & | regionSide | ) |
Find boundary points that connect to more than one cell.
region and split them.
Definition at line 3977 of file meshRefinementBaffles.C.
References polyTopoChange::changeMesh(), Foam::endl(), Foam::Info, Foam::returnReduce(), duplicatePoints::setRefinement(), and timeName.
Foam::autoPtr< Foam::mapPolyMesh > dupNonManifoldPoints | ( | ) |
Find boundary points that connect to more than one cell.
region and split them.
Definition at line 4035 of file meshRefinementBaffles.C.
References meshRefinement::mesh_.
Foam::autoPtr< Foam::mapPolyMesh > dupNonManifoldBoundaryPoints | ( | ) |
Find boundary points that are on faceZones of type boundary.
and duplicate them
Definition at line 4113 of file meshRefinementBaffles.C.
References surfaceZonesInfo::BAFFLE, surfaceZonesInfo::BOUNDARY, Foam::endl(), f(), surfaceZonesInfo::faceZoneTypeNames, forAll, Foam::Info, surfaceZonesInfo::INTERNAL, Foam::max(), n, Foam::returnReduce(), and syncTools::syncPointList().
Foam::autoPtr< Foam::mapPolyMesh > mergePoints | ( | const labelList & | pointToDuplicate | ) |
Merge duplicate points.
Definition at line 4045 of file meshRefinementBaffles.C.
References polyTopoChange::changeMesh(), forAll, polyMeshAdder::mergePoints(), Foam::returnReduce(), and timeName.
Foam::autoPtr< Foam::mapPolyMesh > createBaffles | ( | const labelList & | ownPatch, |
const labelList & | neiPatch | ||
) |
Create baffle for every internal face where ownPatch != -1.
External faces get repatched according to ownPatch (neiPatch should be -1 for these)
Redo the intersections on the newly create baffle faces. Note that
this changes also the cell centre positions.
Definition at line 532 of file meshRefinementBaffles.C.
References Foam::abort(), polyTopoChange::changeMesh(), polyPatch::coupled(), Foam::endl(), Foam::faceMap(), Foam::FatalError, FatalErrorInFunction, forAll, HashSet< Key, Hash >::insert(), Foam::returnReduce(), List::size(), polyPatch::start(), faceSet::sync(), timeName, and HashTable::toc().
Foam::labelList getZones | ( | const List< surfaceZonesInfo::faceZoneType > & | fzTypes | ) | const |
Get zones of given type.
Definition at line 712 of file meshRefinementBaffles.C.
References DynamicList::append(), Foam::findIndex(), forAll, and zone::name().
Referenced by autoSnapDriver::getInternalOrBaffleDuplicateFace().
|
static |
Subset baffles according to zones.
Definition at line 739 of file meshRefinementBaffles.C.
References DynamicList::append(), forAll, mesh, p, and List::size().
Referenced by autoLayerDriver::addLayers(), and autoSnapDriver::getInternalOrBaffleDuplicateFace().
Foam::autoPtr< Foam::mapPolyMesh > createZoneBaffles | ( | const labelList & | zoneIDs, |
List< labelPair > & | baffles, | ||
labelList & | originatingFaceZone | ||
) |
Create baffles for faces on faceZones. Return created baffles.
(= pairs of faces) and corresponding faceZone
Definition at line 773 of file meshRefinementBaffles.C.
References Foam::abort(), List::clear(), Foam::endl(), Foam::exit(), Foam::faceMap(), Foam::FatalError, FatalErrorInFunction, faceZone::flipMap(), forAll, Foam::Info, MESH, zone::name(), Foam::nl, Foam::Pout, Foam::returnReduce(), Foam::setf(), List::setSize(), Foam::setw(), List::size(), Foam::sum(), timeName, and write().
Foam::autoPtr< Foam::mapPolyMesh > mergeBaffles | ( | const List< labelPair > & | couples, |
const Map< label > & | faceToPatch | ||
) |
Merge baffles. Gets pairs of faces and boundary faces to move.
onto (coupled) patches
Definition at line 1207 of file meshRefinementBaffles.C.
References polyTopoChange::changeMesh(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, faceZone::flipMap(), forAll, forAllConstIter(), Foam::returnReduce(), polyTopoChange::setAction(), List::setSize(), List::size(), timeName, faceZone::whichFace(), and ZoneMesh::whichZone().
Foam::autoPtr< Foam::mapPolyMesh > mergeZoneBaffles | ( | const bool | doInternalZones, |
const bool | doBaffleZones | ||
) |
Merge all baffles on faceZones.
Definition at line 1386 of file meshRefinementBaffles.C.
References DynamicList::append(), Foam::returnReduce(), and List::size().
Foam::autoPtr< Foam::mapPolyMesh > zonify | ( | const bool | allowFreeStandingZoneFaces, |
const pointField & | locationsInMesh, | ||
const wordList & | regionsInMesh, | ||
wordPairHashTable & | zonesToFaceZone | ||
) |
Put faces/cells into zones according to surface specification.
Returns null if no zone surfaces present. Regions containing locationsInMesh/regionsInMesh will be put in corresponding cellZone. keepPoints is for backwards compatibility and sets all yet unassigned cells to be non-zoned (zone = -1)
Per face index of faceZone or -1
Definition at line 4212 of file meshRefinementBaffles.C.
References Foam::abort(), surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZone(), surfaceZonesInfo::addFaceZonesToMesh(), polyTopoChange::changeMesh(), polyPatch::coupled(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, ZoneMesh::findZoneID(), Pair::first(), forAll, syncTools::getMasterFaces(), surfaceZonesInfo::getNamedSurfaces(), Foam::indent(), Foam::Info, HashTable::insert(), PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), Pstream::mapCombineGather(), Pstream::mapCombineScatter(), n, zone::name(), Foam::nl, patches, Foam::returnReduce(), Pair::second(), List::size(), HashTable::size(), HashTable::sortedToc(), polyPatch::start(), Foam::Swap(), syncTools::swapBoundaryCellList(), timeName, and OBJstream::write().
|
static |
Helper:append patch to end of mesh.
Definition at line 1891 of file meshRefinement.C.
References fvMesh::boundary(), polyMesh::boundaryMesh(), fvMesh::clearOut(), mesh, fvPatch::New(), polyPatch::New(), PtrList::set(), PtrList::setSize(), and PtrList::size().
|
static |
Helper:add patch to mesh. Update all registered fields.
Used by addMeshedPatch to add patches originating from surfaces.
Definition at line 1990 of file meshRefinement.C.
References fvMesh::boundary(), polyMesh::boundaryMesh(), polyBoundaryMesh::findPatchID(), forAll, mesh, primitiveMesh::nFaces(), polyBoundaryMesh::reorder(), PtrList::reorder(), dictionary::set(), PtrList::size(), and polyPatch::start().
Foam::label addMeshedPatch | ( | const word & | name, |
const dictionary & | patchInfo | ||
) |
Add patch originating from meshing. Update meshedPatches_.
Definition at line 2068 of file meshRefinement.C.
References Foam::findIndex(), and Foam::name().
Referenced by autoRefineDriver::addFaceZones(), and main().
Foam::labelList meshedPatches | ( | ) | const |
Get patchIDs for patches added in addMeshedPatch.
Definition at line 2118 of file meshRefinement.C.
References Foam::abort(), DynamicList::append(), polyPatch::constraintType(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, patches, and Foam::type().
Referenced by main().
Foam::label addFaceZone | ( | const word & | fzName, |
const word & | masterPatch, | ||
const word & | slavePatch, | ||
const surfaceZonesInfo::faceZoneType & | fzType | ||
) |
Add/lookup faceZone and update information. Return index of.
Definition at line 2145 of file meshRefinement.C.
References surfaceZonesInfo::addFaceZone().
Referenced by autoRefineDriver::addFaceZones(), and main().
bool getFaceZoneInfo | ( | const word & | fzName, |
label & | masterPatchID, | ||
label & | slavePatchID, | ||
surfaceZonesInfo::faceZoneType & | fzType | ||
) | const |
Lookup faceZone information. Return false if no information.
for faceZone
Definition at line 2169 of file meshRefinement.C.
References polyBoundaryMesh::findPatchID().
Referenced by main().
void selectSeparatedCoupledFaces | ( | boolList & | selected | ) | const |
Select coupled faces that are not collocated.
Definition at line 2197 of file meshRefinement.C.
References forAll, coupledPolyPatch::parallel(), patches, coupledPolyPatch::separated(), and polyPatch::start().
void updateIntersections | ( | const labelList & | changedFaces | ) |
Find any intersection of surface. Store in surfaceIndex_.
Definition at line 269 of file meshRefinement.C.
References meshRefinement::calcNeighbourData(), primitiveMesh::cellCentres(), meshRefinement::countHits(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::facesInstance(), refinementSurfaces::findHigherIntersection(), forAll, PackedList::get(), syncTools::getMasterFaces(), Foam::Info, primitiveMesh::isInternalFace(), meshRefinement::mesh_, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, Foam::reduce(), Foam::returnReduce(), meshRefinement::setInstance(), meshRefinement::shells_, List::size(), meshRefinement::surfaceIndex_, meshRefinement::surfaces_, and syncTools::syncFaceList().
Referenced by main().
|
static |
Find region point is in. Uses optional perturbation to re-test.
Definition at line 2224 of file meshRefinement.C.
References polyMesh::findCell(), mesh, p, Foam::reduce(), and polyMesh::tetBasePtIs().
|
static |
Definition at line 2321 of file meshRefinement.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), forAll, mesh, and primitiveMesh::nCells().
Foam::autoPtr< Foam::mapPolyMesh > splitMeshRegions | ( | const labelList & | globalToMasterPatch, |
const labelList & | globalToSlavePatch, | ||
const pointField & | locationsInMesh, | ||
const pointField & | locationsOutsideMesh | ||
) |
Split mesh. Keep part containing point. Return empty map if.
no cells removed.
Definition at line 2403 of file meshRefinement.C.
References DynamicList::append(), Foam::endl(), forAll, removeCells::getExposedFaces(), Foam::Info, regionSplit::nRegions(), Foam::returnReduce(), List::setSize(), DynamicList::shrink(), List::size(), and WarningInFunction.
void doSplitFaces | ( | const labelList & | splitFaces, |
const labelPairList & | splits, | ||
polyTopoChange & | meshMod | ||
) | const |
Split faces into two.
Definition at line 740 of file meshRefinement.C.
References polyTopoChange::addFace(), f(), f1, faceZone::flipMap(), forAll, polyTopoChange::modifyFace(), List::size(), and faceZone::whichFace().
Foam::label splitFacesUndo | ( | const labelList & | splitFaces, |
const labelPairList & | splits, | ||
const dictionary & | motionDict, | ||
labelList & | duplicateFace, | ||
List< labelPair > & | baffles | ||
) |
Split faces along diagonal. Maintain mesh quality. Return.
total number of faces split.
Definition at line 855 of file meshRefinement.C.
References DynamicList::append(), polyTopoChange::changeMesh(), motionSmootherAlgo::checkMesh(), HashTable::clear(), Foam::endl(), Foam::exit(), Foam::faceMap(), polyTopoChange::faces(), Foam::FatalError, FatalErrorInFunction, Pair::first(), faceZone::flipMap(), forAll, HashTable::found(), Foam::Info, Foam::inplaceRenumber(), HashSet< Key, Hash >::insert(), polyTopoChange::modifyFace(), n, Foam::nl, polyTopoChange::points(), polyTopoChange::removeFace(), Foam::renumber(), Foam::returnReduce(), Pair::second(), polyTopoChange::setCapacity(), List::setSize(), List::size(), HashTable::size(), timeName, meshRefinement::updateList(), and faceZone::whichFace().
void distribute | ( | const mapDistributePolyMesh & | map | ) |
Update local numbering for mesh redistribution.
Definition at line 2505 of file meshRefinement.C.
References autoPtr::clear(), mapDistributePolyMesh::distributeFaceData(), Foam::e, treeBoundBox::extend(), Foam::faceMap(), forAll, meshBb, and rndGen().
void updateMesh | ( | const mapPolyMesh & | map, |
const labelList & | changedFaces | ||
) |
Update for external change to mesh. changedFaces are in new mesh.
face labels.
Definition at line 2568 of file meshRefinement.C.
Helper: reorder list according to map.
Definition at line 35 of file meshRefinementTemplates.C.
References forAll, List::size(), and List::transfer().
Referenced by autoLayerDriver::addLayers(), and meshRefinement::splitFacesUndo().
void storeData | ( | const labelList & | pointsToStore, |
const labelList & | facesToStore, | ||
const labelList & | cellsToStore | ||
) |
Signal points/face/cells for which to store data.
Definition at line 2580 of file meshRefinement.C.
void updateMesh | ( | const mapPolyMesh & | map, |
const labelList & | changedFaces, | ||
const Map< label > & | pointsToRestore, | ||
const Map< label > & | facesToRestore, | ||
const Map< label > & | cellsToRestore | ||
) |
Update local numbering + undo.
Data to restore given as new pointlabel + stored pointlabel (i.e. what was in pointsToStore)
Definition at line 2597 of file meshRefinement.C.
References mapPolyMesh::faceMap(), forAll, forAllConstIter(), mapPolyMesh::reverseFaceMap(), List::size(), and dictionary::transfer().
Foam::label mergePatchFaces | ( | const scalar | minCos, |
const scalar | concaveCos, | ||
const label | mergeSize, | ||
const labelList & | patchIDs | ||
) |
Merge coplanar faces if sets are of size mergeSize.
(usually 4)
Definition at line 39 of file meshRefinementMerge.C.
References polyTopoChange::changeMesh(), polyPatch::coupled(), Foam::endl(), forAll, combineFaces::getMergeSets(), Foam::Info, HashSet< Key, Hash >::insert(), Foam::nl, patches, Foam::returnReduce(), combineFaces::setRefinement(), List::setSize(), List::size(), polyPatch::start(), timeName, and combineFaces::updateMesh().
Foam::label mergePatchFacesUndo | ( | const scalar | minCos, |
const scalar | concaveCos, | ||
const labelList & | patchIDs, | ||
const dictionary & | motionDict, | ||
const labelList & | preserveFaces | ||
) |
Merge coplanar faces. preserveFaces is != -1 for faces.
to be preserved
Definition at line 253 of file meshRefinementMerge.C.
References DynamicList::append(), polyTopoChange::changeMesh(), Foam::polyMeshGenChecks::checkMesh(), polyPatch::coupled(), Foam::endl(), forAll, forAllConstIter(), HashTable::found(), combineFaces::getMergeSets(), Foam::Info, Foam::inplaceMapKey(), HashSet< Key, Hash >::insert(), IOobject::instance(), combineFaces::masterFace(), MESH, Foam::nl, IOobject::objectPath(), patches, Foam::Pout, Foam::returnReduce(), combineFaces::savedPointLabels(), combineFaces::setRefinement(), List::setSize(), combineFaces::setUnrefinement(), DynamicList::shrink(), List::size(), HashTable::size(), polyPatch::start(), timeName, combineFaces::updateMesh(), write(), and regIOobject::write().
Foam::autoPtr< Foam::mapPolyMesh > doRemovePoints | ( | removePoints & | pointRemover, |
const boolList & | pointCanBeDeleted | ||
) |
Definition at line 632 of file meshRefinementMerge.C.
References polyTopoChange::changeMesh(), Foam::endl(), forAll, HashSet< Key, Hash >::insert(), Foam::Pout, removePoints::savedFaceLabels(), removePoints::setRefinement(), List::size(), timeName, and removePoints::updateMesh().
Foam::autoPtr< Foam::mapPolyMesh > doRestorePoints | ( | removePoints & | pointRemover, |
const labelList & | facesToRestore | ||
) |
Definition at line 690 of file meshRefinementMerge.C.
References polyTopoChange::changeMesh(), Foam::endl(), forAll, removePoints::getUnrefimentSet(), HashSet< Key, Hash >::insert(), Foam::Pout, removePoints::setUnrefinement(), List::size(), timeName, and removePoints::updateMesh().
Foam::labelList collectFaces | ( | const labelList & | candidateFaces, |
const labelHashSet & | set | ||
) | const |
Definition at line 763 of file meshRefinementMerge.C.
References Foam::findIndices(), forAll, and HashTable::found().
Foam::labelList growFaceCellFace | ( | const labelHashSet & | set | ) | const |
Definition at line 795 of file meshRefinementMerge.C.
References Foam::findIndices(), forAll, and forAllConstIter().
Foam::label mergeEdgesUndo | ( | const scalar | minCos, |
const dictionary & | motionDict | ||
) |
Merge edges, maintain mesh quality. Return global number.
of edges merged
Definition at line 837 of file meshRefinementMerge.C.
References Foam::polyMeshGenChecks::checkMesh(), removePoints::countPointUsage(), Foam::endl(), Foam::Info, IOobject::instance(), MESH, n, Foam::nl, IOobject::objectPath(), Foam::Pout, Foam::returnReduce(), removePoints::savedFaceLabels(), List::size(), HashTable::size(), timeName, write(), and regIOobject::write().
void checkData | ( | ) |
Debugging: check that all faces still obey start()>end()
Definition at line 466 of file meshRefinement.C.
References Foam::endl(), localPointRegion::findDuplicateFaces(), forAll, Foam::identity(), Foam::Pout, syncTools::swapBoundaryFaceList(), syncTools::syncBoundaryFacePositions(), and WarningInFunction.
|
static |
Definition at line 373 of file meshRefinement.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, fld(), forAll, Foam::mag(), mesh, Foam::nl, primitiveMesh::nPoints(), polyMesh::points(), Foam::Pout, and syncTools::syncPointList().
|
static |
Definition at line 420 of file meshRefinement.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, fld(), forAll, Foam::mag(), mesh, Foam::nl, primitiveMesh::nPoints(), polyMesh::points(), Foam::Pout, syncTools::syncPointList(), and Vector< scalar >::zero.
void testSyncBoundaryFaceList | ( | const scalar | mergeDistance, |
const string & | msg, | ||
const UList< T > & | faceData, | ||
const UList< T > & | syncedFaceData | ||
) | const |
Compare two lists over all boundary faces.
Definition at line 102 of file meshRefinementTemplates.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), patchIdentifier::name(), patches, UList::size(), polyPatch::start(), and T.
Print list according to (collected and) sorted coordinate.
Definition at line 159 of file meshRefinementTemplates.C.
References Foam::DelaunayMeshTools::allPoints(), Foam::endl(), forAll, Foam::identity(), Foam::Info, Foam::mag(), points, and Foam::sortedOrder().
|
static |
Determine master point for subset of points. If coupled.
chooses only one
Definition at line 2747 of file meshRefinement.C.
References forAll, Foam::labelMax, mesh, List::size(), and syncTools::syncPointList().
Referenced by medialAxisMeshMover::calculateDisplacement(), displacementMotionSolverMeshMover::move(), and medialAxisMeshMover::update().
|
static |
Determine master edge for subset of edges. If coupled.
chooses only one
Definition at line 2784 of file meshRefinement.C.
References forAll, Foam::labelMax, mesh, List::size(), syncTools::syncEdgeList(), and globalIndex::toGlobal().
Referenced by medialAxisMeshMover::calculateDisplacement(), displacementMotionSolverMeshMover::move(), and medialAxisMeshMover::update().
void printMeshInfo | ( | const bool | debug, |
const string & | msg | ||
) | const |
Print some mesh stats.
Definition at line 2820 of file meshRefinement.C.
References Foam::endl(), forAll, syncTools::getMasterFaces(), syncTools::getMasterPoints(), Foam::gMax(), Foam::Info, Pstream::listCombineGather(), Pstream::listCombineScatter(), globalMeshData::nTotalCells(), Foam::Pout, and Foam::returnReduce().
Referenced by main(), and writeMesh().
Foam::word timeName | ( | ) | const |
Replacement for Time::timeName() : return oldInstance (if.
Return either time().constant() or oldInstance.
overwrite_)
Definition at line 2888 of file meshRefinement.C.
Referenced by main(), autoSnapDriver::preSmoothPatch(), and writeMesh().
void setInstance | ( | const fileName & | inst | ) |
Set instance of all local IOobjects.
Definition at line 670 of file meshRefinement.C.
Referenced by meshRefinement::updateIntersections().
bool write | ( | ) | const |
Write mesh and all data.
Definition at line 2707 of file meshRefinement.C.
Referenced by main(), autoSnapDriver::preSmoothPatch(), and writeMesh().
void dumpRefinementLevel | ( | ) | const |
Write refinement level as volScalarFields for postprocessing.
Definition at line 2901 of file meshRefinement.C.
References IOobject::AUTO_WRITE, Foam::dimless, forAll, MeshObject< polyMesh, UpdateableMeshObject, pointMesh >::New(), IOobject::NO_READ, and IOobject::NO_WRITE.
void dumpIntersections | ( | const fileName & | prefix | ) | const |
Debug: Write intersection information to OBJ format.
Definition at line 2963 of file meshRefinement.C.
References Foam::endl(), forAll, OFstream::name(), Foam::nl, Foam::Pout, List::size(), and Foam::meshTools::writeOBJ().
void write | ( | const debugType | debugFlags, |
const writeType | writeFlags, | ||
const fileName & | prefix | ||
) | const |
Do any one of above IO functions.
Definition at line 3044 of file meshRefinement.C.
References write().
|
static |
Helper: calculate average.
Definition at line 59 of file meshRefinementTemplates.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, n, Foam::reduce(), PackedList::size(), UList::size(), Foam::sum(), and T.
Referenced by fieldSmoother::smoothLambdaMuDisplacement(), fieldSmoother::smoothNormals(), and fieldSmoother::smoothPatchNormals().
|
static |
Get/set write level.
Definition at line 3065 of file meshRefinement.C.
Referenced by autoLayerDriver::addLayers(), autoSnapDriver::doSnap(), main(), and autoLayerDriver::writeLayerData().
|
static |
Definition at line 3071 of file meshRefinement.C.
|
static |
Get/set output level.
Definition at line 3077 of file meshRefinement.C.
Referenced by main().
|
static |
Definition at line 3083 of file meshRefinement.C.
|
static |
Helper: convert wordList into bit pattern using provided.
Definition at line 261 of file meshRefinementTemplates.C.
References forAll.
Referenced by main().
|
static |
Definition at line 99 of file meshRefinement.H.
Referenced by main().
|
static |
Definition at line 115 of file meshRefinement.H.
Referenced by main().
|
static |
Definition at line 129 of file meshRefinement.H.
Referenced by main().
|
staticprivate |
Control of writing level.
Definition at line 152 of file meshRefinement.H.
|
staticprivate |
Control of output/log level.
Definition at line 155 of file meshRefinement.H.
|
private |
Reference to mesh.
Definition at line 161 of file meshRefinement.H.
Referenced by meshRefinement::dupNonManifoldPoints(), meshRefinement::mesh(), and meshRefinement::updateIntersections().
|
private |
Tolerance used for sorting coordinates (used in 'less' routine)
Definition at line 164 of file meshRefinement.H.
Referenced by meshRefinement::mergeDistance().
|
private |
Overwrite the mesh?
Definition at line 167 of file meshRefinement.H.
Referenced by meshRefinement::overwrite().
|
private |
Instance of mesh upon construction. Used when in overwrite_ mode.
Definition at line 170 of file meshRefinement.H.
Referenced by meshRefinement::oldInstance().
|
private |
All surface-intersection interaction.
Definition at line 173 of file meshRefinement.H.
Referenced by meshRefinement::surfaces(), and meshRefinement::updateIntersections().
|
private |
All feature-edge interaction.
Definition at line 176 of file meshRefinement.H.
Referenced by meshRefinement::features().
|
private |
All shell-refinement interaction.
Definition at line 179 of file meshRefinement.H.
Referenced by meshRefinement::shells(), and meshRefinement::updateIntersections().
|
private |
All limit-refinement interaction.
Definition at line 182 of file meshRefinement.H.
|
private |
Refinement engine.
Definition at line 185 of file meshRefinement.H.
Referenced by meshRefinement::meshCutter().
|
private |
Per cc-cc vector the index of the surface hit.
Definition at line 188 of file meshRefinement.H.
Referenced by meshRefinement::surfaceIndex(), and meshRefinement::updateIntersections().
Original patch for baffle faces that used to be on.
coupled patches
Definition at line 195 of file meshRefinement.H.
User supplied face based data.
Definition at line 199 of file meshRefinement.H.
Referenced by meshRefinement::userFaceData().
|
private |
Meshed patches - are treated differently. Stored as wordList since.
order changes.
Definition at line 203 of file meshRefinement.H.
FaceZone to master patch name.
Definition at line 206 of file meshRefinement.H.
FaceZone to slave patch name.
Definition at line 209 of file meshRefinement.H.
|
private |
FaceZone to method to handle faces.
Definition at line 212 of file meshRefinement.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.