From: Denis Davydov Date: Wed, 19 Apr 2017 11:17:26 +0000 (+0200) Subject: fix tests X-Git-Tag: v9.0.0-rc1~1669^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf654e7938ee1579bbeeffe767833e91e944f7f4;p=dealii.git fix tests --- diff --git a/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_01.cc b/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_01.cc index a6cbc171f6..7fe279dfec 100644 --- a/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_01.cc +++ b/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_01.cc @@ -38,23 +38,12 @@ template bool -pred_d(const typename Triangulation::active_cell_iterator &cell) +pred_d(const typename DoFHandler::active_cell_iterator &cell) { return (cell->center()(0) < 0.49 && cell->center()(1) < 0.49); } -template -bool -pred_r(const typename Triangulation::active_cell_iterator &cell) -{ - return (cell->center()(0) < 0.49 && - cell->center()(0) > 0.25 && - cell->center()(1) < 0.49); -} - - - template void test (const unsigned int flag) { @@ -71,10 +60,12 @@ void test (const unsigned int flag) else triangulation.refine_global(1); + DoFHandler dh (triangulation); + // Extra refinement to generate hanging nodes - for (typename Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell) + for (typename DoFHandler::active_cell_iterator + cell = dh.begin_active(); + cell != dh.end(); ++cell) if ( (flag==1 && pred_d(cell)) || (flag==2 && !pred_d(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 dh (triangulation); - FE_Q fe(2); dh.distribute_dofs (fe); diff --git a/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_02.cc b/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_02.cc index 9c2431a50a..4e972273ce 100644 --- a/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_02.cc +++ b/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_02.cc @@ -43,7 +43,7 @@ template bool -pred_d(const typename parallel::distributed::Triangulation::active_cell_iterator &cell) +pred_d(const typename DoFHandler::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 dh (triangulation); + // Extra refinement to generate hanging nodes - for (typename parallel::distributed::Triangulation::active_cell_iterator - cell = triangulation.begin_active(); - cell != triangulation.end(); ++cell) + for (typename DoFHandler::active_cell_iterator + cell = dh.begin_active(); + cell != dh.end(); ++cell) if (cell->is_locally_owned() && ((flag==1 && pred_d(cell)) || (flag==2 && !pred_d(cell))) ) @@ -88,8 +90,6 @@ void test (const unsigned int flag) if (flag > 0) triangulation.refine_global(1); - DoFHandler dh (triangulation); - FE_Q fe(2); dh.distribute_dofs (fe); diff --git a/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_03.cc b/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_03.cc index 91d2131322..39c591410d 100644 --- a/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_03.cc +++ b/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_03.cc @@ -39,14 +39,14 @@ template bool -pred_left(const typename Triangulation::active_cell_iterator &cell) +pred_left(const typename DoFHandler::active_cell_iterator &cell) { return (cell->center()(0) < 0.49); } template bool -pred_right(const typename Triangulation::active_cell_iterator &cell) +pred_right(const typename DoFHandler::active_cell_iterator &cell) { return (cell->center()(0) > 0.51); } diff --git a/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_04.cc b/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_04.cc index 38bd6fa454..d2c7b0000b 100644 --- a/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_04.cc +++ b/tests/dofs/dof_tools_extract_dofs_with_support_contained_within_04.cc @@ -53,7 +53,7 @@ std::string output_name(const unsigned int subdomain) template bool -pred_d(const typename Triangulation::active_cell_iterator &cell) +pred_d(const typename DoFHandler::active_cell_iterator &cell) { return (cell->center()(0) < 0.49); }