From: heltai Date: Tue, 31 Dec 2013 12:39:02 +0000 (+0000) Subject: Fixed manifold lib step 1. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85dc0c3eefe28035256292785e5ce930b0ae0a87;p=dealii-svn.git Fixed manifold lib step 1. git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@32132 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/grid/manifold_lib.h b/deal.II/include/deal.II/grid/manifold_lib.h index e426dfa67f..fb57072a8d 100644 --- a/deal.II/include/deal.II/grid/manifold_lib.h +++ b/deal.II/include/deal.II/grid/manifold_lib.h @@ -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 const std::vector &weights) const; - private: /** * The center of the polar * coordinate system. diff --git a/deal.II/include/deal.II/grid/tria_boundary_lib.h b/deal.II/include/deal.II/grid/tria_boundary_lib.h index a2a6d0ad68..17890b2f41 100644 --- a/deal.II/include/deal.II/grid/tria_boundary_lib.h +++ b/deal.II/include/deal.II/grid/tria_boundary_lib.h @@ -20,6 +20,8 @@ #include #include +#include +#include DEAL_II_NAMESPACE_OPEN @@ -371,7 +373,7 @@ public: * @author Wolfgang Bangerth, 1999 */ template -class HyperShellBoundary : public HyperBallBoundary +class HyperShellBoundary : public PolarManifold { 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 ¢er = Point()); }; diff --git a/deal.II/source/grid/grid_generator.cc b/deal.II/source/grid/grid_generator.cc index 0fc9d742a3..e9777188b8 100644 --- a/deal.II/source/grid/grid_generator.cc +++ b/deal.II/source/grid/grid_generator.cc @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/deal.II/source/grid/manifold_lib.cc b/deal.II/source/grid/manifold_lib.cc index a7b5ba4a32..acac37057c 100644 --- a/deal.II/source/grid/manifold_lib.cc +++ b/deal.II/source/grid/manifold_lib.cc @@ -14,10 +14,10 @@ // // --------------------------------------------------------------------- -#include #include #include #include +#include #include #include diff --git a/deal.II/source/grid/tria_boundary_lib.cc b/deal.II/source/grid/tria_boundary_lib.cc index 02975a3162..cb32b6fe15 100644 --- a/deal.II/source/grid/tria_boundary_lib.cc +++ b/deal.II/source/grid/tria_boundary_lib.cc @@ -94,15 +94,14 @@ project_to_manifold (const Point 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 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 vertex) const template HyperShellBoundary::HyperShellBoundary (const Point ¢er) : - HyperBallBoundary(center, 0.) -{ - this->compute_radius_automatically=true; -} + PolarManifold(center) +{} /* ---------------------------------------------------------------------- */