[cig-commits] r5848 - in long/3D/Gale/trunk: . src/Gale/plugins/SurfaceProcess

walter at geodynamics.org walter at geodynamics.org
Fri Jan 19 15:12:03 PST 2007


Author: walter
Date: 2007-01-19 15:12:02 -0800 (Fri, 19 Jan 2007)
New Revision: 5848

Modified:
   long/3D/Gale/trunk/
   long/3D/Gale/trunk/src/Gale/plugins/SurfaceProcess/SurfaceProcess.c
Log:
 r1463 at earth:  boo | 2007-01-19 15:10:50 -0800
 Fix SurfaceProcess so that it builds in MSVC



Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
   - 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1461
   + 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1463

Modified: long/3D/Gale/trunk/src/Gale/plugins/SurfaceProcess/SurfaceProcess.c
===================================================================
--- long/3D/Gale/trunk/src/Gale/plugins/SurfaceProcess/SurfaceProcess.c	2007-01-19 22:56:15 UTC (rev 5847)
+++ long/3D/Gale/trunk/src/Gale/plugins/SurfaceProcess/SurfaceProcess.c	2007-01-19 23:12:02 UTC (rev 5848)
@@ -74,10 +74,12 @@
 #if 1
 	{
           if( surface->topo->nDims == 1 ) {
-            int n_i;
-            int nx=Mesh_GetLocalSize(surface,MT_VERTEX);
-            double newVal[nx];
+            int n_i, nx;
+            double *newVal;
 
+            nx=Mesh_GetLocalSize(surface,MT_VERTEX);
+            newVal=malloc(sizeof(double)*nx);
+
             for( n_i = 0; n_i < nx; n_i++ ) {
               if( n_i > 0 && n_i < nx - 1 ) {
                 double	dx = surface->verts[n_i][0]
@@ -92,6 +94,7 @@
                 heights[n_i] = heights[n_i] + newVal[n_i]*dt;
               }
             }
+            free(newVal);
           }
           else {
             abort();



More information about the cig-commits mailing list