From bb8f17e7616fa370c4559a49441e94b6b8e3c124 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Thu, 31 May 2001 11:38:30 +0000 Subject: [PATCH] matrices made data members git-svn-id: https://svn.dealii.org/trunk@4738 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/solver_gmres.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/deal.II/lac/include/lac/solver_gmres.h b/deal.II/lac/include/lac/solver_gmres.h index d8f31db828..73dcd35b2f 100644 --- a/deal.II/lac/include/lac/solver_gmres.h +++ b/deal.II/lac/include/lac/solver_gmres.h @@ -143,6 +143,14 @@ class SolverGMRES : public Subscriptor, private Solver void givens_rotation (Vector &h, Vector &b, Vector &ci, Vector &si, int col) const; + /** + * Projected system matrix + */ + FullMatrix H; + /** + * Auxiliary matrix for inverting @p{H} + */ + FullMatrix H1; }; @@ -207,7 +215,7 @@ SolverGMRES::solve (const MATRIX& A, //TODO:[?] Allocate vectors only when needed. deallog.push("GMRES"); - + const unsigned int n_tmp_vectors = additional_data.max_n_tmp_vectors; // allocate an array of n_tmp_vectors @@ -233,7 +241,7 @@ SolverGMRES::solve (const MATRIX& A, // matrix used for the orthogonalization // process later - FullMatrix H(n_tmp_vectors, n_tmp_vectors-1); + H.reinit(n_tmp_vectors, n_tmp_vectors-1); // some additional vectors, also used // in the orthogonalization @@ -279,7 +287,7 @@ unsigned int dim = 0; A.vmult(v,x); v.sadd(-1.,1.,b); }; - + double rho = v.l2_norm(); // check the residual here as @@ -365,7 +373,7 @@ unsigned int dim = 0; // calculate the solution from the // temporary vectors h.reinit(dim); - FullMatrix H1(dim+1,dim); + H1.reinit(dim+1,dim); for (unsigned int i=0; i