]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use FiniteElementData<dim>::face_to_equivalent_cell_index to avoid an
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 28 Mar 2006 23:18:21 +0000 (23:18 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 28 Mar 2006 23:18:21 +0000 (23:18 +0000)
unjustified exception.

git-svn-id: https://svn.dealii.org/trunk@12736 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/vectors.templates.h

index 961563d4ded4d1bdfcec34cc2a59c4236c8e349c..c1e57726a5b9bdf527e834de376d8901e678d417 100644 (file)
@@ -946,13 +946,30 @@ interpolate_boundary_values (const Mapping<dim>            &mapping,
                                             // initialized by the default
                                             // constructor), since we don't
                                             // need them anyway.
+                                            //
+                                            // As a detour, we must
+                                            // make sure we only
+                                            // query
+                                            // face_system_to_component_index
+                                            // if the index
+                                            // corresponds to a
+                                            // primitive shape
+                                            // function. since we
+                                            // know that all the
+                                            // components we are
+                                            // interested in are
+                                            // primitive (by the
+                                            // above check), we can
+                                            // safely put such a
+                                            // check in front
            if (unit_support_points.size() == 0)
              {
                unit_support_points.resize (fe.dofs_per_face);
                 for (unsigned int i=0; i<fe.dofs_per_face; ++i)
-                  if (component_mask[fe.face_system_to_component_index(i).first]
-                      == true)
-                   unit_support_points[i] = fe.unit_face_support_point(i);
+                 if (fe.is_primitive (fe.face_to_equivalent_cell_index(i)))
+                   if (component_mask[fe.face_system_to_component_index(i).first]
+                       == true)
+                     unit_support_points[i] = fe.unit_face_support_point(i);
               }
 
             Quadrature<dim-1> aux_quad (unit_support_points);

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.