From: wolf Date: Wed, 21 Mar 2001 16:57:22 +0000 (+0000) Subject: Implement get_intermediate_points_on_* for HalfHyperBallBoundary X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=240cce019843aa571c70d5caddc5d215c8e69f7d;p=dealii-svn.git Implement get_intermediate_points_on_* for HalfHyperBallBoundary git-svn-id: https://svn.dealii.org/trunk@4253 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 859187a253..3ccb5d45fa 100644 --- a/deal.II/deal.II/include/grid/tria_boundary_lib.h +++ b/deal.II/deal.II/include/grid/tria_boundary_lib.h @@ -59,8 +59,9 @@ class HyperBallBoundary : public StraightBoundary 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 + * Refer to the general + * documentation of this class + * and the documentation of the * base class. * * Calls @@ -71,8 +72,9 @@ class HyperBallBoundary : public StraightBoundary typename std::vector > &points) const; /** - * Refer to the general documentation of - * this class and the documentation of the + * Refer to the general + * documentation of this class + * and the documentation of the * base class. * * Only implemented for @p{dim=3} @@ -131,7 +133,7 @@ class HyperBallBoundary : public StraightBoundary * might be useful for computations with rotational symmetry, where * one dimension is the radius from the axis of rotation. * - * @author Wolfgang Bangerth, 1999 + * @author Wolfgang Bangerth, 1999, 2001 */ template class HalfHyperBallBoundary : public HyperBallBoundary @@ -158,6 +160,32 @@ class HalfHyperBallBoundary : public HyperBallBoundary */ 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; }; 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 b670d96243..b641959a59 100644 --- a/deal.II/deal.II/source/grid/tria_boundary_lib.cc +++ b/deal.II/deal.II/source/grid/tria_boundary_lib.cc @@ -246,6 +246,10 @@ Point HalfHyperBallBoundary:: get_new_point_on_line (const typename Triangulation::line_iterator &line) 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 line_center; @@ -284,6 +288,44 @@ get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) c +template +void +HalfHyperBallBoundary:: +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 HyperBallBoundary::get_intermediate_points_on_line (line, points); +}; + + + +template +void +HalfHyperBallBoundary:: +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)) + return StraightBoundary::get_intermediate_points_on_quad (quad, points); + else + return HyperBallBoundary::get_intermediate_points_on_quad (quad, points); +}; + + + /* ---------------------------------------------------------------------- */