]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix tests by performing an explicit cast. 4288/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 19 Apr 2017 19:18:26 +0000 (13:18 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 19 Apr 2017 19:26:40 +0000 (13:26 -0600)
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 7fe279dfec90f4ebaad1d558f65040371bb7a932..d6109093e3cce2e1bbdc4f2c04ef1ed2f41c0b2b 100644 (file)
@@ -79,7 +79,9 @@ void test (const unsigned int flag)
   ConstraintMatrix cm;
   DoFTools::make_hanging_node_constraints(dh,cm);
 
-  IndexSet support = DoFTools::extract_dofs_with_support_contained_within(dh, pred_d<dim>, cm);
+  IndexSet support = DoFTools::extract_dofs_with_support_contained_within(dh,
+                     std::function<bool (const typename DoFHandler<dim>::active_cell_iterator &)>(&pred_d<dim>),
+                     cm);
   support.print(deallog);
 
   // print grid and DoFs for visual inspection
index 4e972273ce3f17b470fb5a0f6ee946949febb610..c5aab334a4796095d011caf766cbe5b759727e01 100644 (file)
@@ -102,7 +102,9 @@ void test (const unsigned int flag)
   DoFTools::make_hanging_node_constraints(dh,cm);
   cm.close ();
 
-  const IndexSet support = DoFTools::extract_dofs_with_support_contained_within(dh, pred_d<dim>, cm);
+  const IndexSet support = DoFTools::extract_dofs_with_support_contained_within(dh,
+                           std::function<bool (const typename DoFHandler<dim>::active_cell_iterator &)>(&pred_d<dim>),
+                           cm);
   const IndexSet support_local = support & dh.locally_owned_dofs();
 
   deallog << support.n_elements() << std::endl;
index 39c591410d8b913354da08762484487ae0aed15d..5a83f05a6be263a6d32b3a418c001306ea461e03 100644 (file)
@@ -96,8 +96,12 @@ void test (const bool left = true)
   DoFTools::make_hanging_node_constraints(dh,cm);
 
   IndexSet support = left ?
-                     DoFTools::extract_dofs_with_support_contained_within(dh, pred_left<dim>, cm) :
-                     DoFTools::extract_dofs_with_support_contained_within(dh, pred_right<dim>, cm);
+                     DoFTools::extract_dofs_with_support_contained_within(dh,
+                         std::function<bool (const typename DoFHandler<dim>::active_cell_iterator &)>(&pred_left<dim>),
+                         cm) :
+                     DoFTools::extract_dofs_with_support_contained_within(dh,
+                         std::function<bool (const typename DoFHandler<dim>::active_cell_iterator &)>(&pred_right<dim>),
+                         cm);
   support.print(deallog);
 
   // print grid and DoFs for visual inspection
index d2c7b0000ba1c6e21f3124a2978b99e600dfb223..6c106e4605612f5550b8d15bfd3ee8057f14a202 100644 (file)
@@ -111,7 +111,9 @@ void test ()
   std::vector<types::global_dof_index> local_dof_indices(fe.dofs_per_cell);
 
   // get support on the predicate
-  IndexSet support = DoFTools::extract_dofs_with_support_contained_within(dh, pred_d<dim>, cm);
+  IndexSet support = DoFTools::extract_dofs_with_support_contained_within(dh,
+                     std::function<bool (const typename DoFHandler<dim>::active_cell_iterator &)>(&pred_d<dim>),
+                     cm);
   IndexSet local_support = support & locally_owned_set;
 
   // rhs vectors:

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.