From: bangerth Date: Sun, 17 Nov 2013 19:35:59 +0000 (+0000) Subject: Fix one testcase, see https://code.google.com/p/dealii/issues/detail?id=134 . Since... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9015dc655ba3c933a15ed647f50936ea077ef199;p=dealii-svn.git Fix one testcase, see https://code.google.com/p/dealii/issues/detail?id=134 . Since we are having so much trouble with this function, I also left my debug code in there, guarded with \#ifdef DEBUG_NO_NORMAL_FLUX. Adjust testcase. git-svn-id: https://svn.dealii.org/trunk@31690 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/deal.II/no_flux_12.cc b/tests/deal.II/no_flux_12.cc index 716232ac0e..bcb98de20c 100644 --- a/tests/deal.II/no_flux_12.cc +++ b/tests/deal.II/no_flux_12.cc @@ -23,13 +23,35 @@ /* 5: An error occurred in line <4586> of file in function 5: void dealii::VectorTools::compute_no_normal_flux_constraints(const DH&, unsigned int, const std::set&, dealii::ConstraintMatrix&, const dealii::Mapping&) [with int dim = 3; DH = dealii::DoFHandler; int spacedim = 3] -5: The violated condition was: +5: The violated condition was: 5: contribution->second.size() == dim-1 5: The name and call sequence of the exception was: 5: ExcNotImplemented() - + */ +// The problem comes down to this: The domain (a box with a cylinder +// through it) is discretized with eight cells that go around the +// perimeter of the cylinder and are extruded to full height in +// z-direction. In particular, for the top and bottom surfaces, there +// is a cell edge from the circle to the corners of the top and bottom +// outer squares (as well as an edge from the circle to the midpoints +// of the sides of the squares). +// +// now, we try to compute the boundary conditions for no normal flux +// with a set of boundary indicators that includes the top part of the +// domain plus one of the four outer sides of the box. consider what +// happens at one of the vertices of the box that are part of both the +// top and the selected side: there, one of the eight cells of the +// mesh contributes two normal vectors (one from its top face and from +// its "side" face) but since at each of the eight vertices of the box +// two cells come together, there is also a cell that contributes only +// one normal vector (because it has one face at the top surface, but +// its other outer face does not have a selected boundary +// indicator). we used to be unable to deal with this situation where +// one cell contributed twice and another only once. this has been +// fixed now by simply ignoring the one that contributes only once. + #include "../tests.h" #include @@ -52,13 +74,13 @@ void run() // indicator 6 = cylinder GridGenerator::hyper_cube_with_cylindrical_hole (tria, 0.25, 0.5, 0.5, 1, true); - + /* std::string filename = "Mesh.eps"; std::ofstream output (filename.c_str()); GridOut grid_out; grid_out.write_eps (tria, output); */ - + FESystem fe(FE_Q(1), dim); DoFHandler dof_handler (tria); dof_handler.distribute_dofs (fe); @@ -67,7 +89,7 @@ void run() std::set no_normal_flux_boundaries; no_normal_flux_boundaries.insert (0); // x=0 no_normal_flux_boundaries.insert (5); // z=1 - + VectorTools::compute_no_normal_flux_constraints (dof_handler, 0, no_normal_flux_boundaries, diff --git a/tests/deal.II/no_flux_12.debug.output b/tests/deal.II/no_flux_12.debug.output index 543e413fad..e4891671b1 100644 --- a/tests/deal.II/no_flux_12.debug.output +++ b/tests/deal.II/no_flux_12.debug.output @@ -1,31 +1,24 @@ - 202 = 0 - 566 = 0 - 570 = 0 - 576 = 0 - 1098 = 0 - 1100 = 0 - 1104 = 0 - 1616 = 0 - 1620 = 0 - 1708 = 0 - 1918 = 0 - 1920 = 0 - 1922 = 0 - 1930 = 0 - 1962 = 0 - 2138 = 0 - 2140 = 0 - 2156 = 0 - 2160 = 0 - 2196 = 0 - 2198 = 0 - 2246 = 0 - 2416 = 0 - 2892 = 0 - 2894 = 0 - 2902 = 0 - 2906 = 0 - 2912 = 0 - 2918 = 0 + 2 = 0 + 5 = 0 + 14 = 0 + 17 = 0 + 26 = 0 + 32 = 0 + 36 = 0 + 38 = 0 + 39 = 0 + 44 = 0 + 48 = 0 + 50 = 0 + 51 = 0 + 56 = 0 + 60 = 0 + 62 = 0 + 63 = 0 + 68 = 0 + 74 = 0 + 80 = 0 + 86 = 0 + 92 = 0 DEAL::OK