]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove tmp file again.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 9 Sep 2002 23:20:36 +0000 (23:20 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 9 Sep 2002 23:20:36 +0000 (23:20 +0000)
git-svn-id: https://svn.dealii.org/trunk@6380 0785d39b-7218-0410-832d-ea1e28bc413d

tests/lac/sparse_matrices.cc

index 94c7f47f831f7d2edb6763af8656a6cc0d43be20..e2469c2cd4a4a5b2b6175d6b891efbe6af4954d4 100644 (file)
@@ -25,6 +25,8 @@
 #include <lac/sparse_matrix_ez.templates.h>
 
 #include <fstream>
+#include <cstdio>
+
 
 #define PREC_CHECK(solver, method, precond) try \
  { solver.method (A, u, f, precond);  } catch (...) {} \
@@ -157,7 +159,8 @@ int main()
              << std::endl;
 
                                    // dump A into a file, and re-read
-                                   // it, then check equality
+                                   // it, then delete tmp file and
+                                   // check equality
   std::ofstream tmp_write ("sparse_matrices.tmp");
   A.block_write (tmp_write);
   tmp_write.close ();
@@ -168,6 +171,8 @@ int main()
   A_tmp.block_read (tmp_read);
   tmp_read.close ();
 
+  remove ("sparse_matrices.tmp");
+
   for (unsigned int i=0; i<A.n_nonzero_elements(); ++i)
     Assert (std::fabs(A.global_entry(i) - A_tmp.global_entry(i)) <=
             std::fabs(1e-14*A.global_entry(i)),

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.