From: Bruno Turcksin Date: Fri, 26 Apr 2013 13:56:50 +0000 (+0000) Subject: Merge from mainline. X-Git-Tag: v8.0.0~316^2~37 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa9875cca00c2bb2844f4c25f627f5e9c03d1db6;p=dealii.git Merge from mainline. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29388 0785d39b-7218-0410-832d-ea1e28bc413d --- aa9875cca00c2bb2844f4c25f627f5e9c03d1db6 diff --cc deal.II/include/deal.II/lac/full_matrix.h index e3f79df034,7a01b5127a..b1e680217d --- a/deal.II/include/deal.II/lac/full_matrix.h +++ b/deal.II/include/deal.II/lac/full_matrix.h @@@ -1855,12 -1849,24 +1857,24 @@@ FullMatrix::print (STREA { Assert (!this->empty(), ExcEmptyMatrix()); + // save the state of out stream + const unsigned int old_precision = s.precision (p); + const unsigned int old_width = s.width (w); + - for (unsigned int i=0; im(); ++i) + for (size_type i=0; im(); ++i) { - for (unsigned int j=0; jn(); ++j) + for (size_type j=0; jn(); ++j) - s << std::setw(w) << std::setprecision(p) << this->el(i,j); + { + s.width(w); + s.precision(p); + s << this->el(i,j); + } s << std::endl; } + + // reset output format + s.precision(old_precision); + s.width(old_width); } diff --cc deal.II/include/deal.II/lac/slepc_solver.h index d8c5ebad0d,595843a5d0..765ebfa816 --- a/deal.II/include/deal.II/lac/slepc_solver.h +++ b/deal.II/include/deal.II/lac/slepc_solver.h @@@ -159,23 -165,8 +169,8 @@@ namespace SLEPcWrapper const PETScWrappers::MatrixBase &B, std::vector &kr, std::vector &vr, - const unsigned int n_eigenvectors = 1); + const size_type n_eigenvectors = 1); - /** - * Initialize solver for the linear system $Ax=\lambda x$. (Note: - * this is required before calling solve ()) - */ - void - set_matrices (const PETScWrappers::MatrixBase &A); - - /** - * Same as above, but here initialize solver for the linear system - * $A x=\lambda B x$. - */ - void - set_matrices (const PETScWrappers::MatrixBase &A, - const PETScWrappers::MatrixBase &B); - /** * Set the initial vector for the solver. */ @@@ -663,10 -726,10 +730,10 @@@ // Panic if no eigenpairs are wanted. AssertThrow (n_eigenvectors != 0, ExcSLEPcWrappersUsageError()); - unsigned int n_converged = 0; + size_type n_converged = 0; // Set the matrices of the problem - set_matrices (A); + set_matrices (A); // and solve solve (n_eigenvectors, &n_converged); @@@ -686,11 -749,11 +753,19 @@@ template void ++<<<<<<< .working + SolverBase::solve (const PETScWrappers::MatrixBase &A, + const PETScWrappers::MatrixBase &B, + std::vector &kr, + std::vector &vr, + const size_type n_eigenvectors) ++======= + SolverBase::solve (const PETScWrappers::MatrixBase &A, + const PETScWrappers::MatrixBase &B, + std::vector &kr, + std::vector &vr, + const unsigned int n_eigenvectors) ++>>>>>>> .merge-right.r29387 { // Panic if no eigenpairs are wanted. AssertThrow (n_eigenvectors != 0, ExcSLEPcWrappersUsageError());