From: heltai Date: Tue, 28 Jan 2014 15:59:15 +0000 (+0000) Subject: Fixed bug in dof_test X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8217832a79fb6037170440a8342df37487d82ec8;p=dealii-svn.git Fixed bug in dof_test git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@32335 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/deal.II/dof_test.cc b/tests/deal.II/dof_test.cc index bf41611661..6509956527 100644 --- a/tests/deal.II/dof_test.cc +++ b/tests/deal.II/dof_test.cc @@ -50,9 +50,10 @@ class Ball { public: virtual Point - get_new_point_on_line (const typename Triangulation::line_iterator &line) const + get_new_point (const std::vector > &p, + const std::vector &w) const { - Point middle = StraightBoundary::get_new_point_on_line(line); + Point middle = StraightBoundary::get_new_point(p,w); for (int i=0; i - get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const - { - Point middle = StraightBoundary::get_new_point_on_quad(quad); - - for (int i=0; i(dim)) / (std::sqrt(middle.square())*2); - for (int i=0; i - get_new_point_on_line (const typename Triangulation::line_iterator &line) const; - - virtual Point - get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const; + get_new_point (const std::vector > &p, + const std::vector &w) const; }; template Point -CurvedLine::get_new_point_on_line (const typename Triangulation::line_iterator &line) const +CurvedLine::get_new_point (const std::vector > &p, + const std::vector &w) const + { - Point middle = StraightBoundary::get_new_point_on_line (line); + Point middle = StraightBoundary::get_new_point (p,w); // if the line is at the top of bottom // face: do a special treatment on @@ -106,48 +92,40 @@ CurvedLine::get_new_point_on_line (const typename Triangulation::line_ // z-value of the midpoint is either // 0 or 1, then the z-values of all // vertices of the line is like that - if (dim>=3) - if (((middle(2) == 0) || (middle(2) == 1)) - // find out, if the line is in the - // interior of the top or bottom face - // of the domain, or at the edge. - // lines at the edge need to undergo - // the usual treatment, while for - // interior lines taking the midpoint - // is sufficient - // - // note: the trick with the boundary - // id was invented after the above was - // written, so we are not very strict - // here with using these flags - && (line->boundary_indicator() == 1)) + if (dim>=3 && p.size() == 2) { + if (((middle(2) == 0) || (middle(2) == 1))) + // find out, if the line is in the + // interior of the top or bottom face + // of the domain, or at the edge. + // lines at the edge need to undergo + // the usual treatment, while for + // interior lines taking the midpoint + // is sufficient + // + // note: the trick with the boundary + // id was invented after the above was + // written, so we are not very strict + // here with using these flags + // && (line->boundary_indicator() == 1)) return middle; - double x=middle(0), - y=middle(1); - - if (y -Point -CurvedLine::get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const -{ - Point middle = StraightBoundary::get_new_point_on_quad (quad); + return middle; + } // if the face is at the top of bottom // face: do not move the midpoint in