Public Member Functions | |
meshSurfaceMapper2D (const meshSurfaceEngine &, const meshOctree &) | |
Construct from meshSurfaceEngine and octree. More... | |
~meshSurfaceMapper2D () | |
void | adjustZCoordinates () |
adjust z coordinates of the mesh to the ones in the surface mesh More... | |
void | mapVerticesOntoSurface () |
void | mapVerticesOntoSurface (const labelLongList &edgesToMap) |
void | mapCorners () |
void | mapCorners (const labelLongList &edgesToMap) |
void | mapVerticesOntoSurfacePatches () |
void | mapVerticesOntoSurfacePatches (const labelLongList &edgesToMap) |
void | preMapVertices (const label nIterations=2) |
Private Member Functions | |
void | findActiveBoundaryEdges () |
find active boundary edges More... | |
void | create2DEngine () const |
create a 2D engine More... | |
const polyMeshGen2DEngine & | mesh2DEngine () const |
create and return mesh 2D engine More... | |
void | createTriSurfacePartitioner () const |
create surface partitioner More... | |
const triSurfacePartitioner & | surfacePartitioner () const |
create and reurn surface partitioner More... | |
void | createMeshSurfacePartitioner () const |
create mesh surface partitioner More... | |
const meshSurfacePartitioner & | meshPartitioner () const |
create and return mesh surface partitioner More... | |
void | clearOut () |
delete dynamically allocated data More... | |
void | findMappingDistance (const labelLongList &, std::map< label, scalar > &) const |
find mapping distance for corner points More... | |
void | mapToSmallestDistance (LongList< parMapperHelper > &) |
map to the location with the smallest distance More... | |
meshSurfaceMapper2D (const meshSurfaceMapper2D &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const meshSurfaceMapper2D &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
const meshSurfaceEngine & | surfaceEngine_ |
reference to mesh surface More... | |
const meshOctree & | meshOctree_ |
reference to the octree More... | |
polyMeshGen2DEngine * | mesh2DEnginePtr_ |
mesh 2D engine More... | |
triSurfacePartitioner * | surfPartitionerPtr_ |
triSurface partitioner More... | |
meshSurfacePartitioner * | meshPartitionerPtr_ |
mesh surface partitioner More... | |
labelLongList | activeBoundaryEdges_ |
Definition at line 62 of file meshSurfaceMapper2D.H.
|
private |
Disallow default bitwise copy construct.
meshSurfaceMapper2D | ( | 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 132 of file meshSurfaceMapper2D.C.
References UPstream::parRun().
~meshSurfaceMapper2D | ( | ) |
Definition at line 157 of file meshSurfaceMapper2D.C.
References meshSurfaceMapper2D::clearOut().
|
private |
find active boundary edges
check which edges are at the boundary
Definition at line 47 of file meshSurfaceMapper2D.C.
References meshSurfaceMapper2D::activeBoundaryEdges_, polyMeshGen2DEngine::activeFace(), LongList< T, Offset >::append(), meshSurfaceEngine::beNeiProcs(), polyMeshGenFaces::boundaries(), LongList< T, Offset >::clear(), meshSurfaceEngine::edgeFaces(), Foam::help::exchangeMap(), forAll, forAllConstIter(), meshSurfaceEngine::globalToLocalBndEdgeAddressing(), meshSurfaceEngine::mesh(), meshSurfaceMapper2D::mesh2DEngine(), meshSurfaceEngine::otherEdgeFaceAtProc(), UPstream::parRun(), VRWGraph::sizeOfRow(), and meshSurfaceMapper2D::surfaceEngine_.
|
private |
create a 2D engine
Definition at line 106 of file meshSurfaceMapper2D.C.
References mesh, meshSurfaceEngine::mesh(), meshSurfaceMapper2D::mesh2DEnginePtr_, and meshSurfaceMapper2D::surfaceEngine_.
Referenced by meshSurfaceMapper2D::mesh2DEngine().
|
inlineprivate |
create and return mesh 2D engine
Definition at line 92 of file meshSurfaceMapper2D.H.
References meshSurfaceMapper2D::create2DEngine(), and meshSurfaceMapper2D::mesh2DEnginePtr_.
Referenced by meshSurfaceMapper2D::adjustZCoordinates(), and meshSurfaceMapper2D::findActiveBoundaryEdges().
|
private |
create surface partitioner
Definition at line 112 of file meshSurfaceMapper2D.C.
References meshSurfaceMapper2D::meshOctree_, meshOctree::surface(), and meshSurfaceMapper2D::surfPartitionerPtr_.
Referenced by meshSurfaceMapper2D::surfacePartitioner().
|
inlineprivate |
create and reurn surface partitioner
Definition at line 104 of file meshSurfaceMapper2D.H.
References meshSurfaceMapper2D::createTriSurfacePartitioner(), and meshSurfaceMapper2D::surfPartitionerPtr_.
|
private |
create mesh surface partitioner
Definition at line 117 of file meshSurfaceMapper2D.C.
References meshSurfaceMapper2D::meshPartitionerPtr_, and meshSurfaceMapper2D::surfaceEngine_.
Referenced by meshSurfaceMapper2D::meshPartitioner().
|
inlineprivate |
create and return mesh surface partitioner
Definition at line 116 of file meshSurfaceMapper2D.H.
References meshSurfaceMapper2D::createMeshSurfacePartitioner(), and meshSurfaceMapper2D::meshPartitionerPtr_.
Referenced by meshSurfaceMapper2D::mapCorners().
|
private |
delete dynamically allocated data
Definition at line 122 of file meshSurfaceMapper2D.C.
References Foam::deleteDemandDrivenData(), meshSurfaceMapper2D::mesh2DEnginePtr_, meshSurfaceMapper2D::meshPartitionerPtr_, and meshSurfaceMapper2D::surfPartitionerPtr_.
Referenced by meshSurfaceMapper2D::~meshSurfaceMapper2D().
|
private |
find mapping distance for corner points
generate search distance for corner edges
safety factor
make sure that corner edges 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 56 of file meshSurfaceMapper2DMapVertices.C.
References Foam::help::exchangeMap(), forAll, forAllRow, Foam::magSqr(), Foam::max(), UPstream::myProcNo(), p, UPstream::parRun(), points, labelledScalar::scalarLabel(), and labelledScalar::value().
Referenced by meshSurfaceMapper2D::mapCorners().
|
private |
map to the location with the smallest distance
exchange data
select the point with the smallest moving distance
Definition at line 139 of file meshSurfaceMapper2DMapVertices.C.
References meshSurfaceEngine::beAtProcs(), meshSurfaceEngine::beNeiProcs(), meshSurfaceEngine::bp(), coordinates(), parMapperHelper::coordinates(), Foam::e, meshSurfaceEngine::edges(), Foam::help::exchangeMap(), forAll, forAllRow, meshSurfaceEngine::globalBoundaryEdgeLabel(), parMapperHelper::globalLabel(), meshSurfaceEngine::globalToLocalBndEdgeAddressing(), meshSurfaceEngineModifier::moveBoundaryVertex(), parMapperHelper::movingDistance(), UPstream::myProcNo(), UPstream::parRun(), points, meshSurfaceEngine::points(), LongList< T, Offset >::size(), meshSurfaceMapper2D::surfaceEngine_, meshSurfaceEngineModifier::updateVertexNormals(), and Vector< Cmpt >::z().
Referenced by meshSurfaceMapper2D::mapVerticesOntoSurface().
|
private |
Disallow default bitwise assignment.
void adjustZCoordinates | ( | ) |
adjust z coordinates of the mesh to the ones in the surface mesh
create the bounding box of the surface mesh
Definition at line 219 of file meshSurfaceMapper2DMapVertices.C.
References meshSurfaceEngine::bp(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, boundBox::max(), meshSurfaceMapper2D::mesh2DEngine(), meshSurfaceMapper2D::meshOctree_, boundBox::min(), meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), points, triSurfPoints::points(), meshSurfaceEngine::points(), meshOctree::surface(), meshSurfaceMapper2D::surfaceEngine_, meshSurfaceEngineModifier::updateGeometry(), Vector< Cmpt >::z(), polyMeshGen2DEngine::zMaxPoints(), and polyMeshGen2DEngine::zMinPoints().
Referenced by cartesian2DMeshGenerator::mapMeshToSurface(), and meshSurfaceEdgeExtractor2D::remapBoundaryPoints().
void mapVerticesOntoSurface | ( | ) |
projects surface vertices onto their nearest location on the surface mesh
Definition at line 262 of file meshSurfaceMapper2DMapVertices.C.
References meshSurfaceMapper2D::activeBoundaryEdges_, LongList< T, Offset >::append(), and forAll.
Referenced by cartesian2DMeshGenerator::mapMeshToSurface().
void mapVerticesOntoSurface | ( | const labelLongList & | edgesToMap | ) |
projects selected edge to their nearest location on the surface mesh
Definition at line 272 of file meshSurfaceMapper2DMapVertices.C.
References LongList< T, Offset >::append(), meshSurfaceEngine::beAtProcs(), meshSurfaceEngine::bp(), Foam::e, meshSurfaceEngine::edges(), Foam::endl(), meshOctree::findNearestSurfacePoint(), forAll, Foam::Info, meshSurfaceMapper2D::mapToSmallestDistance(), meshSurfaceMapper2D::meshOctree_, meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), Foam::nl, UPstream::parRun(), points, meshSurfaceEngine::points(), LongList< T, Offset >::size(), VRWGraph::sizeOfRow(), meshSurfaceMapper2D::surfaceEngine_, meshSurfaceEngineModifier::updateGeometry(), and Vector< Cmpt >::z().
void mapCorners | ( | ) |
projects edges with corners onto their nearest location on the surface mesh
Definition at line 354 of file meshSurfaceMapper2DMapVertices.C.
References meshSurfaceMapper2D::activeBoundaryEdges_, LongList< T, Offset >::append(), meshSurfacePartitioner::corners(), Foam::e, meshSurfaceEngine::edges(), forAll, HashTable::found(), meshSurfaceMapper2D::meshPartitioner(), and meshSurfaceMapper2D::surfaceEngine_.
void mapCorners | ( | const labelLongList & | edgesToMap | ) |
projects selected edges with corners onto their nearest locations on the surface mesh
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 373 of file meshSurfaceMapper2DMapVertices.C.
References Foam::abort(), LongList< T, Offset >::append(), DynList< T, staticSize >::append(), meshSurfaceEngine::bp(), VRWGraph::contains(), meshSurfacePartitioner::corners(), Foam::e, meshSurfaceEngine::edges(), edge::end(), Foam::FatalError, FatalErrorIn, meshSurfaceMapper2D::findMappingDistance(), meshOctree::findNearestEdgePoint(), meshOctree::findNearestSurfacePointInRegion(), forAll, forAllRow, HashTable::found(), Foam::magSqr(), meshSurfaceMapper2D::meshOctree_, meshSurfaceMapper2D::meshPartitioner(), meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), p, meshSurfacePartitioner::pointPatches(), points, meshSurfaceEngine::points(), DynList< T, staticSize >::size(), Foam::sqrt(), edge::start(), meshSurfaceMapper2D::surfaceEngine_, meshSurfaceEngineModifier::updateGeometry(), Vector< Cmpt >::z(), and Vector< scalar >::zero.
void mapVerticesOntoSurfacePatches | ( | ) |
projects surface edges onto the surface with respect to the surface patch they belong to. Corners are respected
Definition at line 490 of file meshSurfaceMapper2DMapVertices.C.
References meshSurfaceMapper2D::activeBoundaryEdges_, LongList< T, Offset >::append(), and forAll.
Referenced by meshSurfaceOptimizer::optimizeSurface2D(), and meshSurfaceEdgeExtractor2D::remapBoundaryPoints().
void mapVerticesOntoSurfacePatches | ( | const labelLongList & | edgesToMap | ) |
projects selected surface edges onto the surface with respect to the surface patch they belong to. Corners are respected
map the selected edges on their patches
update geometry at moved vertices
Definition at line 501 of file meshSurfaceMapper2DMapVertices.C.
References LongList< T, Offset >::append(), LongList< T, Offset >::clear(), Foam::e, Foam::endl(), forAll, Foam::Info, meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), p, UPstream::parRun(), points, LongList< T, Offset >::size(), VRWGraph::sizeOfRow(), meshSurfaceEngineModifier::updateGeometry(), and Vector< Cmpt >::z().
void preMapVertices | ( | const label | nIterations = 2 | ) |
a combination of mapping and smoothing intended for better feature capturing
use the shrinking laplace first
store the information
collect data to be sent to other processors
exchange data with other processors
combine collected data with the available data
calculate coordinates of points for searching
create the surface modifier and move the surface points
Definition at line 49 of file meshSurfaceMapper2DPremapVertices.C.
References meshSurfaceMapper2D::activeBoundaryEdges_, LongList< T, Offset >::append(), meshSurfaceEngine::beAtProcs(), meshSurfaceEngine::beNeiProcs(), meshSurfaceEngine::bp(), coordinates(), labelledPoint::coordinates(), Foam::e, meshSurfaceEngine::edgeFaces(), meshSurfaceEngine::edges(), Foam::endl(), Foam::help::exchangeMap(), meshSurfaceEngine::faceCentres(), meshOctree::findNearestSurfacePoint(), Foam::flush(), forAll, forAllRow, meshSurfaceEngine::globalBoundaryEdgeLabel(), meshSurfaceEngine::globalToLocalBndEdgeAddressing(), Foam::Info, refLabelledPoint::lPoint(), meshSurfaceMapper2D::meshOctree_, meshSurfaceEngineModifier::moveBoundaryVertexNoUpdate(), UPstream::myProcNo(), refLabelledPoint::objectLabel(), p, UPstream::parRun(), labelledPoint::pointLabel(), points, meshSurfaceEngine::points(), LongList< T, Offset >::size(), VRWGraph::sizeOfRow(), meshSurfaceMapper2D::surfaceEngine_, meshSurfaceEngineModifier::syncVerticesAtParallelBoundaries(), meshSurfaceEngineModifier::updateGeometry(), Foam::Warning, Vector< Cmpt >::z(), and Vector< scalar >::zero.
Referenced by cartesian2DMeshGenerator::mapMeshToSurface().
|
private |
reference to mesh surface
Definition at line 66 of file meshSurfaceMapper2D.H.
Referenced by meshSurfaceMapper2D::adjustZCoordinates(), meshSurfaceMapper2D::create2DEngine(), meshSurfaceMapper2D::createMeshSurfacePartitioner(), meshSurfaceMapper2D::findActiveBoundaryEdges(), meshSurfaceMapper2D::mapCorners(), meshSurfaceMapper2D::mapToSmallestDistance(), meshSurfaceMapper2D::mapVerticesOntoSurface(), and meshSurfaceMapper2D::preMapVertices().
|
private |
reference to the octree
Definition at line 69 of file meshSurfaceMapper2D.H.
Referenced by meshSurfaceMapper2D::adjustZCoordinates(), meshSurfaceMapper2D::createTriSurfacePartitioner(), meshSurfaceMapper2D::mapCorners(), meshSurfaceMapper2D::mapVerticesOntoSurface(), and meshSurfaceMapper2D::preMapVertices().
|
mutableprivate |
mesh 2D engine
Definition at line 72 of file meshSurfaceMapper2D.H.
Referenced by meshSurfaceMapper2D::clearOut(), meshSurfaceMapper2D::create2DEngine(), and meshSurfaceMapper2D::mesh2DEngine().
|
mutableprivate |
triSurface partitioner
Definition at line 75 of file meshSurfaceMapper2D.H.
Referenced by meshSurfaceMapper2D::clearOut(), meshSurfaceMapper2D::createTriSurfacePartitioner(), and meshSurfaceMapper2D::surfacePartitioner().
|
mutableprivate |
mesh surface partitioner
Definition at line 78 of file meshSurfaceMapper2D.H.
Referenced by meshSurfaceMapper2D::clearOut(), meshSurfaceMapper2D::createMeshSurfacePartitioner(), and meshSurfaceMapper2D::meshPartitioner().
|
private |
labels of edges which are at the boundary which shall be mapped onto the surface
Definition at line 82 of file meshSurfaceMapper2D.H.
Referenced by meshSurfaceMapper2D::findActiveBoundaryEdges(), meshSurfaceMapper2D::mapCorners(), meshSurfaceMapper2D::mapVerticesOntoSurface(), meshSurfaceMapper2D::mapVerticesOntoSurfacePatches(), and meshSurfaceMapper2D::preMapVertices().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.