]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix miscomputation.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Sep 2001 12:44:08 +0000 (12:44 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Sep 2001 12:44:08 +0000 (12:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@5037 0785d39b-7218-0410-832d-ea1e28bc413d

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

index d33a1d906b0d67a1d8337743feb5e2afecd4585f..3ae9bf3337466fe893da144e13c406b2e7da2f33 100644 (file)
@@ -122,12 +122,12 @@ MappingC1<2>::add_line_support_points (const Triangulation<2>::cell_iterator &ce
                                           // into the global
                                           // coordinate system. they
                                           // are @p{A (1,c)} and @p{A
-                                          // (1,b)} with @p{A} the
+                                          // (1,-b-2c)} with @p{A} the
                                           // rotation matrix, since
                                           // the tangentials in the
                                           // coordinate system
                                           // relative to the line are
-                                          // @p{(1,c)} and @p{(1,b)}
+                                          // @p{(1,c)} and @p{(1,-b-2c)}
                                           // at the two vertices,
                                           // respectively. We then
                                           // have to make sure by
@@ -142,14 +142,16 @@ MappingC1<2>::add_line_support_points (const Triangulation<2>::cell_iterator &ce
          coordinate_axis /= h;
 
          const double alpha = std::atan2(coordinate_axis[1], coordinate_axis[0]);
-         const double b = ((face_vertex_normals[0][1] * std::sin(alpha)
-                            +face_vertex_normals[0][0] * std::cos(alpha)) /
-                           (face_vertex_normals[0][1] * std::cos(alpha)
-                            -face_vertex_normals[0][0] * std::sin(alpha))),
-                      c = ((face_vertex_normals[1][1] * std::sin(alpha)
-                            +face_vertex_normals[1][0] * std::cos(alpha)) /
-                           (face_vertex_normals[1][1] * std::cos(alpha)
-                            -face_vertex_normals[1][0] * std::sin(alpha)));
+         const double c = -((face_vertex_normals[0][1] * std::sin(alpha)
+                             +face_vertex_normals[0][0] * std::cos(alpha)) /
+                            (face_vertex_normals[0][1] * std::cos(alpha)
+                             -face_vertex_normals[0][0] * std::sin(alpha)));
+         const double b = ((face_vertex_normals[1][1] * std::sin(alpha)
+                             +face_vertex_normals[1][0] * std::cos(alpha)) /
+                            (face_vertex_normals[1][1] * std::cos(alpha)
+                             -face_vertex_normals[1][0] * std::sin(alpha)))
+                          -2*c;
+                      
 
                                           // next evaluate the so
                                           // determined cubic

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.