Public Member Functions | Private Member Functions | Private Attributes
meshSurfaceMapper Class Reference
Collaboration diagram for meshSurfaceMapper:
Collaboration graph
[legend]

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 meshSurfacePartitionermeshPartitioner () const
 
void createTriSurfacePartitioner () const
 create and return triSurfacePartitioner More...
 
const triSurfacePartitionersurfacePartitioner () 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 meshSurfaceEnginesurfaceEngine_
 mesh surface More...
 
const meshOctreemeshOctree_
 reference to the octree More...
 
const meshSurfacePartitionersurfaceEnginePartitionerPtr_
 mesh surface partitioner More...
 
const bool deletePartitioner_
 
triSurfacePartitionersurfPartitionerPtr_
 triSurface partitioner More...
 

Detailed Description

Definition at line 59 of file meshSurfaceMapper.H.

Constructor & Destructor Documentation

◆ meshSurfaceMapper() [1/3]

meshSurfaceMapper ( const meshSurfaceMapper )
private

Disallow default bitwise copy construct.

◆ meshSurfaceMapper() [2/3]

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().

Here is the call graph for this function:

◆ meshSurfaceMapper() [3/3]

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().

Here is the call graph for this function:

◆ ~meshSurfaceMapper()

Definition at line 106 of file meshSurfaceMapper.C.

References meshSurfaceMapper::clearOut().

Here is the call graph for this function:

Member Function Documentation

◆ createMeshSurfacePartitioner()

void createMeshSurfacePartitioner ( ) const
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().

Here is the caller graph for this function:

◆ meshPartitioner()

const meshSurfacePartitioner& meshPartitioner ( ) const
inlineprivate

Definition at line 78 of file meshSurfaceMapper.H.

References meshSurfaceMapper::createMeshSurfacePartitioner(), and meshSurfaceMapper::surfaceEnginePartitionerPtr_.

Referenced by meshSurfaceMapper::mapCorners(), meshSurfaceMapper::mapCornersAndEdges(), and meshSurfaceMapper::mapEdgeNodes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createTriSurfacePartitioner()

void createTriSurfacePartitioner ( ) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ surfacePartitioner()

const triSurfacePartitioner& surfacePartitioner ( ) const
inlineprivate

Definition at line 88 of file meshSurfaceMapper.H.

References meshSurfaceMapper::createTriSurfacePartitioner(), and meshSurfaceMapper::surfPartitionerPtr_.

Referenced by meshSurfaceMapper::mapCorners().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearOut()

void clearOut ( )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mapCorners()

void mapCorners ( const labelLongList nodesToMap)
private

◆ findMappingDistance()

void findMappingDistance ( const labelLongList nodesToMap,
scalarList mappingDistance 
) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ faceMetricInPatch()

scalar faceMetricInPatch ( const label  bfI,
const label  patchI 
) const
private

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectNodesAtParallelBnd()

void selectNodesAtParallelBnd ( const labelLongList selNodes)
private

◆ mapToSmallestDistance()

void mapToSmallestDistance ( LongList< parMapperHelper > &  parN)
private

◆ operator=()

void operator= ( const meshSurfaceMapper )
private

Disallow default bitwise assignment.

◆ mapNodeToPatch()

void mapNodeToPatch ( const label  bpI,
const label  patchI = -1 
)

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_.

Here is the call graph for this function:

◆ mapVerticesOntoSurface() [1/2]

void mapVerticesOntoSurface ( )

◆ mapVerticesOntoSurface() [2/2]

void mapVerticesOntoSurface ( const labelLongList nodesToMap)

◆ mapCornersAndEdges()

void mapCornersAndEdges ( )

◆ mapEdgeNodes()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mapVerticesOntoSurfacePatches() [1/2]

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mapVerticesOntoSurfacePatches() [2/2]

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().

Here is the call graph for this function:

◆ preMapVertices()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ surfaceEngine_

const meshSurfaceEngine& surfaceEngine_
private

◆ meshOctree_

const meshOctree& meshOctree_
private

◆ surfaceEnginePartitionerPtr_

const meshSurfacePartitioner* surfaceEnginePartitionerPtr_
mutableprivate

◆ deletePartitioner_

const bool deletePartitioner_
private

Definition at line 70 of file meshSurfaceMapper.H.

Referenced by meshSurfaceMapper::clearOut().

◆ surfPartitionerPtr_

triSurfacePartitioner* surfPartitionerPtr_
mutableprivate

The documentation for this class was generated from the following files: