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, IONOWRITEREFINEMENT, IOWRITELEVELS, IOWRITELAYERSETS, IOWRITELAYERFIELDS } |
Enumeration for what to write. More... | |
enum | writeType { WRITEMESH = 1<<IOWRITEMESH, NOWRITEREFINEMENT = 1<<IONOWRITEREFINEMENT, 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 dictionary &refineDict, const scalar mergeDistance, const bool overwrite, refinementSurfaces &, const refinementFeatures &, const refinementRegions &) | |
Construct from components. More... | |
meshRefinement (const meshRefinement &)=delete | |
Disallow default bitwise copy construction. 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 refinementRegions & | 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 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< polyDistributionMap > | 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 List< point > &insidePoints, const scalar curvature, const scalar planarAngle, const bool featureRefinement, const bool featureDistanceRefinement, const bool internalRefinement, const bool surfaceRefinement, const bool curvatureRefinement, const bool gapRefinement, const label maxGlobalCells, const label maxLocalCells) const |
Calculate list of cells to refine. More... | |
autoPtr< polyTopoChangeMap > | refine (const labelList &cellsToRefine) |
Refine some cells. More... | |
autoPtr< polyDistributionMap > | refineAndBalance (const string &msg, decompositionMethod &decomposer, fvMeshDistribute &distributor, const labelList &cellsToRefine, const scalar maxLoadUnbalance) |
Refine some cells and rebalance. More... | |
autoPtr< polyDistributionMap > | 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 bool mergeFreeStanding, const scalar freeStandingAngle, const dictionary &motionDict, Time &runTime, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const refinementParameters::cellSelectionPoints &selectionPoints) |
Split off unreachable areas of mesh. More... | |
autoPtr< polyTopoChangeMap > | splitMesh (const label nBufferLayers, const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const refinementParameters::cellSelectionPoints &selectionPoints) |
Split off (with optional buffer layers) unreachable areas. More... | |
autoPtr< polyTopoChangeMap > | dupNonManifoldPoints (const localPointRegion &) |
Find boundary points that connect to more than one cell. More... | |
autoPtr< polyTopoChangeMap > | dupNonManifoldPoints () |
Find boundary points that connect to more than one cell. More... | |
autoPtr< polyTopoChangeMap > | createBaffles (const labelList &ownPatch, const labelList &nbrPatch) |
Create baffle for every internal face where ownPatch != -1. More... | |
void | checkZoneFaces () const |
Debug helper: check faceZones are not on processor patches. More... | |
autoPtr< polyTopoChangeMap > | createZoneBaffles (const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, List< labelPair > &) |
Create baffles for faces straddling zoned surfaces. Return. More... | |
autoPtr< polyTopoChangeMap > | mergeBaffles (const List< labelPair > &) |
Merge baffles. Gets pairs of faces. More... | |
autoPtr< polyTopoChangeMap > | zonify (const List< point > &insidePoints, const bool allowFreeStandingZoneFaces) |
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... | |
void | selectSeparatedCoupledFaces (boolList &) const |
Select coupled faces that are not collocated. More... | |
autoPtr< polyTopoChangeMap > | splitMeshRegions (const labelList &globalToMasterPatch, const labelList &globalToSlavePatch, const refinementParameters::cellSelectionPoints &selectionPoints) |
Split mesh according to selectionPoints. More... | |
autoPtr< polyTopoChangeMap > | splitFaces (const labelList &splitFaces, const labelPairList &splits) |
Split faces into two. More... | |
void | distribute (const polyDistributionMap &) |
Update local numbering for mesh redistribution. More... | |
void | topoChange (const polyTopoChangeMap &, 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 | topoChange (const polyTopoChangeMap &, const labelList &changedFaces, const Map< label > &pointsToRestore, const Map< label > &facesToRestore, const Map< label > &cellsToRestore) |
Update local numbering + undo. More... | |
label | mergePatchFacesUndo (const scalar minCos, const scalar concaveCos, const labelHashSet &patchIDs, const dictionary &motionDict, const labelList &preserveFaces) |
Merge coplanar faces. preserveFaces is != -1 for faces. More... | |
autoPtr< polyTopoChangeMap > | doRemovePoints (removePoints &pointRemover, const boolList &pointCanBeDeleted) |
autoPtr< polyTopoChangeMap > | 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... | |
void | operator= (const meshRefinement &)=delete |
Disallow default bitwise assignment. 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 label | findRegion (const polyMesh &, const labelList &cellRegion, const vector &perturbVec, const point &location) |
Find region point is in. Uses optional perturbation to re-test. More... | |
static void | findRegions (const polyMesh &, labelList &cellRegion, const vector &perturbVec, const refinementParameters::cellSelectionPoints &selectionPoints) |
Find regions points are in and update cellRegion. More... | |
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, 5 > | IOwriteTypeNames |
Helper class which maintains intersections of (changing) mesh with (static) surfaces.
Definition at line 81 of file meshRefinement.H.
enum IOdebugType |
Enumeration for what to debug.
Enumerator | |
---|---|
IOMESH | |
IOOBJINTERSECTIONS | |
IOFEATURESEEDS | |
IOATTRACTION | |
IOLAYERINFO |
Definition at line 89 of file meshRefinement.H.
enum debugType |
Enumerator | |
---|---|
MESH | |
OBJINTERSECTIONS | |
FEATURESEEDS | |
ATTRACTION | |
LAYERINFO |
Definition at line 99 of file meshRefinement.H.
enum IOoutputType |
Enumeration for what to output.
Enumerator | |
---|---|
IOOUTPUTLAYERINFO |
Definition at line 109 of file meshRefinement.H.
enum outputType |
Enumerator | |
---|---|
OUTPUTLAYERINFO |
Definition at line 115 of file meshRefinement.H.
enum IOwriteType |
Enumeration for what to write.
Enumerator | |
---|---|
IOWRITEMESH | |
IONOWRITEREFINEMENT | |
IOWRITELEVELS | |
IOWRITELAYERSETS | |
IOWRITELAYERFIELDS |
Definition at line 121 of file meshRefinement.H.
enum writeType |
Enumerator | |
---|---|
WRITEMESH | |
NOWRITEREFINEMENT | |
WRITELEVELS | |
WRITELAYERSETS | |
WRITELAYERFIELDS |
Definition at line 131 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 141 of file meshRefinement.H.
meshRefinement | ( | fvMesh & | mesh, |
const dictionary & | refineDict, | ||
const scalar | mergeDistance, | ||
const bool | overwrite, | ||
refinementSurfaces & | surfaces, | ||
const refinementFeatures & | features, | ||
const refinementRegions & | shells | ||
) |
Construct from components.
Definition at line 1161 of file meshRefinement.C.
References Foam::identity(), dictionary::lookupOrDefault(), and refinementSurfaces::setMinLevelFields().
Referenced by meshRefinement::splitFaces().
|
delete |
Disallow default bitwise copy construction.
ClassName | ( | "meshRefinement" | ) |
Runtime type information.
|
inline |
Reference to mesh.
Definition at line 610 of file meshRefinement.H.
Referenced by snappySnapDriver::calcNearestSurface(), snappySnapDriver::preSmoothPatch(), and meshRefinement::userFaceData().
|
inline |
Definition at line 615 of file meshRefinement.H.
|
inline |
Definition at line 620 of file meshRefinement.H.
Referenced by meshRefinement::userFaceData().
|
inline |
Overwrite the mesh?
Definition at line 626 of file meshRefinement.H.
|
inline |
(points)instance of mesh upon construction
Definition at line 632 of file meshRefinement.H.
|
inline |
Reference to surface search engines.
Definition at line 638 of file meshRefinement.H.
Referenced by snappySnapDriver::calcNearestSurface().
|
inline |
Reference to feature edge mesh.
Definition at line 644 of file meshRefinement.H.
|
inline |
Reference to refinement shells (regions)
Definition at line 650 of file meshRefinement.H.
|
inline |
Reference to meshcutting engine.
Definition at line 656 of file meshRefinement.H.
|
inline |
Per start-end edge the index of the surface hit.
Definition at line 662 of file meshRefinement.H.
|
inline |
Definition at line 667 of file meshRefinement.H.
References meshRefinement::userFaceData().
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 676 of file meshRefinement.H.
Referenced by meshRefinement::surfaceIndex().
Definition at line 681 of file meshRefinement.H.
References meshRefinement::addMeshedPatch(), meshRefinement::baffleAndSplitMesh(), meshRefinement::balance(), meshRefinement::balanceAndRefine(), meshRefinement::calculateEdgeWeights(), meshRefinement::checkCoupledFaceZones(), meshRefinement::checkData(), meshRefinement::checkZoneFaces(), meshRefinement::collectAndPrint(), meshRefinement::collectFaces(), meshRefinement::countHits(), meshRefinement::createBaffles(), meshRefinement::createZoneBaffles(), meshRefinement::distribute(), meshRefinement::doRemovePoints(), meshRefinement::doRestorePoints(), meshRefinement::dumpIntersections(), meshRefinement::dumpRefinementLevel(), meshRefinement::dupNonManifoldPoints(), meshRefinement::findRegion(), meshRefinement::findRegions(), fld(), meshRefinement::gAverage(), meshRefinement::getMasterEdges(), meshRefinement::getMasterPoints(), meshRefinement::growFaceCellFace(), insidePoints(), meshRefinement::intersectedFaces(), meshRefinement::intersectedPoints(), meshRefinement::isGap(), meshRefinement::isNormalGap(), meshRefinement::makeDisplacementField(), meshRefinement::makePatch(), meshRefinement::mergeBaffles(), meshRefinement::mergeDistance(), meshRefinement::mergeEdgesUndo(), meshRefinement::mergePatchFacesUndo(), meshRefinement::mesh(), meshRefinement::meshedPatches(), Foam::name(), meshRefinement::operator=(), meshRefinement::outputLevel(), points, meshRefinement::printMeshInfo(), meshRefinement::readFlags(), meshRefinement::refine(), meshRefinement::refineAndBalance(), meshRefinement::refineCandidates(), meshRefinement::selectSeparatedCoupledFaces(), meshRefinement::setInstance(), meshRefinement::splitFaces(), meshRefinement::splitMesh(), meshRefinement::splitMeshRegions(), meshRefinement::storeData(), Foam::sum(), Foam::T(), meshRefinement::testSyncBoundaryFaceList(), meshRefinement::testSyncPointList(), meshRefinement::timeName(), meshRefinement::topoChange(), meshRefinement::updateList(), meshRefinement::weightedSum(), meshRefinement::write(), meshRefinement::writeLevel(), and meshRefinement::zonify().
Foam::label countHits | ( | ) | const |
Count number of intersections (local)
Definition at line 1213 of file meshRefinement.C.
References meshRefinement::balance(), forAll, PackedList< nBits >::get(), and syncTools::getMasterFaces().
Referenced by meshRefinement::baffleAndSplitMesh(), and meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyDistributionMap > 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 1376 of file meshRefinement.C.
References fvMeshDistribute::countCells(), decompositionMethod::decompose(), fvMeshDistribute::distribute(), Foam::endl(), localPointRegion::findDuplicateFacePairs(), Pair< Type >::first(), forAll, Foam::Info, Pstream::listCombineGather(), Pstream::listCombineScatter(), UPstream::parRun(), Foam::Pout, Foam::reduce(), Foam::returnReduce(), Pair< Type >::second(), decompositionMethod::setConstraints(), List< T >::setSize(), List< T >::size(), refinementSurfaces::surfZones(), syncTools::syncFaceList(), timeName, and polyBoundaryMesh::whichPatch().
Referenced by meshRefinement::countHits(), and meshRefinement::userFaceData().
Foam::labelList intersectedFaces | ( | ) | const |
Get faces with intersection.
Definition at line 1653 of file meshRefinement.C.
References forAll.
Referenced by meshRefinement::userFaceData(), and meshRefinement::zonify().
Foam::labelList intersectedPoints | ( | ) | const |
Get points on surfaces with intersection and boundary faces.
Definition at line 1679 of file meshRefinement.C.
References f(), forAll, and meshRefinement::makePatch().
Referenced by meshRefinement::userFaceData().
|
static |
Create patch from set of patches.
Definition at line 1747 of file meshRefinement.C.
References polyMesh::boundaryMesh(), polyMesh::faces(), forAll, meshRefinement::makeDisplacementField(), patches, polyMesh::points(), and polyPatch::start().
Referenced by snappyLayerDriver::addLayers(), snappySnapDriver::doSnap(), meshRefinement::intersectedPoints(), snappySnapDriver::repatchToSurface(), and meshRefinement::userFaceData().
|
static |
Helper function to make a pointVectorField with correct.
bcs for mesh movement:
Definition at line 1792 of file meshRefinement.C.
References pointMesh::boundary(), Foam::dimLength, forAll, GeometricField< vector, pointPatchField, pointMesh >::New(), patchi, UPtrList< T >::size(), and Foam::Zero.
Referenced by snappySnapDriver::doSnap(), meshRefinement::makePatch(), and meshRefinement::userFaceData().
|
static |
Helper function: check that face zones are synced.
Definition at line 1840 of file meshRefinement.C.
References Foam::abort(), meshRefinement::calculateEdgeWeights(), Foam::exit(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, forAll, Pstream::gatherList(), UPstream::myProcNo(), zone::name(), IOobject::name(), MeshZones< ZoneType, MeshType >::names(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, UPstream::nProcs(), Pstream::scatterList(), and syncTools::swapBoundaryFaceList().
Referenced by snappyRefineDriver::snappyRefineDriver(), and meshRefinement::userFaceData().
|
static |
Helper: calculate edge weights (1/length)
Definition at line 1928 of file meshRefinement.C.
References meshRefinement::addMeshedPatch(), Foam::e, forAll, Foam::mag(), Foam::max(), polyMesh::points(), List< T >::setSize(), List< T >::size(), and PackedList< nBits >::size().
Referenced by meshRefinement::checkCoupledFaceZones(), and meshRefinement::userFaceData().
|
static |
Helper: weighted sum (over all subset of mesh points) by.
summing contribution from (master) edges
Definition at line 221 of file meshRefinementTemplates.C.
References Foam::abort(), Foam::constant::electromagnetic::e, Foam::FatalError, FatalErrorInFunction, forAll, List< Type >::setSize(), List< T >::size(), List< Type >::size(), PackedList< nBits >::size(), and Foam::Zero.
Referenced by meshRefinement::readFlags(), and meshRefinement::userFaceData().
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 1504 of file meshRefinementRefine.C.
References meshRefinement::isNormalGap(), Foam::mag(), Foam::Zero, and VectorSpace< Vector< scalar >, scalar, 3 >::zero.
Referenced by meshRefinement::userFaceData().
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 1561 of file meshRefinementRefine.C.
References Foam::cos(), Foam::degToRad(), Foam::endl(), forAll, Foam::Info, Foam::mag(), Foam::min(), Foam::Pout, meshRefinement::refineCandidates(), Foam::returnReduce(), List< T >::size(), syncTools::swapBoundaryFaceList(), Foam::Zero, and VectorSpace< Vector< scalar >, scalar, 3 >::zero.
Referenced by meshRefinement::isGap(), and meshRefinement::userFaceData().
Foam::labelList refineCandidates | ( | const List< point > & | insidePoints, |
const scalar | curvature, | ||
const scalar | planarAngle, | ||
const bool | featureRefinement, | ||
const bool | featureDistanceRefinement, | ||
const bool | internalRefinement, | ||
const bool | surfaceRefinement, | ||
const bool | curvatureRefinement, | ||
const bool | gapRefinement, | ||
const label | maxGlobalCells, | ||
const label | maxLocalCells | ||
) | const |
Calculate list of cells to refine.
Disable refinement shortcut. nAllowRefine is per processor limit.
Definition at line 2027 of file meshRefinementRefine.C.
References Foam::cos(), Foam::degToRad(), Foam::endl(), forAll, Foam::Info, Foam::labelMax, Foam::max(), UPstream::nProcs(), meshRefinement::refine(), and List< T >::setSize().
Referenced by meshRefinement::isNormalGap(), and meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyTopoChangeMap > refine | ( | const labelList & | cellsToRefine | ) |
Refine some cells.
Definition at line 2230 of file meshRefinementRefine.C.
References polyTopoChange::changeMesh(), Foam::patchDistWave::getChangedFaces(), meshRefinement::refineAndBalance(), and timeName.
Referenced by meshRefinement::refineCandidates(), and meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyDistributionMap > refineAndBalance | ( | const string & | msg, |
decompositionMethod & | decomposer, | ||
fvMeshDistribute & | distributor, | ||
const labelList & | cellsToRefine, | ||
const scalar | maxLoadUnbalance | ||
) |
Refine some cells and rebalance.
Definition at line 2269 of file meshRefinementRefine.C.
References meshRefinement::balanceAndRefine(), Foam::endl(), Foam::Info, Foam::mag(), meshRefinement::MESH, UPstream::nProcs(), Foam::Pout, Foam::returnReduce(), timeName, and Foam::vtkWriteOps::write().
Referenced by meshRefinement::refine(), and meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyDistributionMap > balanceAndRefine | ( | const string & | msg, |
decompositionMethod & | decomposer, | ||
fvMeshDistribute & | distributor, | ||
const labelList & | cellsToRefine, | ||
const scalar | maxLoadUnbalance | ||
) |
Balance before refining some cells.
Definition at line 2370 of file meshRefinementRefine.C.
References Foam::endl(), forAll, Foam::Info, Foam::mag(), meshRefinement::MESH, UPstream::nProcs(), Foam::Pout, Foam::returnReduce(), List< T >::size(), timeName, and Foam::vtkWriteOps::write().
Referenced by meshRefinement::refineAndBalance(), and meshRefinement::userFaceData().
void baffleAndSplitMesh | ( | const bool | handleSnapProblems, |
const snapParameters & | snapParams, | ||
const bool | useTopologicalSnapDetection, | ||
const bool | removeEdgeConnectedCells, | ||
const scalarField & | perpendicularAngle, | ||
const bool | mergeFreeStanding, | ||
const scalar | freeStandingAngle, | ||
const dictionary & | motionDict, | ||
Time & | runTime, | ||
const labelList & | globalToMasterPatch, | ||
const labelList & | globalToSlavePatch, | ||
const refinementParameters::cellSelectionPoints & | selectionPoints | ||
) |
Split off unreachable areas of mesh.
Definition at line 2222 of file meshRefinementBaffles.C.
References meshRefinement::checkData(), meshRefinement::countHits(), cpuTime::cpuTimeIncrement(), meshRefinement::createBaffles(), Foam::endl(), localPointRegion::findDuplicateFacePairs(), Foam::Info, meshRefinement::mergeBaffles(), meshRefinement::MESH, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, TimePaths::path(), Foam::Pout, meshRefinement::printMeshInfo(), Foam::reduce(), Foam::returnReduce(), List< T >::size(), meshRefinement::splitMesh(), meshRefinement::splitMeshRegions(), meshRefinement::timeName(), meshRefinement::write(), meshRefinement::writeLevel(), and meshRefinement::WRITEMESH.
Referenced by meshRefinement::mergeBaffles(), and meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyTopoChangeMap > splitMesh | ( | const label | nBufferLayers, |
const labelList & | globalToMasterPatch, | ||
const labelList & | globalToSlavePatch, | ||
const refinementParameters::cellSelectionPoints & | selectionPoints | ||
) |
Split off (with optional buffer layers) unreachable areas.
of mesh. Does not introduce baffles.
Definition at line 2412 of file meshRefinementBaffles.C.
References primitiveMesh::cells(), meshRefinement::dupNonManifoldPoints(), Foam::endl(), primitiveMesh::faceCentres(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), meshRefinement::findRegions(), forAll, removeCells::getExposedFaces(), Foam::Info, refinementParameters::cellSelectionPoints::inside(), primitiveMesh::isInternalFace(), Foam::labelMax, Foam::max(), primitiveMesh::nCells(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), primitiveMesh::nPoints(), VectorSpace< Vector< scalar >, scalar, 3 >::one, pFaces, primitiveMesh::pointFaces(), Foam::reduce(), List< T >::size(), syncTools::syncFaceList(), syncTools::syncPointList(), List< T >::transfer(), and WarningInFunction.
Referenced by meshRefinement::baffleAndSplitMesh(), and meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyTopoChangeMap > dupNonManifoldPoints | ( | const localPointRegion & | regionSide | ) |
Find boundary points that connect to more than one cell.
region and split them.
Definition at line 2682 of file meshRefinementBaffles.C.
References polyTopoChange::changeMesh(), fvMesh::clearOut(), Foam::endl(), polyMesh::globalData(), Foam::Info, localPointRegion::meshPointMap(), fvMesh::movePoints(), globalMeshData::nTotalPoints(), Foam::returnReduce(), polyMesh::setInstance(), duplicatePoints::setRefinement(), HashTable< T, Key, Hash >::size(), meshRefinement::timeName(), fvMesh::topoChange(), and meshRefinement::topoChange().
Foam::autoPtr< Foam::polyTopoChangeMap > dupNonManifoldPoints | ( | ) |
Find boundary points that connect to more than one cell.
region and split them.
Definition at line 2737 of file meshRefinementBaffles.C.
References meshRefinement::zonify().
Referenced by meshRefinement::splitMesh(), and meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyTopoChangeMap > createBaffles | ( | const labelList & | ownPatch, |
const labelList & | nbrPatch | ||
) |
Create baffle for every internal face where ownPatch != -1.
External faces get repatched according to ownPatch (nbrPatch 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 307 of file meshRefinementBaffles.C.
References Foam::abort(), polyMesh::boundaryMesh(), primitiveMesh::cells(), polyTopoChange::changeMesh(), fvMesh::clearOut(), Foam::endl(), primitiveMesh::faceCentres(), Foam::faceMap(), polyMesh::faceOwner(), Foam::FatalError, FatalErrorInFunction, forAll, HashSet< Key, Hash >::insert(), fvMesh::movePoints(), primitiveMesh::nFaces(), polyMesh::setInstance(), List< T >::size(), faceSet::sync(), syncTools::syncFaceList(), meshRefinement::timeName(), HashTable< T, Key, Hash >::toc(), fvMesh::topoChange(), meshRefinement::topoChange(), and polyBoundaryMesh::whichPatch().
Referenced by meshRefinement::baffleAndSplitMesh(), meshRefinement::createZoneBaffles(), meshRefinement::mergeBaffles(), and meshRefinement::userFaceData().
void checkZoneFaces | ( | ) | const |
Debug helper: check faceZones are not on processor patches.
Definition at line 444 of file meshRefinementBaffles.C.
References polyMesh::boundaryMesh(), meshRefinement::createZoneBaffles(), Foam::exit(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, forAll, patchIdentifier::name(), IOobject::name(), patchi, polyPatch::start(), and MeshZones< ZoneType, MeshType >::whichZone().
Referenced by meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyTopoChangeMap > createZoneBaffles | ( | const labelList & | globalToMasterPatch, |
const labelList & | globalToSlavePatch, | ||
List< labelPair > & | baffles | ||
) |
Create baffles for faces straddling zoned surfaces. Return.
baffles.
Definition at line 475 of file meshRefinementBaffles.C.
References Foam::abort(), polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), Foam::cos(), polyPatch::coupled(), cpuTime::cpuTimeIncrement(), meshRefinement::createBaffles(), Foam::degToRad(), HashTableCore::end(), Foam::endl(), f1, primitiveMesh::faceEdges(), Foam::faceMap(), polyMesh::faceOwner(), Foam::FatalError, FatalErrorInFunction, HashTable< T, label, Hash< label > >::find(), refinementSurfaces::findNearestIntersection(), Pair< Type >::first(), UList< T >::first(), forAll, forAllConstIter, surfaceZonesInfo::getNamedSurfaces(), Foam::identity(), Foam::Info, Foam::mag(), meshRefinement::mergeBaffles(), meshRefinement::MESH, n, primitiveMesh::nEdges(), primitiveMesh::nFaces(), Foam::nl, patches, patchi, TimePaths::path(), Foam::Pout, Foam::returnReduce(), Pair< Type >::second(), FixedList< T, Size >::setSize(), List< T >::setSize(), List< T >::size(), HashTable< T, label, Hash< label > >::size(), polyPatch::start(), refinementSurfaces::surfaces(), refinementSurfaces::surfZones(), syncTools::syncEdgeList(), fvMesh::time(), meshRefinement::timeName(), polyBoundaryMesh::whichPatch(), meshRefinement::write(), meshRefinement::writeLevel(), and meshRefinement::WRITEMESH.
Referenced by meshRefinement::checkZoneFaces(), and meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyTopoChangeMap > mergeBaffles | ( | const List< labelPair > & | couples | ) |
Merge baffles. Gets pairs of faces.
Definition at line 828 of file meshRefinementBaffles.C.
References Foam::abort(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), List< T >::append(), meshRefinement::baffleAndSplitMesh(), polyMesh::boundaryMesh(), polyMesh::bounds(), primitiveMesh::cellCentres(), polyTopoChange::changeMesh(), meshRefinement::checkData(), fvMesh::clearOut(), polyPatch::coupled(), cpuTime::cpuTimeIncrement(), meshRefinement::createBaffles(), Foam::e, primitiveMesh::edges(), Foam::endl(), Foam::exit(), PrimitivePatch< FaceList, PointField >::faceCentres(), primitiveMesh::faceCentres(), PrimitivePatch< FaceList, PointField >::faceEdges(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), refinementSurfaces::findInside(), meshRefinement::findRegion(), UList< T >::first(), orientedSurface::FLIP, patchFaceOrientation::flip(), faceZone::flipMap(), forAll, Foam::Info, insidePoints(), primitiveMesh::isInternalFace(), Foam::labelMax, Pstream::listCombineGather(), Pstream::listCombineScatter(), Foam::max(), meshRefinement::MESH, PrimitivePatch< FaceList, PointField >::meshEdges(), fvMesh::movePoints(), UPstream::myProcNo(), refinementSurfaces::names(), PrimitivePatch< FaceList, PointField >::nEdges(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, orientedSurface::NOFLIP, regionSplit::nRegions(), VectorSpace< Vector< scalar >, scalar, 3 >::one, patches, patchi, TimePaths::path(), primitiveMesh::pointEdges(), Foam::Pout, meshRefinement::printMeshInfo(), Foam::reduce(), Foam::returnReduce(), polyTopoChange::setAction(), polyMesh::setInstance(), List< T >::setSize(), List< T >::size(), polyPatch::start(), refinementSurfaces::surfZones(), syncTools::swapBoundaryFaceList(), syncTools::syncEdgeList(), syncTools::syncFaceList(), polyMesh::tetBasePtIs(), meshRefinement::timeName(), fvMesh::topoChange(), meshRefinement::topoChange(), orientedSurface::UNVISITED, patchFaceOrientation::updateEdge(), patchEdgeFaceRegion::updateEdge(), WarningInFunction, faceZone::whichFace(), polyBoundaryMesh::whichPatch(), MeshZones< ZoneType, MeshType >::whichZone(), Ostream::write(), meshRefinement::write(), meshRefinement::writeLevel(), and meshRefinement::WRITEMESH.
Referenced by meshRefinement::baffleAndSplitMesh(), meshRefinement::createZoneBaffles(), and meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyTopoChangeMap > zonify | ( | const List< point > & | insidePoints, |
const bool | allowFreeStandingZoneFaces | ||
) |
Put faces/cells into zones according to surface specification.
Returns null if no zone surfaces present. Region containing the insidePoint will not be put into a cellZone.
Per face index of faceZone or -1
Definition at line 2747 of file meshRefinementBaffles.C.
References surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZonesToMesh(), polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), polyMesh::cellZones(), polyTopoChange::changeMesh(), fvMesh::clearOut(), polyPatch::coupled(), Foam::endl(), primitiveMesh::faceAreas(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), polyMesh::faceZones(), HashTable< T, Key, Hash >::find(), refinementSurfaces::findNearestIntersection(), forAll, refinementSurfaces::geometry(), surfaceZonesInfo::getClosedNamedSurfaces(), surfaceZonesInfo::getInsidePointNamedSurfaces(), syncTools::getMasterFaces(), surfaceZonesInfo::getNamedSurfaces(), Foam::Info, HashTable< T, Key, Hash >::insert(), meshRefinement::intersectedFaces(), primitiveMesh::isInternalFace(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), Foam::magSqr(), Pstream::mapCombineGather(), Pstream::mapCombineScatter(), fvMesh::movePoints(), n, zone::name(), refinementSurfaces::names(), primitiveMesh::nCells(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, patches, patchi, TimePaths::path(), polyMesh::points(), Foam::Pout, Foam::returnReduce(), polyTopoChange::setAction(), polyMesh::setInstance(), UPtrList< T >::size(), List< T >::size(), polyPatch::start(), refinementSurfaces::surfaces(), refinementSurfaces::surfZones(), syncTools::swapBoundaryCellList(), syncTools::syncFaceList(), fvMesh::time(), meshRefinement::timeName(), fvMesh::topoChange(), meshRefinement::topoChange(), and OBJstream::write().
Referenced by meshRefinement::dupNonManifoldPoints(), and meshRefinement::userFaceData().
Foam::label addMeshedPatch | ( | const word & | name, |
const dictionary & | patchInfo | ||
) |
Add patch originating from meshing. Update meshedPatches_.
Definition at line 1984 of file meshRefinement.C.
References Foam::findIndex(), polyBoundaryMesh::findPatchID(), forAll, polyPatch::New(), patchi, dictionary::set(), and UPtrList< T >::size().
Referenced by meshRefinement::calculateEdgeWeights(), and meshRefinement::userFaceData().
Foam::labelList meshedPatches | ( | ) | const |
Get patchIDs for patches added in addMeshedPatch.
Definition at line 2048 of file meshRefinement.C.
References Foam::abort(), List< T >::append(), polyPatch::constraintType(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, polyBoundaryMesh::findPatchID(), forAll, polyBoundaryMesh::names(), patches, patchi, and Foam::type().
Referenced by meshRefinement::userFaceData().
void selectSeparatedCoupledFaces | ( | boolList & | selected | ) | const |
Select coupled faces that are not collocated.
Definition at line 2074 of file meshRefinement.C.
References meshRefinement::findRegion(), forAll, patches, patchi, polyPatch::start(), coupledPolyPatch::transform(), and transformer::transformsPosition().
Referenced by meshRefinement::userFaceData().
|
static |
Find region point is in. Uses optional perturbation to re-test.
Definition at line 2101 of file meshRefinement.C.
References polyMesh::findCell(), meshRefinement::findRegions(), and Foam::reduce().
Referenced by meshRefinement::mergeBaffles(), meshRefinement::selectSeparatedCoupledFaces(), and meshRefinement::userFaceData().
|
static |
Find regions points are in and update cellRegion.
Uses optional perturbation to re-test.
Definition at line 2132 of file meshRefinement.C.
References forAll, refinementParameters::cellSelectionPoints::inside(), primitiveMesh::nCells(), refinementParameters::cellSelectionPoints::outside(), and meshRefinement::splitMeshRegions().
Referenced by meshRefinement::findRegion(), meshRefinement::splitMesh(), and meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyTopoChangeMap > splitMeshRegions | ( | const labelList & | globalToMasterPatch, |
const labelList & | globalToSlavePatch, | ||
const refinementParameters::cellSelectionPoints & | selectionPoints | ||
) |
Split mesh according to selectionPoints.
Definition at line 2207 of file meshRefinement.C.
References List< T >::append(), Foam::endl(), forAll, removeCells::getExposedFaces(), Foam::Info, refinementParameters::cellSelectionPoints::inside(), VectorSpace< Vector< scalar >, scalar, 3 >::one, Foam::reduce(), Foam::returnReduce(), List< T >::size(), and WarningInFunction.
Referenced by meshRefinement::baffleAndSplitMesh(), meshRefinement::findRegions(), and meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyTopoChangeMap > splitFaces | ( | const labelList & | splitFaces, |
const labelPairList & | splits | ||
) |
Split faces into two.
Definition at line 669 of file meshRefinement.C.
References polyTopoChange::addFace(), polyTopoChange::changeMesh(), Foam::endl(), f(), f1, Foam::faceMap(), UList< T >::fcIndex(), faceZone::flipMap(), forAll, meshRefinement::meshRefinement(), polyTopoChange::modifyFace(), patchi, Foam::Pout, Foam::renumber(), List< T >::setSize(), List< T >::size(), timeName, and faceZone::whichFace().
Referenced by meshRefinement::setInstance(), and meshRefinement::userFaceData().
void distribute | ( | const polyDistributionMap & | map | ) |
Update local numbering for mesh redistribution.
Definition at line 2306 of file meshRefinement.C.
References autoPtr< T >::clear(), polyDistributionMap::distributeFaceData(), Foam::e, Foam::faceMap(), forAll, meshBb(), Foam::second(), meshRefinement::topoChange(), and autoPtr< T >::valid().
Referenced by meshRefinement::userFaceData().
void topoChange | ( | const polyTopoChangeMap & | map, |
const labelList & | changedFaces | ||
) |
Update for external change to mesh. changedFaces are in new mesh.
face labels.
Definition at line 2361 of file meshRefinement.C.
References meshRefinement::storeData().
Referenced by meshRefinement::createBaffles(), meshRefinement::distribute(), meshRefinement::dupNonManifoldPoints(), meshRefinement::mergeBaffles(), meshRefinement::storeData(), meshRefinement::userFaceData(), and meshRefinement::zonify().
Helper: reorder list according to map.
Definition at line 34 of file meshRefinementTemplates.C.
References forAll, meshRefinement::gAverage(), List< T >::size(), T, and List< T >::transfer().
Referenced by snappyLayerDriver::addLayers(), snappySnapDriver::doSnap(), and meshRefinement::userFaceData().
void storeData | ( | const labelList & | pointsToStore, |
const labelList & | facesToStore, | ||
const labelList & | cellsToStore | ||
) |
Signal points/face/cells for which to store data.
Definition at line 2373 of file meshRefinement.C.
References meshRefinement::topoChange().
Referenced by meshRefinement::topoChange(), and meshRefinement::userFaceData().
void topoChange | ( | const polyTopoChangeMap & | 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 2390 of file meshRefinement.C.
References polyTopoChangeMap::faceMap(), Foam::first(), forAll, polyTopoChangeMap::reverseFaceMap(), List< T >::size(), and List< T >::transfer().
Foam::label mergePatchFacesUndo | ( | const scalar | minCos, |
const scalar | concaveCos, | ||
const labelHashSet & | patchIDs, | ||
const dictionary & | motionDict, | ||
const labelList & | preserveFaces | ||
) |
Merge coplanar faces. preserveFaces is != -1 for faces.
to be preserved
Definition at line 249 of file meshRefinementMerge.C.
References polyTopoChange::changeMesh(), meshRefinement::doRemovePoints(), Foam::endl(), forAll, forAllConstIter, combineFaces::getMergeSets(), Foam::Info, Foam::inplaceMapKey(), IOobject::instance(), combineFaces::masterFace(), Foam::nl, regIOobject::objectPath(), Foam::Pout, Foam::returnReduce(), combineFaces::savedPointLabels(), combineFaces::setRefinement(), combineFaces::setUnrefinement(), HashTable< T, Key, Hash >::size(), timeName, combineFaces::topoChange(), Foam::vtkWriteOps::write(), Ostream::write(), and regIOobject::write().
Referenced by meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyTopoChangeMap > doRemovePoints | ( | removePoints & | pointRemover, |
const boolList & | pointCanBeDeleted | ||
) |
Definition at line 602 of file meshRefinementMerge.C.
References polyTopoChange::changeMesh(), meshRefinement::doRestorePoints(), Foam::endl(), forAll, Foam::Pout, removePoints::savedFaceLabels(), removePoints::setRefinement(), List< T >::size(), timeName, and removePoints::topoChange().
Referenced by meshRefinement::mergePatchFacesUndo(), and meshRefinement::userFaceData().
Foam::autoPtr< Foam::polyTopoChangeMap > doRestorePoints | ( | removePoints & | pointRemover, |
const labelList & | facesToRestore | ||
) |
Definition at line 659 of file meshRefinementMerge.C.
References polyTopoChange::changeMesh(), meshRefinement::collectFaces(), Foam::endl(), forAll, removePoints::getUnrefimentSet(), Foam::Pout, removePoints::setUnrefinement(), List< T >::size(), timeName, and removePoints::topoChange().
Referenced by meshRefinement::doRemovePoints(), and meshRefinement::userFaceData().
Foam::labelList collectFaces | ( | const labelList & | candidateFaces, |
const labelHashSet & | set | ||
) | const |
Definition at line 732 of file meshRefinementMerge.C.
References Foam::findIndices(), forAll, found, and meshRefinement::growFaceCellFace().
Referenced by meshRefinement::doRestorePoints(), and meshRefinement::userFaceData().
Foam::labelList growFaceCellFace | ( | const labelHashSet & | set | ) | const |
Definition at line 764 of file meshRefinementMerge.C.
References Foam::findIndices(), forAll, forAllConstIter, and meshRefinement::mergeEdgesUndo().
Referenced by meshRefinement::collectFaces(), and meshRefinement::userFaceData().
Foam::label mergeEdgesUndo | ( | const scalar | minCos, |
const dictionary & | motionDict | ||
) |
Merge edges, maintain mesh quality. Return global number.
of edges merged
Definition at line 805 of file meshRefinementMerge.C.
References removePoints::countPointUsage(), Foam::endl(), Foam::Info, n, Foam::nl, Foam::Pout, Foam::returnReduce(), removePoints::savedFaceLabels(), List< T >::size(), timeName, Foam::vtkWriteOps::write(), and Ostream::write().
Referenced by meshRefinement::growFaceCellFace(), and meshRefinement::userFaceData().
void checkData | ( | ) |
Debugging: check that all faces still obey start()>end()
Definition at line 405 of file meshRefinement.C.
References Foam::endl(), localPointRegion::findDuplicateFaces(), forAll, Foam::identity(), Foam::Pout, syncTools::swapBoundaryFaceList(), syncTools::syncBoundaryFacePositions(), and WarningInFunction.
Referenced by meshRefinement::baffleAndSplitMesh(), meshRefinement::mergeBaffles(), and meshRefinement::userFaceData().
|
static |
Definition at line 312 of file meshRefinement.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), Foam::nl, primitiveMesh::nPoints(), polyMesh::points(), Foam::Pout, List< T >::size(), and syncTools::syncPointList().
Referenced by NamedEnum< compressibleField, 8 >::names(), and meshRefinement::userFaceData().
|
static |
Definition at line 359 of file meshRefinement.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), Foam::nl, primitiveMesh::nPoints(), polyMesh::points(), Foam::Pout, List< T >::size(), syncTools::syncPointList(), and VectorSpace< Vector< scalar >, scalar, 3 >::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 100 of file meshRefinementTemplates.C.
References Foam::abort(), meshRefinement::collectAndPrint(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), patchIdentifier::name(), patches, patchi, UList< T >::size(), polyPatch::start(), and T.
Referenced by meshRefinement::gAverage(), and meshRefinement::userFaceData().
Print list according to (collected and) sorted coordinate.
Definition at line 157 of file meshRefinementTemplates.C.
References Foam::DelaunayMeshTools::allPoints(), Foam::endl(), forAll, Foam::identity(), Foam::Info, Foam::mag(), meshRefinement::readFlags(), UList< T >::size(), and Foam::sortedOrder().
Referenced by meshRefinement::testSyncBoundaryFaceList(), and meshRefinement::userFaceData().
|
static |
Determine master point for subset of points. If coupled.
chooses only one
Definition at line 2520 of file meshRefinement.C.
References forAll, meshRefinement::getMasterEdges(), Foam::labelMax, List< T >::size(), and syncTools::syncPointList().
Referenced by snappySnapDriver::calcNearestSurface(), snappySnapDriver::detectNearSurfaces(), listPlusEqOp< T >::operator()(), meshRefinement::userFaceData(), meshRefinement::write(), and medialAxisMeshMover::~medialAxisMeshMover().
|
static |
Determine master edge for subset of edges. If coupled.
chooses only one
Definition at line 2557 of file meshRefinement.C.
References forAll, Foam::labelMax, List< T >::size(), and syncTools::syncEdgeList().
Referenced by meshRefinement::getMasterPoints(), listPlusEqOp< T >::operator()(), meshRefinement::userFaceData(), and medialAxisMeshMover::~medialAxisMeshMover().
Print some mesh stats.
Definition at line 2593 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 meshRefinement::baffleAndSplitMesh(), meshRefinement::mergeBaffles(), and meshRefinement::userFaceData().
Foam::word timeName | ( | ) | const |
Replacement for Time::timeName() : return oldInstance (if.
overwrite_)
Definition at line 2660 of file meshRefinement.C.
Referenced by meshRefinement::baffleAndSplitMesh(), meshRefinement::createBaffles(), meshRefinement::createZoneBaffles(), meshRefinement::dupNonManifoldPoints(), meshRefinement::mergeBaffles(), snappySnapDriver::preSmoothPatch(), meshRefinement::userFaceData(), and meshRefinement::zonify().
void setInstance | ( | const fileName & | inst | ) |
Set instance of all local IOobjects.
Definition at line 602 of file meshRefinement.C.
References polyTopoChange::changeMesh(), Foam::renumber(), removeCells::setRefinement(), meshRefinement::splitFaces(), timeName, and removeCells::topoChange().
Referenced by meshRefinement::userFaceData().
bool write | ( | ) | const |
Write mesh and all data.
Definition at line 2484 of file meshRefinement.C.
References TimePaths::caseConstant(), TimePaths::caseSystem(), TimePaths::constant(), forAll, meshRefinement::getMasterPoints(), IOobject::instance(), s(), TimePaths::system(), IOobject::time(), Time::timeName(), and regIOobject::write().
Referenced by meshRefinement::baffleAndSplitMesh(), meshRefinement::createZoneBaffles(), meshRefinement::dumpIntersections(), meshRefinement::mergeBaffles(), snappySnapDriver::preSmoothPatch(), and meshRefinement::userFaceData().
void dumpRefinementLevel | ( | ) | const |
Write refinement level as volScalarFields for postprocessing.
Definition at line 2673 of file meshRefinement.C.
References IOobject::AUTO_WRITE, Foam::dimless, forAll, MeshObject< polyMesh, PatchMeshObject, pointMesh >::New(), IOobject::NO_READ, and IOobject::NO_WRITE.
Referenced by meshRefinement::userFaceData().
void dumpIntersections | ( | const fileName & | prefix | ) | const |
Debug: Write intersection information to OBJ format.
Definition at line 2734 of file meshRefinement.C.
References Foam::endl(), forAll, OFstream::name(), Foam::nl, Foam::Pout, List< T >::size(), meshRefinement::write(), and Foam::meshTools::writeOBJ().
Referenced by meshRefinement::userFaceData().
void write | ( | const debugType | debugFlags, |
const writeType | writeFlags, | ||
const fileName & | prefix | ||
) | const |
Do any one of above IO functions.
Definition at line 2815 of file meshRefinement.C.
References Foam::vtkWriteOps::write().
|
static |
Helper: calculate average.
Definition at line 58 of file meshRefinementTemplates.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, n, Foam::reduce(), PackedList< nBits >::size(), UList< T >::size(), Foam::sum(), T, meshRefinement::testSyncBoundaryFaceList(), and Foam::Zero.
Referenced by snappySnapDriver::calcNearestSurface(), listPlusEqOp< T >::operator()(), meshRefinement::updateList(), and meshRefinement::userFaceData().
|
static |
Get/set write level.
Definition at line 2844 of file meshRefinement.C.
Referenced by snappyLayerDriver::addLayers(), meshRefinement::baffleAndSplitMesh(), meshRefinement::createZoneBaffles(), snappySnapDriver::doSnap(), meshRefinement::mergeBaffles(), snappySnapDriver::preSmoothPatch(), snappySnapDriver::smoothDisplacement(), snappyRefineDriver::snappyRefineDriver(), and meshRefinement::userFaceData().
|
static |
Definition at line 2850 of file meshRefinement.C.
|
static |
Get/set output level.
Definition at line 2856 of file meshRefinement.C.
Referenced by meshRefinement::userFaceData().
|
static |
Definition at line 2862 of file meshRefinement.C.
|
static |
Helper: convert wordList into bit pattern using provided.
Definition at line 202 of file meshRefinementTemplates.C.
References forAll, and meshRefinement::weightedSum().
Referenced by meshRefinement::collectAndPrint(), and meshRefinement::userFaceData().
|
delete |
Disallow default bitwise assignment.
Referenced by meshRefinement::userFaceData().
|
static |
Definition at line 98 of file meshRefinement.H.
Referenced by NamedEnum< compressibleField, 8 >::names().
|
static |
Definition at line 114 of file meshRefinement.H.
Referenced by NamedEnum< compressibleField, 8 >::names().
|
static |
Definition at line 130 of file meshRefinement.H.
Referenced by NamedEnum< compressibleField, 8 >::names().