From: wolf Date: Tue, 4 Jan 2000 14:18:30 +0000 (+0000) Subject: Add a way to extract radius and center from the boundary object. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75676163f010433a0e946d4cb1608127c3108263;p=dealii-svn.git Add a way to extract radius and center from the boundary object. git-svn-id: https://svn.dealii.org/trunk@2159 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 1145323449..5d17dcc0da 100644 --- a/deal.II/deal.II/include/grid/tria_boundary_lib.h +++ b/deal.II/deal.II/include/grid/tria_boundary_lib.h @@ -50,7 +50,16 @@ class HyperBallBoundary : public StraightBoundary { virtual Point get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const; + /** + * Return the center of the ball. + */ + Point get_center () const; + /** + * Return the radius of the ball. + */ + double get_radius () const; + protected: /** * Center point of the hyperball. 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 e0abceb8b4..3683453d79 100644 --- a/deal.II/deal.II/source/grid/tria_boundary_lib.cc +++ b/deal.II/deal.II/source/grid/tria_boundary_lib.cc @@ -66,6 +66,24 @@ get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) c +template +Point +HyperBallBoundary::get_center () const +{ + return center; +}; + + + +template +double +HyperBallBoundary::get_radius () const +{ + return radius; +}; + + + template HalfHyperBallBoundary::HalfHyperBallBoundary (const Point center,