]> https://gitweb.dealii.org/ - dealii.git/commitdiff
First (Test)implementation of HyperBallBoundary::get_intermediate_points_on_quad.
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Tue, 16 Jan 2001 14:01:11 +0000 (14:01 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Tue, 16 Jan 2001 14:01:11 +0000 (14:01 +0000)
git-svn-id: https://svn.dealii.org/trunk@3691 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 fc95dca43f95f1005e06592682606b2b53b5d583..1cda4fe87e120e5f3c58db78dcbab56f8a8ddfb7 100644 (file)
@@ -69,6 +69,18 @@ class HyperBallBoundary : public StraightBoundary<dim>
     get_intermediate_points_on_line (const typename Triangulation<dim>::line_iterator &line,
                                     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,
+                                    vector<Point<dim> > &points) const;
+
                                     /**
                                      * Return the center of the ball.
                                      */
index 0f7a6c6cf22836cd497de5ef21fc91c4bade87b7..122725071d3ac9259e9fffdc017d61c613c49964 100644 (file)
@@ -75,6 +75,8 @@ get_new_point_on_quad (const typename Triangulation<dim>::quad_iterator &quad) c
 };
 
 
+#if deal_II_dimension == 2
+
 template <>
 void
 HyperBallBoundary<2>::get_intermediate_points_on_line (
@@ -110,6 +112,7 @@ HyperBallBoundary<2>::get_intermediate_points_on_line (
     }
 }
 
+#endif
 
 
 template <int dim>
@@ -122,6 +125,38 @@ HyperBallBoundary<dim>::get_intermediate_points_on_line (
 }
 
 
+#if deal_II_dimension == 3
+
+template <>
+void
+HyperBallBoundary<3>::get_intermediate_points_on_quad (
+  const Triangulation<3>::quad_iterator &quad,
+  vector<Point<3> > &points) const
+{
+  Assert(points.size()==1, ExcNotImplemented());
+  StraightBoundary<3>::get_intermediate_points_on_quad (quad, points);
+  Point<3> &middle=points[0];
+  
+  middle -= center;
+                                  // project to boundary
+  middle *= radius / sqrt(middle.square());
+  
+  middle += center;
+}
+
+#endif
+
+
+template <int dim>
+void
+HyperBallBoundary<dim>::get_intermediate_points_on_quad (
+  const Triangulation<dim>::quad_iterator &,
+  vector<Point<dim> > &) const
+{
+  Assert(false,ExcNotImplemented());
+}
+
+
 template <int dim>
 Point<dim>
 HyperBallBoundary<dim>::get_center () const 

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.