Public Member Functions | |
meshSurfaceOptimizer (const meshSurfaceEngine &) | |
Construct from mesh surface. More... | |
meshSurfaceOptimizer (const meshSurfacePartitioner &) | |
Construct from partitioner. More... | |
meshSurfaceOptimizer (const meshSurfaceEngine &, const meshOctree &) | |
Construct from mesh surface and octree. More... | |
meshSurfaceOptimizer (const meshSurfacePartitioner &, const meshOctree &) | |
Construct from partitioner and octree. More... | |
~meshSurfaceOptimizer () | |
template<class labelListType > | |
void | lockBoundaryFaces (const labelListType &) |
lock the boundary faces which shall not be modified More... | |
template<class labelListType > | |
void | lockBoundaryPoints (const labelListType &) |
lock boundary points. They are not be moved. More... | |
void | lockFeatureEdges () |
lock edge points More... | |
void | removeUserConstraints () |
reset to default constraints More... | |
void | enforceConstraints (const word subsetName="badPoints") |
bool | untangleSurface (const labelLongList &activeBoundaryPoints, const label nAdditionalLayers=0) |
runs a surface smoother on the selected boundary points More... | |
bool | untangleSurface (const label nAdditionalLayers=2) |
void | optimizeSurface (const label nIterations=5) |
optimize boundary nodes after boundary regions are created More... | |
void | optimizeSurface2D (const label nIterations=5) |
optimize the surface of a 2D mesh More... | |
void | untangleSurface2D () |
untangle the surface of a 2D mesh More... | |
Private Types | |
enum | vertexTypes { PARTITION = 1, EDGE = 2, CORNER = 4, PROCBND = 8, LOCKED = 16 } |
Private Member Functions | |
void | classifySurfaceVertices () |
classify surface vertices as PARTITION, EDGE, CORNER More... | |
void | calculateTrianglesAndAddressing () const |
calculate surface triangulation More... | |
const partTriMesh & | triMesh () const |
void | updateTriMesh (const labelLongList &) |
void | updateTriMesh () |
label | findInvertedVertices (boolList &smoothVertex, const label nAdditionalLayers=2) const |
bool | transformIntoPlane (const label bpI, const plane &pl, vector &vecX, vector &vecY, DynList< point > &pts, DynList< triFace > &trias) const |
transform into a 2D space in plane More... | |
point | newPositionLaplacian (const label bpI, const bool transformIntoPlane=true) const |
point | newPositionLaplacianFC (const label bpI, const bool transformIntoPlane=true) const |
point | newPositionLaplacianWFC (const label bpI, const bool transformIntoPlane=true) const |
point | newPositionSurfaceOptimizer (const label bpI, const scalar tol=0.001) const |
new position of a node after using surfaceOptimizer More... | |
point | newEdgePositionLaplacian (const label bpI) const |
void | nodeDisplacementLaplacian (const label bpI, const bool transformIntoPlane=true) const |
void | nodeDisplacementLaplacianFC (const label bpI, const bool transformIntoPlane=true) const |
void | nodeDisplacementSurfaceOptimizer (const label bpI, const scalar tol=1.0) |
smooth the node using surface optimizer More... | |
void | edgeNodeDisplacement (const label bpI) const |
smooth edge node More... | |
void | smoothEdgePoints (const labelLongList &edgePoints, const labelLongList &procEdgePoints) |
smooth selected edge points More... | |
void | smoothLaplacianFC (const labelLongList &selectedPoints, const labelLongList &selectedProcPoints, const bool transform=true) |
smooth selected points using laplaceFC More... | |
void | smoothSurfaceOptimizer (const labelLongList &selectedPoints, const labelLongList &selectedProcPoints) |
smooth selected points using surface optimizer More... | |
void | exchangeData (const labelLongList &nodesToSmooth, std::map< label, DynList< parTriFace > > &m) const |
transfer data between processors More... | |
void | nodeDisplacementLaplacianParallel (const labelLongList &nodesToSmooth, const bool transformIntoPlane=true) |
void | nodeDisplacementLaplacianFCParallel (const labelLongList &nodesToSmooth, const bool transformIntoPlane=true) |
laplacian smoothing of points at processor boundaries More... | |
void | edgeNodeDisplacementParallel (const labelLongList &nodesToSmooth) |
smooth edge nodes at processor boundaries More... | |
meshSurfaceOptimizer (const meshSurfaceOptimizer &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const meshSurfaceOptimizer &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
const meshSurfaceEngine & | surfaceEngine_ |
const reference to the mesh surface More... | |
List< direction > | vertexType_ |
type of surface vertex More... | |
labelLongList | lockedSurfaceFaces_ |
locked faces which shall not be changed More... | |
const meshSurfacePartitioner * | partitionerPtr_ |
surface partitioner More... | |
const bool | deletePartitioner_ |
const meshOctree * | octreePtr_ |
pointer to mesh octree More... | |
partTriMesh * | triMeshPtr_ |
mesh of surface triangles needed for some smoothers More... | |
bool | enforceConstraints_ |
enforce constraints More... | |
word | badPointsSubsetName_ |
name of the subset contaning tangled points More... | |
Definition at line 63 of file meshSurfaceOptimizer.H.
|
private |
Enumerator | |
---|---|
PARTITION | |
EDGE | |
CORNER | |
PROCBND | |
LOCKED |
Definition at line 242 of file meshSurfaceOptimizer.H.
|
private |
Disallow default bitwise copy construct.
meshSurfaceOptimizer | ( | const meshSurfaceEngine & | surface | ) |
Construct from mesh surface.
Definition at line 77 of file meshSurfaceOptimizer.C.
References meshSurfaceOptimizer::classifySurfaceVertices().
meshSurfaceOptimizer | ( | const meshSurfacePartitioner & | mPart | ) |
Construct from partitioner.
Definition at line 91 of file meshSurfaceOptimizer.C.
References meshSurfaceOptimizer::classifySurfaceVertices().
meshSurfaceOptimizer | ( | const meshSurfaceEngine & | surface, |
const meshOctree & | octree | ||
) |
Construct from mesh surface and octree.
Definition at line 106 of file meshSurfaceOptimizer.C.
meshSurfaceOptimizer | ( | const meshSurfacePartitioner & | partitioner, |
const meshOctree & | octree | ||
) |
Construct from partitioner and octree.
Definition at line 124 of file meshSurfaceOptimizer.C.
~meshSurfaceOptimizer | ( | ) |
Definition at line 143 of file meshSurfaceOptimizer.C.
References Foam::deleteDemandDrivenData(), meshSurfaceOptimizer::deletePartitioner_, meshSurfaceOptimizer::partitionerPtr_, and meshSurfaceOptimizer::triMeshPtr_.
|
private |
classify surface vertices as PARTITION, EDGE, CORNER
set all vertices to partition
set corners
set edges
mark nodes at parallel boundaries
Definition at line 44 of file meshSurfaceOptimizer.C.
References meshSurfaceOptimizer::CORNER, meshSurfacePartitioner::corners(), meshSurfaceOptimizer::EDGE, meshSurfacePartitioner::edgePoints(), forAllConstIter(), meshSurfaceEngine::globalToLocalBndPointAddressing(), UPstream::parRun(), meshSurfaceOptimizer::PARTITION, meshSurfaceOptimizer::partitionerPtr_, meshSurfaceOptimizer::PROCBND, meshSurfaceOptimizer::surfaceEngine_, and meshSurfaceOptimizer::vertexType_.
Referenced by meshSurfaceOptimizer::meshSurfaceOptimizer().
|
private |
calculate surface triangulation
Definition at line 47 of file meshSurfaceOptimizerCalculateTrianglesAndAddressing.C.
References Foam::abort(), triSurfModifier::facetsAccess(), Foam::FatalError, FatalErrorIn, forAll, partTriMesh::meshSurfacePointLabelInTriMesh(), meshSurfaceOptimizer::partitionerPtr_, triSurfModifier::patchesAccess(), triSurfModifier::pointsAccess(), partTriMeshSimplex::pts(), Foam::help::scalarToText(), LongList< T, Offset >::setSize(), List::setSize(), partTriMeshSimplex::triangles(), meshSurfaceOptimizer::triMeshPtr_, and triSurf::writeSurface().
Referenced by meshSurfaceOptimizer::triMesh().
|
inlineprivate |
Definition at line 51 of file meshSurfaceOptimizerI.H.
References meshSurfaceOptimizer::calculateTrianglesAndAddressing(), and meshSurfaceOptimizer::triMeshPtr_.
|
inlineprivate |
Definition at line 59 of file meshSurfaceOptimizerI.H.
References Foam::abort(), Foam::FatalError, FatalErrorIn, meshSurfaceOptimizer::triMeshPtr_, and partTriMesh::updateVertices().
|
inlineprivate |
Definition at line 71 of file meshSurfaceOptimizerI.H.
References Foam::abort(), Foam::FatalError, FatalErrorIn, meshSurfaceOptimizer::triMeshPtr_, and partTriMesh::updateVertices().
|
private |
find vertices which are inverted mark additional layers of vertices near the inverted ones
check the vertices at the surface mark the ones where the mesh is tangled
add additional layers around inverted points
exchange global labels of inverted points
exchange data with other processors
Definition at line 60 of file meshSurfaceOptimizerOptimizeSurface.C.
References Foam::endl(), Foam::help::exchangeMap(), forAll, forAllConstIter(), forAllRow, HashTable::found(), Foam::Info, meshSurfaceCheckInvertedVertices::invertedVertices(), UPstream::myProcNo(), UPstream::parRun(), Foam::reduce(), List::setSize(), and List::size().
|
inlineprivate |
transform into a 2D space in plane
create vecX and vecY
transform the vertices
Definition at line 83 of file meshSurfaceOptimizerI.H.
References partTriMeshSimplex::centrePoint(), Foam::endl(), triSurfModifier::facetsAccess(), forAll, found, Foam::Info, Foam::mag(), partTriMesh::meshSurfacePointLabelInTriMesh(), plane::nearestPoint(), plane::normal(), p, triSurfModifier::patchesAccess(), triSurfModifier::pointsAccess(), Foam::Pout, partTriMeshSimplex::pts(), Foam::help::scalarToText(), LongList< T, Offset >::setSize(), DynList< T, staticSize >::setSize(), List::setSize(), DynList< T, staticSize >::size(), tf, partTriMeshSimplex::triangles(), and triSurf::writeSurface().
|
inlineprivate |
new position of a node after laplacian smoothing the position is the average of neighbouring vertex positions
Definition at line 187 of file meshSurfaceOptimizerI.H.
References forAll, forAllRow, Foam::magSqr(), plane::nearestPoint(), points, DynList< T, staticSize >::setSize(), DynList< T, staticSize >::size(), VRWGraph::sizeOfRow(), and Vector< scalar >::zero.
|
inlineprivate |
new position of a node after laplacian smoothing the position is the average of neighbouring face centres
Definition at line 232 of file meshSurfaceOptimizerI.H.
References forAll, forAllRow, Foam::magSqr(), plane::nearestPoint(), points, DynList< T, staticSize >::setSize(), DynList< T, staticSize >::size(), VRWGraph::sizeOfRow(), and Vector< scalar >::zero.
|
inlineprivate |
new position of a node after laplacian smoothing the position is the weighted average of neighbouring face centres the weights are the magnitudes of neighbouring face area vectors
Definition at line 279 of file meshSurfaceOptimizerI.H.
References forAll, forAllRow, Foam::magSqr(), Foam::max(), plane::nearestPoint(), points, DynList< T, staticSize >::setSize(), VRWGraph::sizeOfRow(), w(), and Vector< scalar >::zero.
new position of a node after using surfaceOptimizer
project vertices onto the plane
Definition at line 339 of file meshSurfaceOptimizerI.H.
References Foam::endl(), Foam::help::isinf(), Foam::help::isnan(), Foam::magSqr(), surfaceOptimizer::optimizePoint(), points, Foam::Pout, success, WarningIn, Vector< Cmpt >::x(), and Vector< Cmpt >::y().
new position of edge vertex the position is the average of neighbouring edge vertices
Definition at line 398 of file meshSurfaceOptimizerI.H.
References DynList< T, staticSize >::append(), Foam::endl(), forAll, forAllRow, HashTable::found(), Foam::Info, points, Foam::pos(), DynList< T, staticSize >::size(), and Vector< scalar >::zero.
Referenced by meshSurfaceOptimizer::edgeNodeDisplacement().
|
private |
smooth the node using the laplacian smoother new position is the average of the neighbouring vertices
Definition at line 46 of file meshSurfaceOptimizerOptimizePoint.C.
References meshSurfaceEngineModifier::moveBoundaryVertex().
|
private |
smooth the node using the laplacian smoother new position is the average of the centres of faces attached to the vertex
Definition at line 61 of file meshSurfaceOptimizerOptimizePoint.C.
References meshSurfaceEngineModifier::moveBoundaryVertex().
|
private |
smooth the node using surface optimizer
project vertices onto the plane
Definition at line 76 of file meshSurfaceOptimizerOptimizePoint.C.
References Foam::endl(), Foam::Info, Foam::magSqr(), meshSurfaceEngineModifier::moveBoundaryVertex(), surfaceOptimizer::optimizePoint(), points, Foam::Warning, Vector< Cmpt >::x(), and Vector< Cmpt >::y().
|
private |
smooth edge node
Definition at line 123 of file meshSurfaceOptimizerOptimizePoint.C.
References meshSurfaceEngine::boundaryPoints(), Foam::endl(), Foam::Info, meshSurfaceOptimizer::LOCKED, meshSurfaceEngineModifier::moveBoundaryVertex(), meshSurfaceOptimizer::newEdgePositionLaplacian(), points, meshSurfaceEngine::points(), Foam::pos(), meshSurfaceOptimizer::surfaceEngine_, and meshSurfaceOptimizer::vertexType_.
|
private |
smooth selected edge points
smooth edge vertices
Definition at line 159 of file meshSurfaceOptimizerOptimizeSurface.C.
References LongList< T, Offset >::append(), coordinates(), forAll, meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), UPstream::parRun(), List::setSize(), and meshSurfaceEngineModifier::updateGeometry().
Referenced by meshSurfaceOptimizer::optimizeSurface(), meshSurfaceOptimizer::optimizeSurface2D(), and meshSurfaceOptimizer::untangleSurface2D().
|
private |
smooth selected points using laplaceFC
Definition at line 215 of file meshSurfaceOptimizerOptimizeSurface.C.
References LongList< T, Offset >::append(), coordinates(), forAll, meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), UPstream::parRun(), List::setSize(), Foam::transform(), and meshSurfaceEngineModifier::updateGeometry().
Referenced by meshSurfaceOptimizer::optimizeSurface().
|
private |
smooth selected points using surface optimizer
create partTriMesh is it is not yet present
update coordinates of the triangulation
ensure that vertices at inter-processor boundaries are at the same location at all processors
update geometry addressing for moved points
Definition at line 283 of file meshSurfaceOptimizerOptimizeSurface.C.
References forAll, meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), LongList< T, Offset >::size(), meshSurfaceEngineModifier::syncVerticesAtParallelBoundaries(), and meshSurfaceEngineModifier::updateGeometry().
Referenced by meshSurfaceOptimizer::optimizeSurface(), meshSurfaceOptimizer::optimizeSurface2D(), and meshSurfaceOptimizer::untangleSurface2D().
|
private |
transfer data between processors
Definition at line 427 of file meshSurfaceOptimizerOptimizePointParallel.C.
Referenced by meshSurfaceOptimizer::lockBoundaryFaces(), meshSurfaceOptimizer::lockBoundaryPoints(), and meshSurfaceOptimizer::untangleSurface2D().
|
private |
laplacian smoothing of points at processor boundaries new position is the average of the neighbouring vertices
create storage for data
exchange data with other processors
perform smoothing
project points onto the plane
add data to the list which will be sent to other processor
exchange data with other processors
create new point position
Definition at line 47 of file meshSurfaceOptimizerOptimizePointParallel.C.
References LongList< T, Offset >::append(), VRWGraph::contains(), labelledPoint::coordinates(), Foam::help::exchangeMap(), forAll, forAllRow, refLabelledPoint::lPoint(), Foam::magSqr(), meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), UPstream::myProcNo(), plane::nearestPoint(), UPstream::nProcs(), refLabelledPoint::objectLabel(), p, pMin(), labelledPoint::pointLabel(), points, Foam::returnReduce(), LongList< T, Offset >::size(), VRWGraph::sizeOfRow(), and Vector< scalar >::zero.
|
private |
laplacian smoothing of points at processor boundaries
create storage for data
exchange data with other processors
perform smoothing
project points onto the plane
add data to the list which will be sent to other processor
exchange data with other processors
create new point position
Definition at line 167 of file meshSurfaceOptimizerOptimizePointParallel.C.
References LongList< T, Offset >::append(), labelledPoint::coordinates(), Foam::help::exchangeMap(), forAll, forAllRow, refLabelledPoint::lPoint(), Foam::magSqr(), meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), UPstream::myProcNo(), plane::nearestPoint(), refLabelledPoint::objectLabel(), p, pFaces, labelledPoint::pointLabel(), points, Foam::returnReduce(), LongList< T, Offset >::size(), and Vector< scalar >::zero.
|
private |
smooth edge nodes at processor boundaries
insert labels into the map
add local edge points
start preparing data which can be exchanged with other processors
exchange data with other processors
Finally, the data is ready to start smoothing
Definition at line 289 of file meshSurfaceOptimizerOptimizePointParallel.C.
References LongList< T, Offset >::append(), DynList< T, staticSize >::append(), DynList< T, staticSize >::appendIfNotIn(), Foam::e, Foam::help::exchangeMap(), forAll, forAllRow, meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), UPstream::myProcNo(), refLabelledPoint::objectLabel(), points, LongList< T, Offset >::size(), DynList< T, staticSize >::size(), and Vector< scalar >::zero.
|
private |
Disallow default bitwise assignment.
|
inline |
lock the boundary faces which shall not be modified
prepare data which will be sent to other processors
Definition at line 441 of file meshSurfaceOptimizerI.H.
References meshSurfaceEngine::boundaryFaces(), meshSurfaceEngine::bp(), meshSurfaceEngine::bpAtProcs(), meshSurfaceEngine::bpNeiProcs(), meshSurfaceOptimizer::exchangeData(), Foam::help::exchangeMap(), forAll, forAllConstIter(), forAllRow, meshSurfaceEngine::globalToLocalBndPointAddressing(), meshSurfaceOptimizer::LOCKED, meshSurfaceOptimizer::lockedSurfaceFaces_, UPstream::myProcNo(), UPstream::parRun(), meshSurfaceOptimizer::surfaceEngine_, and meshSurfaceOptimizer::vertexType_.
Referenced by boundaryLayerOptimisation::optimiseLayer().
|
inline |
lock boundary points. They are not be moved.
prepare data which will be sent to other processors
Definition at line 502 of file meshSurfaceOptimizerI.H.
References meshSurfaceEngine::bpAtProcs(), meshSurfaceEngine::bpNeiProcs(), meshSurfaceOptimizer::exchangeData(), Foam::help::exchangeMap(), forAll, forAllConstIter(), forAllRow, meshSurfaceEngine::globalToLocalBndPointAddressing(), meshSurfaceOptimizer::LOCKED, UPstream::myProcNo(), UPstream::parRun(), meshSurfaceOptimizer::surfaceEngine_, and meshSurfaceOptimizer::vertexType_.
|
inline |
lock edge points
Definition at line 557 of file meshSurfaceOptimizerI.H.
References meshSurfaceOptimizer::CORNER, meshSurfaceOptimizer::EDGE, forAll, meshSurfaceOptimizer::LOCKED, and meshSurfaceOptimizer::vertexType_.
Referenced by boundaryLayerOptimisation::optimiseLayer().
void removeUserConstraints | ( | ) |
reset to default constraints
Definition at line 153 of file meshSurfaceOptimizer.C.
References forAll, meshSurfaceOptimizer::LOCKED, and meshSurfaceOptimizer::vertexType_.
void enforceConstraints | ( | const word | subsetName = "badPoints" | ) |
Flag stopping the meshing process if it is not possible to untangle the surface without sacrificing geometry constraints Points which must be moved away from the required position are stored into a point subset
Definition at line 163 of file meshSurfaceOptimizer.C.
References meshSurfaceOptimizer::badPointsSubsetName_, and meshSurfaceOptimizer::enforceConstraints_.
Referenced by voronoiMeshGenerator::optimiseFinalMesh(), and cartesianMeshGenerator::optimiseFinalMesh().
bool untangleSurface | ( | const labelLongList & | activeBoundaryPoints, |
const label | nAdditionalLayers = 0 |
||
) |
runs a surface smoother on the selected boundary points
find the min number of inverted points and add the last number to the stack
count the number of iteration after the last minimum occurence
update the stack
check if the number of inverted points reduces
stop if the procedure does not minimise the number of inverted points
find points which will be handled by the smoothers
smooth edge vertices
use laplacian smoothing
use surface optimizer
update normals and other geometric data
use the combination with the minimum number of inverted points
update normals and other geometric data
the procedure has given up without success there exist some remaining inverted faces in the mesh
Definition at line 327 of file meshSurfaceOptimizerOptimizeSurface.C.
References LongList< T, Offset >::append(), LongList< T, Offset >::clear(), Foam::deleteDemandDrivenData(), Foam::endl(), forAll, forAllConstIter(), Foam::Info, meshSurfaceMapper::mapEdgeNodes(), meshSurfaceMapper::mapVerticesOntoSurface(), mesh, meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), UPstream::parRun(), points, FIFOStack< T >::pop(), FIFOStack< T >::push(), Foam::returnReduce(), List::size(), meshSurfaceEngineModifier::updateGeometry(), and WarningIn.
Referenced by edgeExtractor::checkFacePatchesGeometry(), cartesianMeshGenerator::mapMeshToSurface(), tetMeshGenerator::mapMeshToSurface(), voronoiMeshGenerator::mapMeshToSurface(), voronoiMeshGenerator::optimiseMeshSurface(), meshSurfaceOptimizer::optimizeSurface(), meshSurfaceMapper::preMapVertices(), meshSurfaceOptimizer::untangleSurface(), and edgeExtractor::untangleSurface().
bool untangleSurface | ( | const label | nAdditionalLayers = 2 | ) |
checks for invertex surface elements and tries to untangle them it tries to keep the points on the surface for a couple of iteration and gives up the final iterations by default, it smooths two additional layers of elements around the inverted ones
Definition at line 572 of file meshSurfaceOptimizerOptimizeSurface.C.
References meshSurfaceEngine::boundaryPoints(), forAll, List::size(), meshSurfaceOptimizer::surfaceEngine_, and meshSurfaceOptimizer::untangleSurface().
void optimizeSurface | ( | const label | nIterations = 5 | ) |
optimize boundary nodes after boundary regions are created
needed for parallel execution
optimize edge vertices
project vertices back onto the boundary
update the geometry information
delete the mapper
optimize positions of surface vertices which are not on surface edges
Definition at line 581 of file meshSurfaceOptimizerOptimizeSurface.C.
References LongList< T, Offset >::append(), meshSurfaceEngine::boundaryFacePatches(), meshSurfaceEngine::boundaryPointEdges(), meshSurfaceEngine::boundaryPoints(), Foam::deleteDemandDrivenData(), meshSurfaceOptimizer::EDGE, Foam::endl(), meshSurfaceEngine::faceCentres(), Foam::flush(), forAll, Foam::Info, meshSurfaceOptimizer::LOCKED, meshSurfaceMapper::mapEdgeNodes(), meshSurfaceOptimizer::octreePtr_, meshSurfaceOptimizer::PARTITION, meshSurfaceOptimizer::partitionerPtr_, meshSurfaceEngine::pointFaces(), meshSurfaceEngine::pointNormals(), meshSurfaceEngine::pointPoints(), meshSurfaceOptimizer::PROCBND, meshSurfaceOptimizer::smoothEdgePoints(), meshSurfaceOptimizer::smoothLaplacianFC(), meshSurfaceOptimizer::smoothSurfaceOptimizer(), meshSurfaceOptimizer::surfaceEngine_, meshSurfaceOptimizer::untangleSurface(), meshSurfaceEngineModifier::updateGeometry(), and meshSurfaceOptimizer::vertexType_.
Referenced by voronoiMeshGenerator::optimiseFinalMesh(), cartesianMeshGenerator::optimiseFinalMesh(), boundaryLayerOptimisation::optimiseLayer(), cartesianMeshGenerator::optimiseMeshSurface(), tetMeshGenerator::optimiseMeshSurface(), voronoiMeshGenerator::optimiseMeshSurface(), and meshSurfaceEdgeExtractorFUN::smoothMeshSurface().
void optimizeSurface2D | ( | const label | nIterations = 5 | ) |
optimize the surface of a 2D mesh
needed for parallel execution
optimize edge vertices
move points with maximum z coordinate
map boundary edges to the surface
update normal, centres, etc, after the surface has been modified
optimize Pts of surface vertices which are not on surface edges
move the points which are not at minimum z coordinate
update geometrical data due to movement of vertices
Definition at line 658 of file meshSurfaceOptimizerOptimizeSurface.C.
References LongList< T, Offset >::append(), meshSurfaceEngine::boundaryFacePatches(), meshSurfaceEngine::boundaryPointEdges(), meshSurfaceEngine::boundaryPoints(), meshSurfaceEngine::bp(), LongList< T, Offset >::clear(), polyMeshGen2DEngine::correctPoints(), Foam::deleteDemandDrivenData(), Foam::e, meshSurfaceOptimizer::EDGE, meshSurfaceEngine::edges(), Foam::endl(), meshSurfaceEngine::faceCentres(), Foam::flush(), forAll, Foam::Info, meshSurfaceMapper2D::mapVerticesOntoSurfacePatches(), meshSurfaceEngine::mesh(), meshSurfaceOptimizer::octreePtr_, meshSurfaceOptimizer::PARTITION, meshSurfaceEngine::pointFaces(), meshSurfaceEngine::pointNormals(), meshSurfaceEngine::pointPoints(), meshSurfaceOptimizer::PROCBND, meshSurfaceOptimizer::smoothEdgePoints(), meshSurfaceOptimizer::smoothSurfaceOptimizer(), meshSurfaceOptimizer::surfaceEngine_, meshSurfaceEngineModifier::updateGeometry(), meshSurfaceOptimizer::vertexType_, and polyMeshGen2DEngine::zMinPoints().
Referenced by cartesian2DMeshGenerator::optimiseMeshSurface().
void untangleSurface2D | ( | ) |
untangle the surface of a 2D mesh
needed for parallel execution
update active points and faces affected by the movement of active points
collect active points at inter-processor boundaries
exchange active points among the processors
ensure that all processors have the same Pts active
activate this boundary point
set the changeFaces for the faces attached to this point
apply smoothing to the activated points
move the points which are not at minimum z coordinate
update geometrical data due to movement of vertices
update cell centres and face centres
delete invalid data
Definition at line 759 of file meshSurfaceOptimizerOptimizeSurface.C.
References polyMeshGen2DEngine::activeFace(), LongList< T, Offset >::append(), meshSurfaceEngine::boundaryFacePatches(), meshSurfaceEngine::boundaryPointEdges(), meshSurfaceEngine::boundaryPoints(), meshSurfaceEngine::bp(), meshSurfaceEngine::bpAtProcs(), meshSurfaceEngine::bpNeiProcs(), polyMeshGen2DEngine::correctPoints(), meshSurfaceOptimizer::EDGE, Foam::endl(), meshSurfaceOptimizer::exchangeData(), Foam::help::exchangeMap(), f(), meshSurfaceEngine::faceCentres(), Foam::polyMeshGenChecks::findBadFaces(), forAll, forAllConstIter(), forAllRow, meshSurfaceEngine::globalToLocalBndPointAddressing(), Foam::Info, mesh, meshSurfaceEngine::mesh(), UPstream::myProcNo(), UPstream::parRun(), meshSurfaceOptimizer::PARTITION, meshSurfaceEngine::pointFaces(), meshSurfaceEngine::pointNormals(), meshSurfaceEngine::pointPoints(), meshSurfaceOptimizer::PROCBND, List::size(), meshSurfaceOptimizer::smoothEdgePoints(), meshSurfaceOptimizer::smoothSurfaceOptimizer(), meshSurfaceOptimizer::surfaceEngine_, meshSurfaceEngineModifier::updateGeometry(), meshSurfaceOptimizer::vertexType_, and polyMeshGen2DEngine::zMinPoints().
Referenced by cartesian2DMeshGenerator::optimiseMeshSurface(), and cartesian2DMeshGenerator::refBoundaryLayers().
|
private |
const reference to the mesh surface
Definition at line 67 of file meshSurfaceOptimizer.H.
Referenced by meshSurfaceOptimizer::classifySurfaceVertices(), meshSurfaceOptimizer::edgeNodeDisplacement(), meshSurfaceOptimizer::lockBoundaryFaces(), meshSurfaceOptimizer::lockBoundaryPoints(), meshSurfaceOptimizer::optimizeSurface(), meshSurfaceOptimizer::optimizeSurface2D(), meshSurfaceOptimizer::untangleSurface(), and meshSurfaceOptimizer::untangleSurface2D().
type of surface vertex
Definition at line 70 of file meshSurfaceOptimizer.H.
Referenced by meshSurfaceOptimizer::classifySurfaceVertices(), meshSurfaceOptimizer::edgeNodeDisplacement(), meshSurfaceOptimizer::lockBoundaryFaces(), meshSurfaceOptimizer::lockBoundaryPoints(), meshSurfaceOptimizer::lockFeatureEdges(), meshSurfaceOptimizer::optimizeSurface(), meshSurfaceOptimizer::optimizeSurface2D(), meshSurfaceOptimizer::removeUserConstraints(), and meshSurfaceOptimizer::untangleSurface2D().
|
private |
locked faces which shall not be changed
Definition at line 73 of file meshSurfaceOptimizer.H.
Referenced by meshSurfaceOptimizer::lockBoundaryFaces().
|
private |
surface partitioner
Definition at line 76 of file meshSurfaceOptimizer.H.
Referenced by meshSurfaceOptimizer::calculateTrianglesAndAddressing(), meshSurfaceOptimizer::classifySurfaceVertices(), meshSurfaceOptimizer::optimizeSurface(), and meshSurfaceOptimizer::~meshSurfaceOptimizer().
|
private |
Definition at line 77 of file meshSurfaceOptimizer.H.
Referenced by meshSurfaceOptimizer::~meshSurfaceOptimizer().
|
private |
pointer to mesh octree
Definition at line 80 of file meshSurfaceOptimizer.H.
Referenced by meshSurfaceOptimizer::optimizeSurface(), and meshSurfaceOptimizer::optimizeSurface2D().
|
mutableprivate |
mesh of surface triangles needed for some smoothers
Definition at line 83 of file meshSurfaceOptimizer.H.
Referenced by meshSurfaceOptimizer::calculateTrianglesAndAddressing(), meshSurfaceOptimizer::triMesh(), meshSurfaceOptimizer::updateTriMesh(), and meshSurfaceOptimizer::~meshSurfaceOptimizer().
|
private |
enforce constraints
Definition at line 86 of file meshSurfaceOptimizer.H.
Referenced by meshSurfaceOptimizer::enforceConstraints().
|
private |
name of the subset contaning tangled points
Definition at line 89 of file meshSurfaceOptimizer.H.
Referenced by meshSurfaceOptimizer::enforceConstraints().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.