Public Member Functions | |
meshSurfaceMapper (const meshSurfaceEngine &, const meshOctree &) | |
Construct from meshSurfaceEngine and octree. More... | |
meshSurfaceMapper (const meshSurfacePartitioner &, const meshOctree &) | |
Construct from meshSurfacePartitioner and octree. More... | |
~meshSurfaceMapper () | |
void | mapNodeToPatch (const label bpI, const label patchI=-1) |
void | mapVerticesOntoSurface () |
void | mapVerticesOntoSurface (const labelLongList &nodesToMap) |
void | mapCornersAndEdges () |
void | mapEdgeNodes (const labelLongList &nodesToMap) |
void | mapVerticesOntoSurfacePatches () |
void | mapVerticesOntoSurfacePatches (const labelLongList &nodesToMap) |
void | preMapVertices (const label nIterations=3) |
Private Member Functions | |
void | createMeshSurfacePartitioner () const |
create and return mesh surface partitioner More... | |
const meshSurfacePartitioner & | meshPartitioner () const |
void | createTriSurfacePartitioner () const |
create and return triSurfacePartitioner More... | |
const triSurfacePartitioner & | surfacePartitioner () const |
void | clearOut () |
delete surfaceEnginePartitionerPtr_ and surfPartitionerPtr_ More... | |
void | mapCorners (const labelLongList &nodesToMap) |
map corner nodes to the boundary More... | |
void | findMappingDistance (const labelLongList &nodesToMap, scalarList &mappingDistance) const |
find mapping distance for selected points More... | |
scalar | faceMetricInPatch (const label bfI, const label patchI) const |
calculate face metric More... | |
void | selectNodesAtParallelBnd (const labelLongList &) |
check if nodes at parallel boundaries are selected at all processors More... | |
void | mapToSmallestDistance (LongList< parMapperHelper > &) |
meshSurfaceMapper (const meshSurfaceMapper &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const meshSurfaceMapper &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
const meshSurfaceEngine & | surfaceEngine_ |
mesh surface More... | |
const meshOctree & | meshOctree_ |
reference to the octree More... | |
const meshSurfacePartitioner * | surfaceEnginePartitionerPtr_ |
mesh surface partitioner More... | |
const bool | deletePartitioner_ |
triSurfacePartitioner * | surfPartitionerPtr_ |
triSurface partitioner More... | |
Definition at line 59 of file meshSurfaceMapper.H.
|
private |
Disallow default bitwise copy construct.
meshSurfaceMapper | ( | const meshSurfaceEngine & | mse, |
const meshOctree & | octree | ||
) |
Construct from meshSurfaceEngine and octree.
allocate bpAtProcs and other addressing this is done here to prevent possible deadlocks
Definition at line 65 of file meshSurfaceMapper.C.
References UPstream::parRun().
meshSurfaceMapper | ( | const meshSurfacePartitioner & | mPart, |
const meshOctree & | octree | ||
) |
Construct from meshSurfacePartitioner and octree.
allocate bpAtProcs and other addressing this is done here to prevent possible deadlocks
Definition at line 85 of file meshSurfaceMapper.C.
References UPstream::parRun().
~meshSurfaceMapper | ( | ) |
Definition at line 106 of file meshSurfaceMapper.C.
References meshSurfaceMapper::clearOut().
|
private |
create and return mesh surface partitioner
Definition at line 45 of file meshSurfaceMapper.C.
References meshSurfaceMapper::surfaceEngine_, and meshSurfaceMapper::surfaceEnginePartitionerPtr_.
Referenced by meshSurfaceMapper::meshPartitioner().
|
inlineprivate |
Definition at line 78 of file meshSurfaceMapper.H.
References meshSurfaceMapper::createMeshSurfacePartitioner(), and meshSurfaceMapper::surfaceEnginePartitionerPtr_.
Referenced by meshSurfaceMapper::mapCorners(), meshSurfaceMapper::mapCornersAndEdges(), and meshSurfaceMapper::mapEdgeNodes().
|
private |
create and return triSurfacePartitioner
Definition at line 50 of file meshSurfaceMapper.C.
References meshSurfaceMapper::meshOctree_, meshOctree::surface(), and meshSurfaceMapper::surfPartitionerPtr_.
Referenced by meshSurfaceMapper::surfacePartitioner().
|
inlineprivate |
Definition at line 88 of file meshSurfaceMapper.H.
References meshSurfaceMapper::createTriSurfacePartitioner(), and meshSurfaceMapper::surfPartitionerPtr_.
Referenced by meshSurfaceMapper::mapCorners().
|
private |
delete surfaceEnginePartitionerPtr_ and surfPartitionerPtr_
Definition at line 55 of file meshSurfaceMapper.C.
References Foam::deleteDemandDrivenData(), meshSurfaceMapper::deletePartitioner_, meshSurfaceMapper::surfaceEnginePartitionerPtr_, and meshSurfaceMapper::surfPartitionerPtr_.
Referenced by meshSurfaceMapper::~meshSurfaceMapper().
|
private |
map corner nodes to the boundary
for every corner in the mesh surface find the nearest corner in the triSurface
find the nearest position to the given point patches
find the nearest triSurface corner for the given corner
move the point to the nearest corner
Definition at line 195 of file meshSurfaceMapperCornersAndEdges.C.
References Foam::abort(), meshSurfaceEngine::boundaryPoints(), DynList< T, staticSize >::contains(), triSurfacePartitioner::cornerPatches(), triSurfacePartitioner::corners(), meshSurfacePartitioner::corners(), Foam::e, Foam::FatalError, FatalErrorIn, meshSurfaceMapper::findMappingDistance(), meshOctree::findNearestSurfacePointInRegion(), forAll, HashTable::found(), Foam::magSqr(), meshSurfaceMapper::meshOctree_, meshSurfaceMapper::meshPartitioner(), meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), p, patches, meshSurfacePartitioner::pointPatches(), points, triSurfPoints::points(), meshSurfaceEngine::points(), meshOctree::surface(), meshSurfaceMapper::surfaceEngine_, meshSurfaceMapper::surfacePartitioner(), meshSurfaceEngineModifier::updateGeometry(), and Vector< scalar >::zero.
Referenced by meshSurfaceMapper::mapCornersAndEdges().
|
private |
find mapping distance for selected points
generate search distance for corner nodes
safety factor
make sure that corner nodesd at parallel boundaries have the same range in which they accept the corners
create the map for exchanging data
exchange data between processors
select the maximum mapping distance for processor points
choose the maximum value for the mapping distance
Definition at line 53 of file meshSurfaceMapperCornersAndEdges.C.
References Foam::help::exchangeMap(), forAll, forAllRow, Foam::magSqr(), Foam::max(), UPstream::myProcNo(), p, UPstream::parRun(), pFaces, points, labelledScalar::scalarLabel(), List::setSize(), LongList< T, Offset >::size(), VRWGraph::sizeOfRow(), and labelledScalar::value().
Referenced by meshSurfaceMapper::mapCorners(), and meshSurfaceMapper::mapEdgeNodes().
calculate face metric
Definition at line 142 of file meshSurfaceMapperCornersAndEdges.C.
References face::centre(), forAll, Foam::mag(), Foam::magSqr(), face::normal(), points, List::size(), and Vector< scalar >::zero.
Referenced by meshSurfaceMapper::preMapVertices().
|
private |
check if nodes at parallel boundaries are selected at all processors
exchange data
Definition at line 53 of file meshSurfaceMapperMapVertices.C.
References meshSurfaceEngine::bpAtProcs(), meshSurfaceEngine::bpNeiProcs(), Foam::help::exchangeMap(), forAll, forAllRow, meshSurfaceEngine::globalBoundaryPointLabel(), meshSurfaceEngine::globalToLocalBndPointAddressing(), UPstream::myProcNo(), UPstream::parRun(), VRWGraph::size(), and meshSurfaceMapper::surfaceEngine_.
|
private |
map to the smallest distance makes sense for parallel calculations, only
exchange data
select the point with the smallest moving distance
Definition at line 104 of file meshSurfaceMapperMapVertices.C.
References meshSurfaceEngine::bpAtProcs(), meshSurfaceEngine::bpNeiProcs(), coordinates(), parMapperHelper::coordinates(), Foam::help::exchangeMap(), forAll, forAllRow, meshSurfaceEngine::globalBoundaryPointLabel(), parMapperHelper::globalLabel(), meshSurfaceEngine::globalToLocalBndPointAddressing(), meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), parMapperHelper::movingDistance(), UPstream::myProcNo(), UPstream::parRun(), LongList< T, Offset >::size(), and meshSurfaceMapper::surfaceEngine_.
Referenced by meshSurfaceMapper::mapEdgeNodes(), meshSurfaceMapper::mapVerticesOntoSurface(), and meshSurfaceMapper::preMapVertices().
|
private |
Disallow default bitwise assignment.
map the given surface node on the selected patch this does not make sense for vertices at parallel boundaries
Definition at line 172 of file meshSurfaceMapperMapVertices.C.
References meshSurfaceEngine::boundaryPoints(), meshOctree::findNearestSurfacePoint(), meshOctree::findNearestSurfacePointInRegion(), meshSurfaceMapper::meshOctree_, meshSurfaceEngineModifier::moveBoundaryVertex(), p, points, meshSurfaceEngine::points(), and meshSurfaceMapper::surfaceEngine_.
void mapVerticesOntoSurface | ( | ) |
projects surface vertices onto their nearest location on the surface mesh
Definition at line 202 of file meshSurfaceMapperMapVertices.C.
References meshSurfaceEngine::boundaryPoints(), Foam::endl(), forAll, Foam::Info, List::size(), and meshSurfaceMapper::surfaceEngine_.
Referenced by cartesianMeshGenerator::mapMeshToSurface(), tetMeshGenerator::mapMeshToSurface(), voronoiMeshGenerator::mapMeshToSurface(), tetMeshGenerator::projectSurfaceAfterBackScaling(), voronoiMeshGenerator::projectSurfaceAfterBackScaling(), cartesianMeshGenerator::projectSurfaceAfterBackScaling(), and meshSurfaceOptimizer::untangleSurface().
void mapVerticesOntoSurface | ( | const labelLongList & | nodesToMap | ) |
projects selected surface vertices to their nearest location on the surface mesh
make sure that the points are at the nearest location on the surface
re-calculate face normals, point normals, etc.
Definition at line 215 of file meshSurfaceMapperMapVertices.C.
References LongList< T, Offset >::append(), meshSurfaceEngine::boundaryPoints(), meshSurfaceEngine::bpAtProcs(), Foam::endl(), meshOctree::findNearestSurfacePoint(), forAll, Foam::Info, meshSurfaceMapper::mapToSmallestDistance(), meshSurfaceMapper::meshOctree_, meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), Foam::nl, UPstream::parRun(), points, meshSurfaceEngine::points(), LongList< T, Offset >::size(), VRWGraph::sizeOfRow(), meshSurfaceMapper::surfaceEngine_, and meshSurfaceEngineModifier::updateGeometry().
void mapCornersAndEdges | ( | ) |
projects corner and edge vertices onto their nearest location on the surface mesh
Definition at line 432 of file meshSurfaceMapperCornersAndEdges.C.
References LongList< T, Offset >::append(), LongList< T, Offset >::clear(), meshSurfacePartitioner::corners(), meshSurfacePartitioner::edgePoints(), forAllConstIter(), meshSurfaceMapper::mapCorners(), meshSurfaceMapper::mapEdgeNodes(), and meshSurfaceMapper::meshPartitioner().
void mapEdgeNodes | ( | const labelLongList & | nodesToMap | ) |
projects selected edge vertices onto their nearest locations on the surface mesh
find mapping distance for selected vertices
map point to the nearest vertex on the surface mesh
find patches at this edge point
find approximate position of the vertex on the edge
find the nearest vertex on the triSurface feature edge
use the vertex with the smallest mapping distance
check if the mapping distance is within the given tolerances
this indicates possible problems reduce the mapping distance
move the point to the nearest edge vertex
Definition at line 311 of file meshSurfaceMapperCornersAndEdges.C.
References LongList< T, Offset >::append(), meshSurfaceEngine::boundaryPoints(), meshSurfaceEngine::bpAtProcs(), Foam::e, f(), meshSurfaceMapper::findMappingDistance(), meshOctree::findNearestEdgePoint(), meshOctree::findNearestSurfacePointInRegion(), forAll, Foam::magSqr(), meshSurfaceMapper::mapToSmallestDistance(), meshSurfaceMapper::meshOctree_, meshSurfaceMapper::meshPartitioner(), meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), p, UPstream::parRun(), patches, meshSurfacePartitioner::pointPatches(), points, meshSurfaceEngine::points(), VRWGraph::sizeOfRow(), Foam::sqrt(), meshSurfaceMapper::surfaceEngine_, meshSurfaceEngineModifier::updateGeometry(), and Vector< scalar >::zero.
Referenced by meshSurfaceMapper::mapCornersAndEdges(), meshSurfaceOptimizer::optimizeSurface(), and meshSurfaceOptimizer::untangleSurface().
void mapVerticesOntoSurfacePatches | ( | ) |
projects surface vertices onto the surface with respect to the surface patch they belong to. Edges and corner are respected
Definition at line 285 of file meshSurfaceMapperMapVertices.C.
References meshSurfaceEngine::boundaryPoints(), Foam::endl(), forAll, Foam::Info, List::size(), and meshSurfaceMapper::surfaceEngine_.
Referenced by edgeExtractor::checkFacePatchesGeometry(), meshOptimizer::optimizeSurface(), meshSurfaceEdgeExtractorNonTopo::remapBoundaryPoints(), and meshSurfaceEdgeExtractorFUN::remapBoundaryPoints().
void mapVerticesOntoSurfacePatches | ( | const labelLongList & | nodesToMap | ) |
projects selected surface vertices onto the surface with respect to the surface patch they belong to. Edges and corner are respected
find corner and edge points
map the remaining selected points
map vertices at inter-processor boundaries to the nearest location on the surface
update face normals, point normals, etc.
map edge nodes
map corner vertices
Definition at line 299 of file meshSurfaceMapperMapVertices.C.
References LongList< T, Offset >::append(), meshSurfacePartitioner::corners(), meshSurfacePartitioner::edgePoints(), Foam::endl(), forAll, HashTable::found(), Foam::Info, meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), p, UPstream::parRun(), meshSurfacePartitioner::pointPatches(), points, LongList< T, Offset >::size(), VRWGraph::sizeOfRow(), and meshSurfaceEngineModifier::updateGeometry().
void preMapVertices | ( | const label | nIterations = 3 | ) |
a combination of mapping and smoothing intended for better feature capturing
find patches in the vicinity of a boundary face
use the shrinking laplace first
pointer needed in case of parallel calculation
collect data to be sent to other processors
exchange data with other processors
combine collected data with the available data
create the surface modifier and move the surface points
make sure that the vertices at inter-processor boundaries are mapped onto the same location
update the surface geometry of the
Definition at line 51 of file meshSurfaceMapperPremapVertices.C.
References LongList< T, Offset >::append(), meshSurfaceEngine::boundaryFaces(), meshSurfaceEngine::boundaryPoints(), meshSurfaceEngine::bp(), meshSurfaceEngine::bpAtProcs(), meshSurfaceEngine::bpNeiProcs(), Foam::constant::universal::c, meshOctree::containedTriangles(), coordinates(), labelledPointScalar::coordinates(), Foam::endl(), Foam::help::exchangeMap(), meshSurfaceEngine::faceCentres(), meshSurfaceMapper::faceMetricInPatch(), meshOctree::findLeavesContainedInBox(), meshOctree::findNearestPointToPatches(), meshOctree::findNearestSurfacePointInRegion(), forAll, forAllConstIter(), forAllRow, meshSurfaceEngine::globalBoundaryPointLabel(), meshSurfaceEngine::globalToLocalBndPointAddressing(), Foam::Info, Foam::mag(), Foam::magSqr(), meshSurfaceMapper::mapToSmallestDistance(), Foam::max(), meshSurfaceMapper::meshOctree_, meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), UPstream::myProcNo(), p, UPstream::parRun(), patches, meshSurfaceEngine::pointFaces(), meshSurfaceEngine::pointInFaces(), labelledPointScalar::pointLabel(), points, meshSurfaceEngine::points(), Foam::pos(), labelledPointScalar::scalarValue(), List::setSize(), List::size(), UList::size(), VRWGraph::sizeOfRow(), meshOctree::surface(), meshSurfaceMapper::surfaceEngine_, meshSurfaceOptimizer::untangleSurface(), meshSurfaceEngineModifier::updateGeometry(), w(), and Vector< scalar >::zero.
Referenced by cartesianMeshGenerator::mapMeshToSurface(), and voronoiMeshGenerator::mapMeshToSurface().
|
private |
mesh surface
Definition at line 63 of file meshSurfaceMapper.H.
Referenced by meshSurfaceMapper::createMeshSurfacePartitioner(), meshSurfaceMapper::mapCorners(), meshSurfaceMapper::mapEdgeNodes(), meshSurfaceMapper::mapNodeToPatch(), meshSurfaceMapper::mapToSmallestDistance(), meshSurfaceMapper::mapVerticesOntoSurface(), meshSurfaceMapper::mapVerticesOntoSurfacePatches(), meshSurfaceMapper::preMapVertices(), and meshSurfaceMapper::selectNodesAtParallelBnd().
|
private |
reference to the octree
Definition at line 66 of file meshSurfaceMapper.H.
Referenced by meshSurfaceMapper::createTriSurfacePartitioner(), meshSurfaceMapper::mapCorners(), meshSurfaceMapper::mapEdgeNodes(), meshSurfaceMapper::mapNodeToPatch(), meshSurfaceMapper::mapVerticesOntoSurface(), and meshSurfaceMapper::preMapVertices().
|
mutableprivate |
mesh surface partitioner
Definition at line 69 of file meshSurfaceMapper.H.
Referenced by meshSurfaceMapper::clearOut(), meshSurfaceMapper::createMeshSurfacePartitioner(), and meshSurfaceMapper::meshPartitioner().
|
private |
Definition at line 70 of file meshSurfaceMapper.H.
Referenced by meshSurfaceMapper::clearOut().
|
mutableprivate |
triSurface partitioner
Definition at line 73 of file meshSurfaceMapper.H.
Referenced by meshSurfaceMapper::clearOut(), meshSurfaceMapper::createTriSurfacePartitioner(), and meshSurfaceMapper::surfacePartitioner().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.