From: Wolfgang Bangerth Date: Tue, 10 Apr 2001 17:36:16 +0000 (+0000) Subject: Implement the missing functions in HalfHyperShellBoundary. X-Git-Tag: v8.0.0~19361 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d65299ebb2e4b9d4f668e5d7339534618e016b5;p=dealii.git Implement the missing functions in HalfHyperShellBoundary. git-svn-id: https://svn.dealii.org/trunk@4423 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/grid/tria_boundary_lib.h b/deal.II/deal.II/include/grid/tria_boundary_lib.h index 5d1673ae97..f11996fef9 100644 --- a/deal.II/deal.II/include/grid/tria_boundary_lib.h +++ b/deal.II/deal.II/include/grid/tria_boundary_lib.h @@ -308,6 +308,32 @@ class HalfHyperShellBoundary : public HyperShellBoundary virtual Point get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const; + /** + * Refer to the general + * documentation of this class + * and the documentation of the + * base class. + * + * Calls + * @p{get_intermediate_points_between_points}. + */ + virtual void + get_intermediate_points_on_line (const typename Triangulation::line_iterator &line, + typename std::vector > &points) const; + + /** + * Refer to the general + * documentation of this class + * and the documentation of the + * base class. + * + * Only implemented for @p{dim=3} + * and for @p{points.size()==1}. + */ + virtual void + get_intermediate_points_on_quad (const typename Triangulation::quad_iterator &quad, + typename std::vector > &points) const; + /** * Compute the normals to the * boundary at the vertices of diff --git a/deal.II/deal.II/source/grid/tria_boundary_lib.cc b/deal.II/deal.II/source/grid/tria_boundary_lib.cc index 448876192e..8d14f058de 100644 --- a/deal.II/deal.II/source/grid/tria_boundary_lib.cc +++ b/deal.II/deal.II/source/grid/tria_boundary_lib.cc @@ -511,6 +511,59 @@ get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) c +template +void +HalfHyperShellBoundary:: +get_intermediate_points_on_line (const typename Triangulation::line_iterator &line, + typename std::vector > &points) const +{ + // check whether center of object is + // at x==0, since then it belongs + // to the plane part of the + // boundary + const Point line_center = line->center(); + if (line_center(0) == center(0)) + return StraightBoundary::get_intermediate_points_on_line (line, points); + else + return HyperShellBoundary::get_intermediate_points_on_line (line, points); +}; + + + +template +void +HalfHyperShellBoundary:: +get_intermediate_points_on_quad (const typename Triangulation::quad_iterator &quad, + typename std::vector > &points) const +{ + // check whether center of object is + // at x==0, since then it belongs + // to the plane part of the + // boundary + const Point quad_center = quad->center(); + if (quad_center(0) == center(0)) + StraightBoundary::get_intermediate_points_on_quad (quad, points); + else + HyperShellBoundary::get_intermediate_points_on_quad (quad, points); +}; + + + +#if deal_II_dimension == 1 + +template <> +void +HalfHyperShellBoundary<1>:: +get_intermediate_points_on_quad (const Triangulation<1>::quad_iterator &, + std::vector > &) const +{ + Assert (false, ExcInternalError()); +}; + +#endif + + + #if deal_II_dimension == 1 template <>