]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove deprecated functions from examples
authorDaniel Arndt <d.arndt@math.uni-goettingen.de>
Thu, 22 Sep 2016 20:25:00 +0000 (22:25 +0200)
committerDaniel Arndt <d.arndt@math.uni-goettingen.de>
Thu, 22 Sep 2016 20:25:00 +0000 (22:25 +0200)
examples/step-16/step-16.cc
examples/step-50/step-50.cc
examples/step-56/step-56.cc

index c4d110dc25fe01a2df961c5c3b2cdb15492e6271..be65a4500a8c22ed66c5eedf360fb05453975f62 100644 (file)
@@ -1,6 +1,6 @@
 /* ---------------------------------------------------------------------
  *
- * Copyright (C) 2003 - 2015 by the deal.II authors
+ * Copyright (C) 2003 - 2016 by the deal.II authors
  *
  * This file is part of the deal.II library.
  *
@@ -195,11 +195,6 @@ namespace Step16
     SparsityPattern      sparsity_pattern;
     SparseMatrix<double> system_matrix;
 
-    // We need an additional object for the hanging nodes constraints. They
-    // are handed to the transfer object in the multigrid. Since we call a
-    // compress inside the multigrid these constraints are not allowed to be
-    // inhomogeneous so we store them in different ConstraintMatrix objects.
-    ConstraintMatrix     hanging_node_constraints;
     ConstraintMatrix     constraints;
 
     Vector<double>       solution;
@@ -284,8 +279,6 @@ namespace Step16
     system_rhs.reinit (dof_handler.n_dofs());
 
     constraints.clear ();
-    hanging_node_constraints.clear ();
-    DoFTools::make_hanging_node_constraints (dof_handler, hanging_node_constraints);
     DoFTools::make_hanging_node_constraints (dof_handler, constraints);
 
     std::set<types::boundary_id>         dirichlet_boundary_ids;
@@ -297,7 +290,6 @@ namespace Step16
                                               dirichlet_boundary_functions,
                                               constraints);
     constraints.close ();
-    hanging_node_constraints.close ();
     constraints.condense (dsp);
     sparsity_pattern.copy_from (dsp);
     system_matrix.reinit (sparsity_pattern);
@@ -487,7 +479,7 @@ namespace Step16
   template <int dim>
   void LaplaceProblem<dim>::solve ()
   {
-    MGTransferPrebuilt<Vector<double> > mg_transfer(hanging_node_constraints, mg_constrained_dofs);
+    MGTransferPrebuilt<Vector<double> > mg_transfer(mg_constrained_dofs);
     mg_transfer.build_matrices(dof_handler);
 
     FullMatrix<double> coarse_matrix;
index 358a4427f6fbb9e619dd805ee144a9b5382979d9..11a0f07ad372d8d163cbbd2d08fe86ab339711f1 100644 (file)
@@ -1,6 +1,6 @@
 /* ---------------------------------------------------------------------
  *
- * Copyright (C) 2003 - 2015 by the deal.II authors
+ * Copyright (C) 2003 - 2016 by the deal.II authors
  *
  * This file is part of the deal.II library.
  *
@@ -131,7 +131,6 @@ namespace Step50
 
     IndexSet locally_relevant_set;
 
-    ConstraintMatrix     hanging_node_constraints;
     ConstraintMatrix     constraints;
 
     vector_t       solution;
@@ -283,8 +282,6 @@ namespace Step50
     // right away, without the need for a later
     // clean-up stage:
     constraints.reinit (locally_relevant_set);
-    hanging_node_constraints.reinit (locally_relevant_set);
-    DoFTools::make_hanging_node_constraints (mg_dof_handler, hanging_node_constraints);
     DoFTools::make_hanging_node_constraints (mg_dof_handler, constraints);
 
     std::set<types::boundary_id>         dirichlet_boundary_ids;
@@ -296,7 +293,6 @@ namespace Step50
                                               dirichlet_boundary,
                                               constraints);
     constraints.close ();
-    hanging_node_constraints.close ();
 
     DynamicSparsityPattern dsp(mg_dof_handler.n_dofs(), mg_dof_handler.n_dofs());
     DoFTools::make_sparsity_pattern (mg_dof_handler, dsp, constraints);
@@ -697,9 +693,8 @@ namespace Step50
   void LaplaceProblem<dim>::solve ()
   {
     // Create the object that deals with the transfer between
-    // different refinement levels. We need to pass it the hanging
-    // node constraints.
-    MGTransferPrebuilt<vector_t> mg_transfer(hanging_node_constraints, mg_constrained_dofs);
+    // different refinement levels.
+    MGTransferPrebuilt<vector_t> mg_transfer(mg_constrained_dofs);
     // Now the prolongation matrix has to be built.  This matrix needs
     // to take the boundary values on each level into account and
     // needs to know about the indices at the refinement edges. The
index 6c35189d7764515e66c01bc7d36e9e0d2a483e6d..8dc96a876bd43b0f1043958d13f27348f4a0abc8 100644 (file)
@@ -881,7 +881,7 @@ namespace Step56
         computing_timer.enter_subsection ("Solve - Set-up Preconditioner");
 
         // Transfer operators between levels
-        MGTransferPrebuilt<Vector<double> > mg_transfer(constraints, mg_constrained_dofs);
+        MGTransferPrebuilt<Vector<double> > mg_transfer(mg_constrained_dofs);
         mg_transfer.build_matrices(velocity_dof_handler);
 
         // Setup coarse grid solver

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.