]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix a really hard to find error in a code path that is only taken in 3d by Nedelec...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 26 Feb 2003 19:18:14 +0000 (19:18 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 26 Feb 2003 19:18:14 +0000 (19:18 +0000)
git-svn-id: https://svn.dealii.org/trunk@7250 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe.cc

index 861e0a8ef61762914bcc138e831fe014a10f4d5b..e1c8164b62c44439274632a197d805675d15dfe2 100644 (file)
@@ -523,9 +523,28 @@ compute_2nd (const Mapping<dim>                   &mapping,
                                                    // nonzero
                                                    // compoment
                   unsigned int component=0;
-                  for (unsigned int k=0; k<=n; ++k)
-                    while (nonzero_components[shape_index][component] == false)
-                      ++component;
+                  for (unsigned int nonzero_comp=0; component<this->n_components();
+                       ++component)
+                    if (nonzero_components[shape_index][component] == true)
+                      {
+                        ++nonzero_comp;
+                                                         // check
+                                                         // whether we
+                                                         // have found
+                                                         // the
+                                                         // component
+                                                         // we are
+                                                         // looking
+                                                         // for. note
+                                                         // that
+                                                         // nonzero_comp
+                                                         // is 1-based
+                                                         // by the way
+                                                         // we compute
+                                                         // it
+                        if (nonzero_comp == n+1)
+                          break;
+                      }
                   Assert (component < this->n_components(),
                           ExcInternalError());
 

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.