ENH: Minimal referring of vertices to construct parallel interface.

This commit is contained in:
graham
2011-03-22 15:14:25 +00:00
parent 99d76986ab
commit 0905b6651d
4 changed files with 646 additions and 394 deletions

View File

@ -426,6 +426,22 @@ private:
const Delaunay::Finite_vertices_iterator& vit
) const;
//- Build the parallelInterfaces of the mesh
void buildParallelInterface();
//- Build map to refer vertices to target processors
mapDistribute buildReferringMap
(
const DynamicList<label>& targetProcessor
) const;
void referVertices
(
const DynamicList<label>& targetProcessor,
DynamicList<Foam::point>& parallelInterfacePoints,
DynamicList<label>& parallelInterfaceIndices
);
//- Check to see if dual cell specified by given vertex iterator
// intersects the parallel interface, hence needs referred. Returns
// destination processor(s).

View File

@ -1861,7 +1861,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
procNeighbours[defaultPatchIndex] = -1;
patchNames[defaultPatchIndex] = "cvMesh_defaultPatch";
Pout<< patchTypes << " " << patchNames << endl;
// Pout<< patchTypes << " " << patchNames << endl;
label nPatches = patchNames.size();
@ -1923,8 +1923,8 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
if (vA->referredInternal() || vB->referredInternal())
{
// One (and only one) of the points is from another
// processor
// One (and only one) of the points is an internal
// point from another processor
label procIndex = max(vA->procIndex(), vB->procIndex());

View File

@ -203,7 +203,7 @@ public:
// is this a referred vertex
inline bool referred() const
{
return type_ < 0 && type_ > ptFarPoint;
return (type_ < 0 && type_ > ptFarPoint);
}
@ -217,11 +217,11 @@ public:
// is this a referred external (pair slave) vertex
inline bool referredExternal() const
{
return referred() && index_ == -1;
return referred() && index_ < 0;
}
// For referred vertices, what is the processor index
// For referred vertices, what is the original processor index
inline int procIndex() const
{
if (referred())
@ -266,7 +266,7 @@ public:
//- Master of a pointPair is the lowest numbered one.
inline bool ppMaster() const
{
if (type_ > index_)
if (index_ >= 0 && type_ > index_)
{
return true;
}