]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use a proper vector memory object for the Schur complement.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 5 Dec 2005 22:37:58 +0000 (22:37 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 5 Dec 2005 22:37:58 +0000 (22:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@11828 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-20/step-20.cc

index be5230e3b4ac5454e6e7d8dd04938eea746ae047..b64c89aa1f9b1eef0ace8eddd1f317f53cb9f153 100644 (file)
@@ -544,7 +544,7 @@ class SchurComplement
 
         SolverControl           solver_control (tmp1.size(),
                                                 1e-8*tmp1.l2_norm());
-        SolverCG<>              cg (solver_control);
+        SolverCG<>              cg (solver_control, vector_memory);
 
         PreconditionSSOR<> precondition;
         precondition.initialize(A.block(0,0));
@@ -562,6 +562,8 @@ class SchurComplement
   private:
     const BlockSparseMatrix<double> &A;
 
+    mutable GrowingVectorMemory<> vector_memory;
+    
     mutable Vector<double> tmp1, tmp2;
 };
 
@@ -645,9 +647,9 @@ void LaplaceProblem<dim>::output_results () const
                                   // neglect this here for the sake
                                   // of brevity).
   std::ofstream output (dim == 2 ?
-                       "solution-2d" :
-                       "solution-3d");
-  data_out.write_gnuplot (output);
+                       "solution-2d.gmv" :
+                       "solution-3d.gmv");
+  data_out.write_gmv (output);
 }
 
 

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.