[cig-commits] r4081 - in long/3D/Gale/trunk/src/StGermain: . Discretisation/Geometry/tests

walter at geodynamics.org walter at geodynamics.org
Thu Jul 20 20:11:54 PDT 2006


Author: walter
Date: 2006-07-20 20:11:53 -0700 (Thu, 20 Jul 2006)
New Revision: 4081

Modified:
   long/3D/Gale/trunk/src/StGermain/
   long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/tests/testParallelDelaunay.c
Log:
 r2548 at earth:  boo | 2006-07-20 20:01:49 -0700
  r2524 at earth (orig r3693):  RaquibulHassan | 2006-07-19 19:28:54 -0700
  Adding a few comments to the test.
  
  
 



Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
   - 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2547
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3692
   + 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2548
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3693

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/tests/testParallelDelaunay.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/tests/testParallelDelaunay.c	2006-07-21 03:11:35 UTC (rev 4080)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/tests/testParallelDelaunay.c	2006-07-21 03:11:53 UTC (rev 4081)
@@ -140,6 +140,9 @@
 
 	dictionary = Dictionary_New();
 
+	/* Testing parallel triangulation on irregular poit sets first and then
+	 * on regular point sets */
+	
 	p = Irregular;
 	
 label:	numNeighboursTest = 1;
@@ -160,6 +163,7 @@
 
 		numSites = numSitesArray[i];
 		
+		sites = NULL;
 		if( rank == 0 ){
 			sites = malloc( sizeof( CoordF ) * numSites );
 			memset( sites, 0, sizeof( CoordF ) * numSites );
@@ -180,6 +184,9 @@
 
 			for( j=0; j<numSites; j++ ){
 				
+				/* Checking for parity between voronoiArea generated by the serial and parallel
+				 * triangulations */
+
 				if( fabs(d->voronoiArea[j] - pd->voronoiArea[j]) > TOLERANCE ){
 					printf( "voronoi area %f of node %d not within tolerance\n", pd->voronoiArea[j], j );
 					voronoiAreaTest = 0;
@@ -193,9 +200,17 @@
 				memcpy( dNeighbours, d->neighbours[j], sizeof( int ) * d->numNeighbours[j] );
 				memcpy( pdNeighbours, pd->neighbours[j], sizeof( int ) * pd->numNeighbours[j] );
 				
+				/* The order of the neighbour nodes of each node in a serial triangulation is
+				 * different to that of in a parallel triangulation. Hence we need to sort the
+				 * neighbour nodes to check for parity */
+				
 				qsort( dNeighbours, d->numNeighbours[j], sizeof( int ), compareFunction );
 				qsort( pdNeighbours, pd->numNeighbours[j], sizeof( int ), compareFunction );
+	
 				
+				/* Checking for parity between the length of the voronoi sides generated by 
+				 * the serial and parallel triangulations */
+
 				for( k=0; k<d->numNeighbours[j]; k++ ){
 					assert( dNeighbours[k] == pdNeighbours[k] );
 



More information about the cig-commits mailing list