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;
};
//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
// 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
A.vmult(v,x);
v.sadd(-1.,1.,b);
};
-
+
double rho = v.l2_norm();
// check the residual here as
// 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)
precondition.vmult(v,p);
x.add(1.,v);
};
-
// end of outer iteration. restart if
// no convergence and the number of
// iterations is not exceeded