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
const std::vector<double> &weights) const;
- private:
/**
* The center of the polar
* coordinate system.
#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
* @author Wolfgang Bangerth, 1999
*/
template <int dim>
-class HyperShellBoundary : public HyperBallBoundary<dim>
+class HyperShellBoundary : public PolarManifold<dim>
{
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> ¢er = Point<dim>());
};
#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>
//
// ---------------------------------------------------------------------
-#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>
{
// 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
template <int dim>
HyperShellBoundary<dim>::HyperShellBoundary (const Point<dim> ¢er)
:
- HyperBallBoundary<dim>(center, 0.)
-{
- this->compute_radius_automatically=true;
-}
+ PolarManifold<dim>(center)
+{}
/* ---------------------------------------------------------------------- */