From: Denis Davydov Date: Sat, 22 Nov 2014 06:43:51 +0000 (+0100) Subject: corrected Arpack section in Step-36 X-Git-Tag: v8.2.0-rc1~48^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc1952bd4a3893b172832ccfc8675e0ed9181ac1;p=dealii.git corrected Arpack section in Step-36 --- diff --git a/examples/step-36/doc/results.dox b/examples/step-36/doc/results.dox index 93eb53b18b..729152affc 100644 --- a/examples/step-36/doc/results.dox +++ b/examples/step-36/doc/results.dox @@ -231,7 +231,7 @@ main class: SparsityPattern sparsity_pattern; SparseMatrix stiffness_matrix, mass_matrix; std::vector > eigenfunctions; - std::vector> eigenvalues; + std::vector> eigenvalues; @endcode and initialize them as usual in make_grid_and_dofs(): @code @@ -253,24 +253,21 @@ For solving the eigenvalue problem with ARPACK, we finally need to modify template unsigned int EigenvalueProblem::solve () { - const unsigned int num_eigs = - parameters.get_integer ("Number of eigenvalues/eigenfunctions"); - SolverControl solver_control (dof_handler.n_dofs(), 1e-9); SparseDirectUMFPACK inverse; inverse.initialize (stiffness_matrix); - const unsigned int num_arnoldi_vectors = 2*num_eigs + 2 + const unsigned int num_arnoldi_vectors = 2*eigenvalues.size() + 2; ArpackSolver::AdditionalData additional_data(num_arnoldi_vectors); ArpackSolver eigensolver (solver_control, additional_data); eigensolver.solve (stiffness_matrix, mass_matrix, - preconditioner, + inverse, eigenvalues, eigenfunctions, - num_eigs); + eigenvalues.size()); for (unsigned int i=0; i