:78 Function create_function() is deprecated [8192]

Revert "Now initializing error variable to zero"

Ramses van Zon [2017-09-22 15:40:27]
Revert "Now initializing error variable to zero"

This reverts commit c96244bb5354c54cdc256f1c938ffb01d9df91c2.
Filename
Makefile
diffuse.cc
diff --git a/Makefile b/Makefile
index 114bbd8..b426fcd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,2 @@
 diffuse: diffuse.cc
 	g++ -O3 -Wall -g diffuse.cc -o diffuse
-clean:
-	rm diffuse
\ No newline at end of file
diff --git a/diffuse.cc b/diffuse.cc
index 2777af1..d83a1a0 100644
--- a/diffuse.cc
+++ b/diffuse.cc
@@ -46,7 +46,7 @@ int main( int argc, char *argv[] )
     float ***rho;
     float time;
     float dt, dx;
-    float error = 0.0;
+    float error;
     float rhoint;
     int theory, before, active;

@@ -160,10 +160,10 @@ int main( int argc, char *argv[] )
             error = 0;
             for( int i = 1; i <= numPoints; i++ ) {
                 for( int j = 1; j <= numPoints; j++ ) {
-                   error += pow( rho[theory][i][j]-rho[active][i][j] , 2 );
+                    error += pow( rho[theory][i][j]-rho[active][i][j] , 2 );
                 }
             }
-            error = sqrt(error);
+            //            error = sqrt(error);

             // Write out data for graphics
             theoryFile.write( (char*)(rho[theory][0]),
ViewGit