From: guido Date: Thu, 31 May 2001 11:38:30 +0000 (+0000) Subject: matrices made data members X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ff4980cc8ad5c823085b3898e3375275989c2ae;p=dealii-svn.git matrices made data members git-svn-id: https://svn.dealii.org/trunk@4738 0785d39b-7218-0410-832d-ea1e28bc413d --- 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