]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Implemented a small fix, which sets near zero elements in the constraint
authoroliver <oliver@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 23 Oct 2004 14:38:21 +0000 (14:38 +0000)
committeroliver <oliver@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 23 Oct 2004 14:38:21 +0000 (14:38 +0000)
matrix, which stem from numerical inaccuracies, to zero.

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

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

index 1ac505552c8e4e5c764cbe18f22c895e935149a8..6420c058bad227ebfac3ee03d8268487135405ce 100644 (file)
@@ -1398,6 +1398,20 @@ FE_Q<3>::initialize_constraints ()
            interface_constraints(j,i) = 
                poly_f->compute_value(face_index_map [i], 
                                      constraint_points[j]);
+
+                                          // if the value is small up
+                                          // to round-off, then
+                                          // simply set it to zero to
+                                          // avoid unwanted fill-in
+                                          // of the constraint
+                                          // matrices (which would
+                                          // then increase the number
+                                          // of other DoFs a
+                                          // constrained DoF would
+                                          // couple to)
+           if (std::fabs(interface_constraints(j,i)) < 1e-14)
+               interface_constraints(j,i) = 0;
+
            indx++;
        }
     delete poly_f;

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.