Commit 015225ea authored by franjo_j@hotmail.com's avatar franjo_j@hotmail.com
Browse files

A working version of a 2D cartesian mesher


git-svn-id: https://pl5.projectlocker.com/igui/meshGeneration/svn@44 fdcce57e-7e00-11e2-b579-49867b4cea03
parent 2e94f1d5
......@@ -85,8 +85,7 @@ void meshOctree::findNearestSurfacePoint
const VRWGraph& ct =
neighbours[neiI]->slotPtr()->containedTriangles_;
const constRow el =
ct[neighbours[neiI]->containedElements()];
const constRow el = ct[neighbours[neiI]->containedElements()];
forAll(el, tI)
{
const point p0 =
......@@ -109,7 +108,10 @@ void meshOctree::findNearestSurfacePoint
} while( !found && (iterationI++ < 5) );
if( (!found || (region < 0)) && !Pstream::parRun() )
{
Warning << "Could not find a boundary region for vertex " << p << endl;
Warning << "Found " << found << " and region " << region << endl;
}
}
void meshOctree::findNearestSurfacePointInRegion
......
......@@ -333,6 +333,7 @@ void meshSurfaceOptimizer::optimizeSurface(const label nIterations)
surfaceEngine_.boundaryPointEdges();
surfaceEngine_.boundaryFacePatches();
surfaceEngine_.pointNormals();
this->triangles();
labelListPMG procBndNodes, edgePoints;
forAll(bPoints, bpI)
......@@ -469,7 +470,7 @@ void meshSurfaceOptimizer::optimizeSurface2D(const label nIterations)
surfaceEngine_.boundaryPointEdges();
surfaceEngine_.boundaryFacePatches();
surfaceEngine_.pointNormals();
partitioner_.corners();
this->triangles();
labelListPMG procBndNodes, edgePoints, activeEdges, updatePoints;
forAll(edges, beI)
......@@ -631,6 +632,7 @@ void meshSurfaceOptimizer::untangleSurface2D()
surfaceEngine_.boundaryPointEdges();
surfaceEngine_.boundaryFacePatches();
surfaceEngine_.pointNormals();
this->triangles();
boolList activeBoundaryPoint(bPoints.size());
boolList changedFace(activeFace.size(), true);
......@@ -800,6 +802,9 @@ void meshSurfaceOptimizer::untangleSurface2D()
).updateGeometry(changedFace);
} while( ++iterationI < 10 );
//- delete invalid data
mesh.clearAddressingData();
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -1250,11 +1250,8 @@ void meshSurfaceEngine::calculateEdgePatchesAddressing() const
const VRWGraph& edgeFaces = this->edgeFaces();
const labelList& facePatch = this->boundaryFacePatches();
edgePatches.setSizeAndColumnWidth(edgeFaces.size(), 2);
edgePatches.setSize(edgeFaces.size());
# ifdef USE_OMP
# pragma omp parallel for schedule(dynamic, 50)
# endif
forAll(edgeFaces, eI)
{
DynList<label> ePatches;
......
......@@ -182,7 +182,6 @@ void meshSurfaceMapper2D::preMapVertices(const label nIterations)
meshSurfaceEngineModifier surfaceModifier(surfaceEngine_);
# ifdef USE_OMP
const label size = boundaryPoints.size();
# pragma omp parallel for schedule(dynamic, 50)
# endif
forAll(activeBoundaryEdges_, eI)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment