]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Create logfile before PetscInitialize.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 28 Nov 2005 12:42:50 +0000 (12:42 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 28 Nov 2005 12:42:50 +0000 (12:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@11793 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/petsc_solver_10.cc
tests/bits/petsc_solver_11.cc

index 27c49e521f748dac771ea46aa72313a67c3390a7..f892851a2b8e3c4967ed92b2faa5408ee3729097 100644 (file)
@@ -54,14 +54,14 @@ check_solve( SOLVER& solver, const MATRIX& A,
 
 int main(int argc, char **argv)
 {
-  PetscInitialize(&argc,&argv,0,0);
-  {
-    std::ofstream logfile("petsc_solver_10/output");
-    logfile.precision(4);
-    deallog.attach(logfile);
-    deallog.depth_console(0);
+  std::ofstream logfile("petsc_solver_10/output");
+  logfile.precision(4);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
   
+  PetscInitialize(&argc,&argv,0,0);
+  {
     SolverControl control(100, 1.e-3);
 
     const unsigned int size = 32;
index 92e03a57993ea6a2ac3cbcb977d736c3f1fd4a6b..173400e75dfc4c726fe0ec7ce0126a2ec3c7796e 100644 (file)
@@ -55,14 +55,14 @@ check_solve( SOLVER& solver, const MATRIX& A,
 
 int main(int argc, char **argv)
 {
-  PetscInitialize(&argc,&argv,0,0);
-  {
-    std::ofstream logfile("petsc_solver_11/output");
-    logfile.precision(4);
-    deallog.attach(logfile);
-    deallog.depth_console(0);
+  std::ofstream logfile("petsc_solver_11/output");
+  logfile.precision(4);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
   
+  PetscInitialize(&argc,&argv,0,0);
+  {
     SolverControl control(100, 1.e-3);
 
     const unsigned int size = 32;

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.