]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix bug in project_boundary_values_curl_conforming related to the wrong indexing...
authoragrayver <agrayver@agrayver-VirtualBox.(none)>
Wed, 13 Aug 2014 12:40:48 +0000 (14:40 +0200)
committeragrayver <agrayver@agrayver-VirtualBox.(none)>
Wed, 13 Aug 2014 12:40:48 +0000 (14:40 +0200)
include/deal.II/numerics/vector_tools.templates.h

index a8f5fe91a372b2f68bf3ff33482ebed7bd6e553a..bf449c8c254edbe68b15bd082f880cb302f10375 100644 (file)
@@ -3218,7 +3218,7 @@ namespace VectorTools
                      && (fe.base_element (base_indices.first).face_to_cell_index (2 * fe.degree, face)
                          <= fe.system_to_base_index (fe.face_to_cell_index (i, face)).second)
                      && (fe.system_to_base_index (fe.face_to_cell_index (i, face)).second
-                         < fe.base_element (base_indices.first).face_to_cell_index (4 * fe.degree, face)))
+                         <= fe.base_element (base_indices.first).face_to_cell_index (4 * fe.degree - 1, face)))
                     || ((dynamic_cast<const FE_Nedelec<dim>*> (&fe) != 0) && (2 * fe.degree <= i)
                         && (i < 4 * fe.degree)))
                   tmp -= dof_values[i] * fe_values[vec].value (fe.face_to_cell_index (i, face), q_point);
@@ -3328,7 +3328,9 @@ namespace VectorTools
                 if (((dynamic_cast<const FESystem<dim>*> (&fe) != 0)
                      && (fe.system_to_base_index (fe.face_to_cell_index (i, face)).first == base_indices)
                      && (fe.system_to_base_index (fe.face_to_cell_index (i, face)).second
-                         < fe.base_element (base_indices.first).face_to_cell_index (2 * fe.degree, face)))
+                         <= fe.base_element (base_indices.first).face_to_cell_index (2 * fe.degree - 1, face))
+                     && (fe.system_to_base_index (fe.face_to_cell_index (i, face)).second
+                         >= fe.base_element (base_indices.first).face_to_cell_index (0, face)))
                     || ((dynamic_cast<const FE_Nedelec<dim>*> (&fe) != 0) && (i < 2 * fe.degree)))
                   tmp -= dof_values[i] * fe_values[vec].value (fe.face_to_cell_index (i, face), q_point);
 

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.