[cig-commits] r6088 - in long/3D/Gale/trunk/src/StGermain: . Discretisation/Mesh/src

walter at geodynamics.org walter at geodynamics.org
Fri Feb 23 10:02:33 PST 2007


Author: walter
Date: 2007-02-23 10:02:29 -0800 (Fri, 23 Feb 2007)
New Revision: 6088

Modified:
   long/3D/Gale/trunk/src/StGermain/
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CartesianGenerator.c
Log:
 r3339 at earth (orig r4010):  LukeHodkinson | 2007-02-15 17:48:17 -0800
 Doing some more optimisation for mesh generation.
 



Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
   - 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:4009
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899
   + 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:4010
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CartesianGenerator.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CartesianGenerator.c	2007-02-23 18:02:26 UTC (rev 6087)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CartesianGenerator.c	2007-02-23 18:02:29 UTC (rev 6088)
@@ -534,7 +534,7 @@
 		Grid_Lift( self->procGrid, r_i, rankInds );
 		for( d_i = 0; d_i < Grid_GetNumDims( self->procGrid ); d_i++ ) {
 			if( (myRankInds[d_i] > 0 && rankInds[d_i] < myRankInds[d_i] - 1) || 
-			    myRankInds[d_i] < self->procGrid->sizes[d_i] - 1 && rankInds[d_i] > myRankInds[d_i] + 1 )
+			    (myRankInds[d_i] < self->procGrid->sizes[d_i] - 1 && rankInds[d_i] > myRankInds[d_i] + 1) )
 			{
 				break;
 			}
@@ -775,6 +775,8 @@
 	unsigned	nEls;
 	unsigned*	els;
 	unsigned*	dimInds;
+	Decomp*		decomp;
+	Decomp_Sync*	sync;
 	unsigned	d_i, e_i;
 
 	assert( self );
@@ -803,10 +805,17 @@
 		els[e_i] = Grid_Project( self->elGrid, dimInds );
 	}
 
-	MeshTopology_SetElements( topo, self->elGrid->nDims, nEls, els );
+	decomp = Decomp_New();
+	Decomp_SetLocals( decomp, nEls, els );
+	FreeArray( els );
 
+	sync = Decomp_Sync_New();
+	Decomp_Sync_SetDecomp( sync, decomp );
+	Decomp_Sync_SetCommTopology( sync, self->commTopo );
+
+	MeshTopology_SetSync( topo, grid->nDims, sync );
+
 	FreeArray( dimInds );
-	FreeArray( els );
 	FreeObject( grid );
 
 	MPI_Barrier( topo->domains[MT_VERTEX]->decomp->comm );



More information about the cig-commits mailing list