]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Explained that template argument for SolverCG has been specified, even though it... 11025/head
authorArpit Babbar <arpitbabbar@gmail.com>
Fri, 9 Oct 2020 05:18:02 +0000 (10:48 +0530)
committerArpit-Babbar <arpitbabbar@gmail.com>
Sun, 11 Oct 2020 02:47:42 +0000 (08:17 +0530)
examples/step-3/step-3.cc
examples/step-7/step-7.cc

index 2a701696592790240a94bd77bb741c6041bc6aa7..684fce6e05eaea52079fc9062b21feeac6506524 100644 (file)
@@ -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
-  // <code>Vector@<double@></code>):
+  // class is the type of the vectors, and leaving the empty angle brackets
+  // would indicate that we are taking the default argument (which is
+  // <code>Vector@<double@></code>). However, we explicitly mention the template
+  // argument:
   SolverCG<Vector<double>> solver(solver_control);
 
   // Now solve the system of equations. The CG solver takes a preconditioner
index 0005d83e809a7fece2a082aaea27dd951192238f..14e0b40630982033e194cc69a329177b23d409a5 100644 (file)
@@ -336,8 +336,6 @@ namespace Step7
     HelmholtzProblem(const FiniteElement<dim> &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 <int dim>
-  HelmholtzProblem<dim>::~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 <code>const</code>:
-    RightHandSide<dim>  right_hand_side;
-    std::vector<double> rhs_values(n_q_points);
+    const RightHandSide<dim> right_hand_side;
+    std::vector<double>      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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.