From: Wolfgang Bangerth Date: Mon, 5 Dec 2005 22:37:58 +0000 (+0000) Subject: Use a proper vector memory object for the Schur complement. X-Git-Tag: v8.0.0~12808 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d12bf726548ca944433f282905debb69ca9aa8ae;p=dealii.git Use a proper vector memory object for the Schur complement. git-svn-id: https://svn.dealii.org/trunk@11828 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-20/step-20.cc b/deal.II/examples/step-20/step-20.cc index be5230e3b4..b64c89aa1f 100644 --- a/deal.II/examples/step-20/step-20.cc +++ b/deal.II/examples/step-20/step-20.cc @@ -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 &A; + mutable GrowingVectorMemory<> vector_memory; + mutable Vector tmp1, tmp2; }; @@ -645,9 +647,9 @@ void LaplaceProblem::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); }