]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fixed manifold lib step 1.
authorheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 Dec 2013 12:39:02 +0000 (12:39 +0000)
committerheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 Dec 2013 12:39:02 +0000 (12:39 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@32132 0785d39b-7218-0410-832d-ea1e28bc413d

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

index e426dfa67f4d9570b5cfe4e7751ed3f2f9625962..fb57072a8d4b8c8a0cada9b679de0020151fe2c8 100644 (file)
@@ -23,7 +23,6 @@
 
 DEAL_II_NAMESPACE_OPEN
 
-
 /**
  * Manifold description for a polar space coordinate system. Given a
  * set of points in space, this class computes their weighted average
@@ -69,7 +68,6 @@ class PolarManifold : public FlatManifold<spacedim>
                   const std::vector<double> &weights) const;
 
     
-  private:
                                     /**
                                      * The center of the polar
                                      * coordinate system.
index a2a6d0ad68617c0c44bf504efc92327e0ab3776a..17890b2f41e5beaf889eb3f016402190bb009c87 100644 (file)
@@ -20,6 +20,8 @@
 
 #include <deal.II/base/config.h>
 #include <deal.II/grid/tria_boundary.h>
+#include <deal.II/grid/manifold.h>
+#include <deal.II/grid/manifold_lib.h>
 
 DEAL_II_NAMESPACE_OPEN
 
@@ -371,7 +373,7 @@ public:
  * @author Wolfgang Bangerth, 1999
  */
 template <int dim>
-class HyperShellBoundary : public HyperBallBoundary<dim>
+class HyperShellBoundary : public PolarManifold<dim>
 {
 public:
   /**
@@ -379,11 +381,7 @@ public:
    * spheres defaults to the
    * origin.
    *
-   * Calls the constructor of its
-   * base @p HyperBallBoundary
-   * class with a dummy radius as
-   * argument. This radius will be
-   * ignored
+   * This class is really just a proxy of its base class.
    */
   HyperShellBoundary (const Point<dim> &center = Point<dim>());
 };
index 0fc9d742a3c46ba43127f79dd0dbe2c056b7ec1b..e9777188b85d4036c655a54271a58db3acbebffc 100644 (file)
@@ -31,6 +31,7 @@
 #include <deal.II/grid/tria_accessor.h>
 #include <deal.II/grid/tria_iterator.h>
 #include <deal.II/grid/tria_boundary_lib.h>
+#include <deal.II/grid/manifold_lib.h>
 #include <deal.II/dofs/dof_handler.h>
 #include <deal.II/dofs/dof_accessor.h>
 #include <deal.II/dofs/dof_tools.h>
index a7b5ba4a3258b1df8aadc3c4eb61e95c3b16f1b8..acac37057c4f83400141cab508c72106f49405fe 100644 (file)
 //
 // ---------------------------------------------------------------------
 
-#include <deal.II/grid/manifold_lib.h>
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_iterator.h>
 #include <deal.II/grid/tria_accessor.h>
+#include <deal.II/grid/manifold_lib.h>
 #include <deal.II/base/tensor.h>
 #include <cmath>
 
index 02975a31625dbb0539c7ce722ee5b1ce6f78ee53..cb32b6fe15569d8569998aa2bf14ebfbf427a5e5 100644 (file)
@@ -94,15 +94,14 @@ project_to_manifold (const Point<spacedim> middle) const
 {
   // The temptative point is computed from the get_new_point function
   // of the FlatManifold class, which in turns calls this class
-  // internally. We have project this point out to the given radius
+  // internally. We have to project this point out to the given radius
   // from the axis. to this end, we have to take into account the
   // offset point_on_axis and the direction of the axis
   const Point<spacedim> vector_from_axis = (middle-point_on_axis) -
                                            ((middle-point_on_axis) * direction) * direction;
-  // scale it to the desired length
-  // and put everything back
-  // together, unless we have a point
-  // on the axis
+  
+  // scale it to the desired length and put everything back together,
+  // unless we have a point on the axis
   if (vector_from_axis.norm() <= 1e-10 * middle.norm())
     return middle;
   else
@@ -1032,10 +1031,8 @@ normal_vector (const Point<dim> vertex) const
 template <int dim>
 HyperShellBoundary<dim>::HyperShellBoundary (const Point<dim> &center)
   :
-  HyperBallBoundary<dim>(center, 0.)
-{
-  this->compute_radius_automatically=true;
-}
+  PolarManifold<dim>(center)
+{}
 
 
 /* ---------------------------------------------------------------------- */

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.