]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
matrices made data members
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 31 May 2001 11:38:30 +0000 (11:38 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 31 May 2001 11:38:30 +0000 (11:38 +0000)
git-svn-id: https://svn.dealii.org/trunk@4738 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/solver_gmres.h

index d8f31db828240c105f351f4bf1ed40343d423177..73dcd35b2f0a17673f7076c73f7195eb2a25453f 100644 (file)
@@ -143,6 +143,14 @@ class SolverGMRES : public Subscriptor, private Solver<VECTOR>
     void givens_rotation (Vector<double> &h,  Vector<double> &b,
                          Vector<double> &ci, Vector<double> &si,
                          int col) const;
+                                  /**
+                                   * Projected system matrix
+                                   */
+  FullMatrix<double> H;
+                                  /**
+                                   * Auxiliary matrix for inverting @p{H}
+                                   */
+  FullMatrix<double> H1;
 };
 
 
@@ -207,7 +215,7 @@ SolverGMRES<VECTOR>::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<VECTOR>::solve (const MATRIX& A,
   
                                   // matrix used for the orthogonalization
                                   // process later
-  FullMatrix<double> 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<double> H1(dim+1,dim);
+      H1.reinit(dim+1,dim);
 
       for (unsigned int i=0; i<dim+1; ++i)
        for (unsigned int j=0; j<dim; ++j)
@@ -384,7 +392,6 @@ unsigned int dim = 0;
          precondition.vmult(v,p);
          x.add(1.,v);
        };
-
                                       // end of outer iteration. restart if
                                       // no convergence and the number of
                                       // iterations is not exceeded

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.