[cig-commits] commit: Initialize the residual everywhere including the boundary, where it is

Mercurial hg at geodynamics.org
Sun Mar 25 20:02:37 PDT 2012


changeset:   117:e5469bbb9139
user:        Walter Landry <wlandry at caltech.edu>
date:        Sun Mar 25 19:43:20 2012 -0700
files:       main.cxx
description:
Initialize the residual everywhere including the boundary, where it is
never set.


diff -r 352bb57743b3 -r e5469bbb9139 main.cxx
--- a/main.cxx	Sun Mar 25 19:42:09 2012 -0700
+++ b/main.cxx	Sun Mar 25 19:43:20 2012 -0700
@@ -62,15 +62,24 @@ int main()
 
   for(int i=0;i<Nx+1;++i)
     for(int j=0;j<Ny;++j)
-      zx[i][j]=0;
+      {
+        zx[i][j]=0;
+        Resid_x[i][j]=0;
+      }
 
   for(int i=0;i<Nx;++i)
     for(int j=0;j<Ny+1;++j)
-      zy[i][j]=0;
+      {
+        zy[i][j]=0;
+        Resid_y[i][j]=0;
+      }
 
   for(int i=0;i<Nx;++i)
     for(int j=0;j<Ny;++j)
-      p[i][j]=0;
+      {
+        p[i][j]=0;
+        Resid_p[i][j]=0;
+      }
 
   for(int sweep=0;sweep<n_sweeps;++sweep)
     {



More information about the CIG-COMMITS mailing list