]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Implement get_intermediate_points_on_* for HalfHyperBallBoundary
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 21 Mar 2001 16:57:22 +0000 (16:57 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 21 Mar 2001 16:57:22 +0000 (16:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@4253 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria_boundary_lib.h
deal.II/deal.II/source/grid/tria_boundary_lib.cc

index 859187a253438644a91121173d1e145a295dbaed..3ccb5d45fa5197fe4b4e2f2563470b1c31e08f11 100644 (file)
@@ -59,8 +59,9 @@ class HyperBallBoundary : public StraightBoundary<dim>
     get_new_point_on_quad (const typename Triangulation<dim>::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<dim>
                                     typename std::vector<Point<dim> > &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<dim>
  * 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 <int dim>
 class HalfHyperBallBoundary : public HyperBallBoundary<dim>
@@ -158,6 +160,32 @@ class HalfHyperBallBoundary : public HyperBallBoundary<dim>
                                      */
     virtual Point<dim>
     get_new_point_on_quad (const typename Triangulation<dim>::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<dim>::line_iterator &line,
+                                    typename std::vector<Point<dim> > &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<dim>::quad_iterator &quad,
+                                    typename std::vector<Point<dim> > &points) const;
 };
 
 
index b670d9624391a106fdafa2c00d1775aa298935ba..b641959a597d591bf6df2a354e48d7d0b2458702 100644 (file)
@@ -246,6 +246,10 @@ Point<dim>
 HalfHyperBallBoundary<dim>::
 get_new_point_on_line (const typename Triangulation<dim>::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<dim> 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<dim>::quad_iterator &quad) c
 
 
 
+template <int dim>
+void
+HalfHyperBallBoundary<dim>::
+get_intermediate_points_on_line (const typename Triangulation<dim>::line_iterator &line,
+                                typename std::vector<Point<dim> > &points) const
+{
+                                  // check whether center of object is
+                                  // at x==0, since then it belongs
+                                  // to the plane part of the
+                                  // boundary
+  const Point<dim> line_center = line->center();
+  if (line_center(0) == center(0))
+    return StraightBoundary<dim>::get_intermediate_points_on_line (line, points);
+  else
+    return HyperBallBoundary<dim>::get_intermediate_points_on_line (line, points);
+};
+
+
+
+template <int dim>
+void
+HalfHyperBallBoundary<dim>::
+get_intermediate_points_on_quad (const typename Triangulation<dim>::quad_iterator &quad,
+                                typename std::vector<Point<dim> > &points) const
+{
+                                  // check whether center of object is
+                                  // at x==0, since then it belongs
+                                  // to the plane part of the
+                                  // boundary
+  const Point<dim> quad_center = quad->center();
+  if (quad_center(0) == center(0))
+    return StraightBoundary<dim>::get_intermediate_points_on_quad (quad, points);
+  else
+    return HyperBallBoundary<dim>::get_intermediate_points_on_quad (quad, points);
+};
+
+
+
 /* ---------------------------------------------------------------------- */
 
 

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.