[cig-commits] commit:

Mercurial hg at geodynamics.org
Mon Nov 24 11:58:15 PST 2008


changeset:   15:1b87829e979d
user:        LukeHodkinson
date:        Thu Jan 03 04:44:12 2008 +0000
files:       Mesh/src/CartesianGenerator.c Mesh/src/Mesh_Algorithms.c
description:
Minor modifications to ownership tests.


diff -r a40eef4287c9 -r 1b87829e979d Mesh/src/CartesianGenerator.c
--- a/Mesh/src/CartesianGenerator.c	Wed Dec 05 06:37:17 2007 +0000
+++ b/Mesh/src/CartesianGenerator.c	Thu Jan 03 04:44:12 2008 +0000
@@ -128,7 +128,7 @@ void _CartesianGenerator_Init( Cartesian
 	Stream_SetPrintingRank( stream, 0 );
 
 	self->comm = NULL;
-	self->regular = False;
+	self->regular = True;
 	self->maxDecompDims = 0;
 	self->minDecomp = NULL;
 	self->maxDecomp = NULL;
diff -r a40eef4287c9 -r 1b87829e979d Mesh/src/Mesh_Algorithms.c
--- a/Mesh/src/Mesh_Algorithms.c	Wed Dec 05 06:37:17 2007 +0000
+++ b/Mesh/src/Mesh_Algorithms.c	Thu Jan 03 04:44:12 2008 +0000
@@ -671,7 +671,7 @@ Bool Mesh_Algorithms_SearchWithTree( voi
    int ii;
 
    *dim = Mesh_GetDimSize( self->mesh );
-   curRank = self->rank;
+   MPI_Comm_size( MPI_COMM_WORLD, &curRank );
    nLocals = Mesh_GetLocalSize( self->mesh, *dim );
    if( !SpatialTree_Search( self->tree, pnt, &nEls, &els ) )
       return False;
@@ -681,12 +681,14 @@ Bool Mesh_Algorithms_SearchWithTree( voi
       if( Mesh_ElementHasPoint( self->mesh, els[ii], pnt, &curDim, &curEl ) ) {
 	 if( curEl >= nLocals ) {
 	    owner = Mesh_GetOwner( self->mesh, curDim, curEl - nLocals );
-	    if( owner < curRank ) {
+	    owner = Comm_RankLocalToGlobal( self->mesh->topo->comm, owner );
+	    if( owner <= curRank ) {
 	       curRank = owner;
 	       *el = curEl;
 	    }
 	 }
-	 else if( curRank == self->rank && curEl < *el ) {
+	 else if( self->rank <= curRank && curEl < *el ) {
+	    curRank = self->rank;
 	    *el = curEl;
 	 }
       }



More information about the CIG-COMMITS mailing list