Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
laurence
2013-09-26 15:46:37 +01:00
27 changed files with 184 additions and 76 deletions

View File

@ -13,6 +13,7 @@ EXE_INC = \
${CGAL_EXACT} \
${CGAL_INEXACT} \
${CGAL_INC} \
${c++CGALWARN} \
-IconformalVoronoiMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \

View File

@ -14,6 +14,7 @@ EXE_INC = \
${CGAL_EXACT} \
${CGAL_INEXACT} \
${CGAL_INC} \
${c++CGALWARN} \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \

View File

@ -2231,7 +2231,6 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
if
(
vA->boundaryPoint() && vB->boundaryPoint()
&& !isProcBoundaryEdge(eit)
&& !ptPairs_.isPointPair(vA, vB)
&& !ftPtConformer_.featurePointPairs().isPointPair(vA, vB)
)

View File

@ -1160,23 +1160,6 @@ void Foam::conformalVoronoiMesh::insertFeaturePoints(bool distribute)
Info<< nl
<< "Inserting feature points" << endl;
// Map<label> oldToNewIndices = insertPoints(featureVertices_, distribute);
// featurePtPairs_.reIndex(oldToNewIndices);
// forAll(featureVertices_, vI)
// {
// Map<label>::const_iterator iter =
// oldToNewIndices.find(featureVertices_[vI].index());
// if (iter != oldToNewIndices.end())
// {
// featureVertices_[vI].index() = iter();
// }
// }
const label preFeaturePointSize(number_of_vertices());
if (Pstream::parRun() && distribute)
@ -1187,7 +1170,10 @@ void Foam::conformalVoronoiMesh::insertFeaturePoints(bool distribute)
const List<Vb>& ftPtVertices = ftPtConformer_.featurePointVertices();
// Insert the created points directly as already distributed.
this->DelaunayMesh<Delaunay>::insertPoints(ftPtVertices, true);
Map<label> oldToNewIndices =
this->DelaunayMesh<Delaunay>::insertPoints(ftPtVertices, true);
ftPtConformer_.reIndexPointPairs(oldToNewIndices);
label nFeatureVertices = number_of_vertices() - preFeaturePointSize;
reduce(nFeatureVertices, sumOp<label>());

View File

@ -609,4 +609,26 @@ void Foam::featurePointConformer::distribute
}
void Foam::featurePointConformer::reIndexPointPairs
(
const Map<label>& oldToNewIndices
)
{
forAll(featurePointVertices_, vI)
{
const label currentIndex = featurePointVertices_[vI].index();
Map<label>::const_iterator newIndexIter =
oldToNewIndices.find(currentIndex);
if (newIndexIter != oldToNewIndices.end())
{
featurePointVertices_[vI].index() = newIndexIter();
}
}
ftPtPairs_.reIndex(oldToNewIndices);
}
// ************************************************************************* //

View File

@ -176,6 +176,9 @@ public:
//- Distribute the feature point vertices according to the
// supplied background mesh
void distribute(const backgroundMeshDecomposition& decomposition);
//- Reindex the feature point pairs using the map.
void reIndexPointPairs(const Map<label>& oldToNewIndices);
};

View File

@ -9,6 +9,7 @@ EXE_INC = \
${EXE_FROUNDING_MATH} \
${EXE_NDEBUG} \
${CGAL_INC} \
${c++CGALWARN} \
-I$(FOAM_APP)/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/lnInclude \
-I../cvMesh/vectorTools \
-IconformalVoronoi2DMesh/lnInclude \