From fc1952bd4a3893b172832ccfc8675e0ed9181ac1 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 22 Nov 2014 07:43:51 +0100 Subject: [PATCH] corrected Arpack section in Step-36 --- examples/step-36/doc/results.dox | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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