]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix tests 4287/head
authorDenis Davydov <davydden@gmail.com>
Wed, 19 Apr 2017 11:17:26 +0000 (13:17 +0200)
committerDenis Davydov <davydden@gmail.com>
Wed, 19 Apr 2017 11:17:26 +0000 (13:17 +0200)
tests/dofs/dof_tools_extract_dofs_with_support_contained_within_01.cc
tests/dofs/dof_tools_extract_dofs_with_support_contained_within_02.cc
tests/dofs/dof_tools_extract_dofs_with_support_contained_within_03.cc
tests/dofs/dof_tools_extract_dofs_with_support_contained_within_04.cc

index a6cbc171f6ad4c8baaefdb8bf5bb0d82612da242..7fe279dfec90f4ebaad1d558f65040371bb7a932 100644 (file)
 
 template<int dim>
 bool
-pred_d(const typename Triangulation<dim>::active_cell_iterator &cell)
+pred_d(const typename DoFHandler<dim>::active_cell_iterator &cell)
 {
   return (cell->center()(0) < 0.49 &&
           cell->center()(1) < 0.49);
 }
 
-template<int dim>
-bool
-pred_r(const typename Triangulation<dim>::active_cell_iterator &cell)
-{
-  return (cell->center()(0) < 0.49 &&
-          cell->center()(0) > 0.25 &&
-          cell->center()(1) < 0.49);
-}
-
-
-
 template <int dim>
 void test (const unsigned int flag)
 {
@@ -71,10 +60,12 @@ void test (const unsigned int flag)
   else
     triangulation.refine_global(1);
 
+  DoFHandler<dim> dh (triangulation);
+
   // Extra refinement to generate hanging nodes
-  for (typename Triangulation<dim>::active_cell_iterator
-       cell = triangulation.begin_active();
-       cell != triangulation.end(); ++cell)
+  for (typename DoFHandler<dim>::active_cell_iterator
+       cell = dh.begin_active();
+       cell != dh.end(); ++cell)
     if ( (flag==1 && pred_d<dim>(cell)) ||
          (flag==2 && !pred_d<dim>(cell))  )
       cell->set_refine_flag ();
@@ -82,8 +73,6 @@ void test (const unsigned int flag)
   triangulation.prepare_coarsening_and_refinement();
   triangulation.execute_coarsening_and_refinement ();
 
-  DoFHandler<dim> dh (triangulation);
-
   FE_Q<dim> fe(2);
   dh.distribute_dofs (fe);
 
index 9c2431a50ad8ed84bb673ffbf77f214fe6bbcf31..4e972273ce3f17b470fb5a0f6ee946949febb610 100644 (file)
@@ -43,7 +43,7 @@
 
 template<int dim>
 bool
-pred_d(const typename parallel::distributed::Triangulation<dim>::active_cell_iterator &cell)
+pred_d(const typename DoFHandler<dim>::active_cell_iterator &cell)
 {
   return (cell->center()(0) < 0.5 &&
           cell->center()(1) < 0.5);
@@ -73,10 +73,12 @@ void test (const unsigned int flag)
   else
     triangulation.refine_global(1);
 
+  DoFHandler<dim> dh (triangulation);
+
   // Extra refinement to generate hanging nodes
-  for (typename parallel::distributed::Triangulation<dim>::active_cell_iterator
-       cell = triangulation.begin_active();
-       cell != triangulation.end(); ++cell)
+  for (typename DoFHandler<dim>::active_cell_iterator
+       cell = dh.begin_active();
+       cell != dh.end(); ++cell)
     if (cell->is_locally_owned() &&
         ((flag==1 &&  pred_d<dim>(cell)) ||
          (flag==2 && !pred_d<dim>(cell)))   )
@@ -88,8 +90,6 @@ void test (const unsigned int flag)
   if (flag > 0)
     triangulation.refine_global(1);
 
-  DoFHandler<dim> dh (triangulation);
-
   FE_Q<dim> fe(2);
   dh.distribute_dofs (fe);
 
index 91d2131322b61ffb1f3e3a0fa4699231f6eccbff..39c591410d8b913354da08762484487ae0aed15d 100644 (file)
 
 template<int dim>
 bool
-pred_left(const typename Triangulation<dim>::active_cell_iterator &cell)
+pred_left(const typename DoFHandler<dim>::active_cell_iterator &cell)
 {
   return (cell->center()(0) < 0.49);
 }
 
 template<int dim>
 bool
-pred_right(const typename Triangulation<dim>::active_cell_iterator &cell)
+pred_right(const typename DoFHandler<dim>::active_cell_iterator &cell)
 {
   return (cell->center()(0) > 0.51);
 }
index 38bd6fa4545cf2cdafd04035b17d213980796bd8..d2c7b0000ba1c6e21f3124a2978b99e600dfb223 100644 (file)
@@ -53,7 +53,7 @@ std::string output_name(const unsigned int subdomain)
 
 template<int dim>
 bool
-pred_d(const typename Triangulation<dim>::active_cell_iterator &cell)
+pred_d(const typename DoFHandler<dim>::active_cell_iterator &cell)
 {
   return (cell->center()(0) < 0.49);
 }

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.