From: Arpit Babbar Date: Fri, 9 Oct 2020 05:18:02 +0000 (+0530) Subject: Explained that template argument for SolverCG has been specified, even though it... X-Git-Tag: v9.3.0-rc1~1015^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7da4610fec5741dbadc5970e9878dde15e49b7f9;p=dealii.git Explained that template argument for SolverCG has been specified, even though it is the same as default argument(Step - 3), removed destructor and added const where the documentation indicated it(Step-7) --- diff --git a/examples/step-3/step-3.cc b/examples/step-3/step-3.cc index 2a70169659..684fce6e05 100644 --- a/examples/step-3/step-3.cc +++ b/examples/step-3/step-3.cc @@ -553,9 +553,10 @@ void Step3::solve() // which stops the iteration: SolverControl solver_control(1000, 1e-12); // Then we need the solver itself. The template parameter to the SolverCG - // class is the type of the vectors, but the empty angle brackets indicate - // that we simply take the default argument (which is - // Vector@): + // class is the type of the vectors, and leaving the empty angle brackets + // would indicate that we are taking the default argument (which is + // Vector@). However, we explicitly mention the template + // argument: SolverCG> solver(solver_control); // Now solve the system of equations. The CG solver takes a preconditioner diff --git a/examples/step-7/step-7.cc b/examples/step-7/step-7.cc index 0005d83e80..14e0b40630 100644 --- a/examples/step-7/step-7.cc +++ b/examples/step-7/step-7.cc @@ -336,8 +336,6 @@ namespace Step7 HelmholtzProblem(const FiniteElement &fe, const RefinementMode refinement_mode); - ~HelmholtzProblem(); - void run(); private: @@ -455,16 +453,6 @@ namespace Step7 {} - // @sect4{HelmholtzProblem::~HelmholtzProblem destructor} - - // This is no different than before: - template - HelmholtzProblem::~HelmholtzProblem() - { - dof_handler.clear(); - } - - // @sect4{HelmholtzProblem::setup_system} // The following function sets up the degrees of freedom, sizes of matrices @@ -587,8 +575,8 @@ namespace Step7 // Note that the operations we will do with the right hand side object are // only querying data, never changing the object. We can therefore declare // it const: - RightHandSide right_hand_side; - std::vector rhs_values(n_q_points); + const RightHandSide right_hand_side; + std::vector rhs_values(n_q_points); // Finally we define an object denoting the exact solution function. We // will use it to compute the Neumann values at the boundary from