From eab97d4c4eb25babae5915236ed7cd72591f2e02 Mon Sep 17 00:00:00 2001 From: heltai Date: Thu, 16 Jan 2014 16:59:03 +0000 Subject: [PATCH] Modified signature: only const references. git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@32226 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/grid/manifold.h | 10 +- deal.II/include/deal.II/grid/manifold_lib.h | 710 ------------------ .../include/deal.II/grid/tria_boundary_lib.h | 20 +- deal.II/source/grid/manifold.cc | 6 +- deal.II/source/grid/tria_boundary_lib.cc | 20 +- 5 files changed, 28 insertions(+), 738 deletions(-) diff --git a/deal.II/include/deal.II/grid/manifold.h b/deal.II/include/deal.II/grid/manifold.h index d088f0e813..318162164f 100644 --- a/deal.II/include/deal.II/grid/manifold.h +++ b/deal.II/include/deal.II/grid/manifold.h @@ -125,7 +125,7 @@ public: * exception of type ExcPureFunctionCalled. */ virtual - Point project_to_manifold (const Point candidate) const; + Point project_to_manifold (const Point &candidate) const; /** * Given a vector of points, return the normals to the Manifold in @@ -146,7 +146,7 @@ public: * manifold is a codimension one manifold. */ virtual - Point normal_vector(const Point point) const; + Point normal_vector(const Point &point) const; protected: @@ -222,7 +222,7 @@ public: * this class. */ virtual - Point project_to_manifold (const Point candidate) const; + Point project_to_manifold (const Point &candidate) const; }; @@ -293,7 +293,7 @@ public: * information. */ virtual Point - pull_back(const Point space_point) const = 0; + pull_back(const Point &space_point) const = 0; /** * Given a point in the dim dimensianal Euclidean space, this @@ -304,7 +304,7 @@ public: * information. */ virtual Point - push_forward(const Point chart_point) const = 0; + push_forward(const Point &chart_point) const = 0; private: diff --git a/deal.II/include/deal.II/grid/manifold_lib.h b/deal.II/include/deal.II/grid/manifold_lib.h index fb57072a8d..fe53dc2f15 100644 --- a/deal.II/include/deal.II/grid/manifold_lib.h +++ b/deal.II/include/deal.II/grid/manifold_lib.h @@ -160,716 +160,6 @@ class CylinderManifold : public FlatManifold }; -// -// -// -// /** -// * Boundary object for the hull of a (truncated) cone with two -// * different radii at the two ends. If one radius is chosen to be 0 -// * the object describes the boundary of a cone. In three dimensions, -// * points are projected on an arbitrarily oriented (truncated) cone -// * described by the two endpoints and the corresponding radii. Similar -// * to HyperBallBoundary, new points are projected by dividing the -// * straight line between the old two points and adjusting the radius -// * from the axis. -// * -// * This class is derived from StraightBoundary rather than from -// * Boundary, which would seem natural, since this way we can use the -// * StraightBoundary::in_between() function. -// * -// * As an example of use, consider the following code snippet: -// * @code -// * Triangulation triangulation; -// * GridGenerator::truncated_cone (triangulation); -// * Point p1, p2; -// * p1[0] = -1; -// * p2[0] = 1; -// * const ConeBoundary boundary (1, 0.5, p1, p2); -// * triangulation.set_boundary (0, boundary); -// * triangulation.refine_global (2); -// * @endcode -// * This will produce the following meshes after the two -// * refinements we perform, in 2d and 3d, respectively: -// * -// * @image html cone_2d.png -// * @image html cone_3d.png -// * -// * @author Markus Bürg, 2009 -// */ -// template -// class ConeBoundary : public StraightBoundary -// { -// public: -// /** -// * Constructor. Here the boundary -// * object is constructed. The -// * points x_0 and -// * x_1 describe the -// * starting and ending points of -// * the axis of the (truncated) -// * cone. radius_0 -// * denotes the radius -// * corresponding to x_0 -// * and radius_1 the one -// * corresponding to x_1. -// */ -// ConeBoundary (const double radius_0, -// const double radius_1, -// const Point x_0, -// const Point x_1); -// -// /** -// * Return the radius of the -// * (truncated) cone at given point -// * x on the axis. -// */ -// double get_radius (const Point x) const; -// -// /** -// * Refer to the general -// * documentation of this class -// * and the documentation of the -// * base class. -// */ -// virtual -// Point -// get_new_point_on_line (const typename Triangulation::line_iterator &line) const; -// -// /** -// * Refer to the general -// * documentation of this class -// * and the documentation of the -// * base class. -// */ -// virtual -// Point -// get_new_point_on_quad (const typename Triangulation::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::line_iterator &line, -// std::vector > &points) const; -// -// /** -// * Refer to the general -// * documentation of this class -// * and the documentation of the -// * base class. -// * -// * Only implemented for -// * dim=3 and for -// * points.size()==1. -// */ -// virtual -// void -// get_intermediate_points_on_quad (const typename Triangulation::quad_iterator &quad, -// std::vector > &points) const; -// -// /** -// * Compute the normals to the -// * boundary at the vertices of -// * the given face. -// * -// * Refer to the general -// * documentation of this class -// * and the documentation of the -// * base class. -// */ -// virtual -// void -// get_normals_at_vertices (const typename Triangulation::face_iterator &face, -// typename Boundary::FaceVertexNormals &face_vertex_normals) const; -// -// protected: -// /** -// * First radius of the (truncated) -// * cone. -// */ -// const double radius_0; -// -// /** -// * Second radius of the (truncated) -// * cone. -// */ -// const double radius_1; -// -// /** -// * Starting point of the axis. -// */ -// const Point x_0; -// -// /** -// * Ending point of the axis. -// */ -// const Point x_1; -// -// private: -// /** -// * Called by @p -// * get_intermediate_points_on_line -// * and by @p -// * get_intermediate_points_on_quad. -// * -// * Refer to the general -// * documentation of @p -// * get_intermediate_points_on_line -// * in the documentation of the -// * base class. -// */ -// void -// get_intermediate_points_between_points (const Point &p0, -// const Point &p1, -// std::vector > &points) const; -// }; -// -// -// -// /** -// * Specialization of Boundary, which places the new point on -// * the boundary of a ball in arbitrary dimension. It works by projecting -// * the point in the middle of the old points onto the ball. The middle is -// * defined as the arithmetic mean of the points. -// * -// * The center of the ball and its radius may be given upon construction of -// * an object of this type. They default to the origin and a radius of 1.0. -// * -// * This class is derived from StraightBoundary rather than from -// * Boundary, which would seem natural, since this way we can use the -// * StraightBoundary::in_between() function. -// * -// * @ingroup boundary -// * -// * @author Wolfgang Bangerth, 1998, Ralf Hartmann, 2001 -// */ -// template -// class HyperBallBoundary : public StraightBoundary -// { -// public: -// /** -// * Constructor -// */ -// HyperBallBoundary (const Point p = Point(), -// const double radius = 1.0); -// -// /** -// * Refer to the general documentation of -// * this class and the documentation of the -// * base class. -// */ -// virtual -// Point -// get_new_point_on_line (const typename Triangulation::line_iterator &line) const; -// -// /** -// * Refer to the general documentation of -// * this class and the documentation of the -// * base class. -// */ -// virtual -// Point -// get_new_point_on_quad (const typename Triangulation::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::line_iterator &line, -// std::vector > &points) const; -// -// /** -// * Refer to the general -// * documentation of this class -// * and the documentation of the -// * base class. -// * -// * Only implemented for dim=3 -// * and for points.size()==1. -// */ -// virtual -// void -// get_intermediate_points_on_quad (const typename Triangulation::quad_iterator &quad, -// std::vector > &points) const; -// -// /** -// * Implementation of the function -// * declared in the base class. -// * -// * Refer to the general -// * documentation of this class -// * and the documentation of the -// * base class. -// */ -// virtual -// Tensor<1,spacedim> -// normal_vector (const typename Triangulation::face_iterator &face, -// const Point &p) const; -// -// /** -// * Compute the normals to the -// * boundary at the vertices of -// * the given face. -// * -// * Refer to the general -// * documentation of this class -// * and the documentation of the -// * base class. -// */ -// virtual -// void -// get_normals_at_vertices (const typename Triangulation::face_iterator &face, -// typename Boundary::FaceVertexNormals &face_vertex_normals) const; -// -// /** -// * Return the center of the ball. -// */ -// Point -// get_center () const; -// -// /** -// * Return the radius of the ball. -// */ -// double -// get_radius () const; -// -// /** -// * Exception. Thrown by the -// * @p get_radius if the -// * @p compute_radius_automatically, -// * see below, flag is set true. -// */ -// DeclException0 (ExcRadiusNotSet); -// -// -// protected: -// -// /** -// * Center point of the hyperball. -// */ -// const Point center; -// -// /** -// * Radius of the hyperball. -// */ -// const double radius; -// -// /** -// * This flag is @p false for -// * this class and for all derived -// * classes that set the radius by -// * the constructor. For example -// * this flag is @p false for the -// * HalfHyperBallBoundary -// * class but it is @p true for -// * the HyperShellBoundary -// * class, for example. The -// * latter class doesn't get its -// * radii by the constructor but -// * need to compute the radii -// * automatically each time one of -// * the virtual functions is -// * called. -// */ -// bool compute_radius_automatically; -// -// private: -// -// /** -// * Called by -// * @p get_intermediate_points_on_line -// * and by -// * @p get_intermediate_points_on_quad. -// * -// * Refer to the general -// * documentation of -// * @p get_intermediate_points_on_line -// * in the documentation of the -// * base class. -// */ -// void get_intermediate_points_between_points (const Point &p0, const Point &p1, -// std::vector > &points) const; -// }; -// -// -// -// /** -// * Variant of HyperBallBoundary which denotes a half hyper ball -// * where the first coordinate is restricted to the range $x>=0$ (or -// * $x>=center(0)$). In two dimensions, this equals the right half -// * circle, in three space dimensions it is a half ball. This class -// * might be useful for computations with rotational symmetry, where -// * one dimension is the radius from the axis of rotation. -// * -// * @ingroup boundary -// * -// * @author Wolfgang Bangerth, 1999, 2001 -// */ -// template -// class HalfHyperBallBoundary : public HyperBallBoundary -// { -// public: -// /** -// * Constructor -// */ -// HalfHyperBallBoundary (const Point p = Point(), -// const double radius = 1.0); -// -// /** -// * Check if on the line x==0, -// * otherwise pass to the base -// * class. -// */ -// virtual Point -// get_new_point_on_line (const typename Triangulation::line_iterator &line) const; -// -// /** -// * Check if on the line x==0, -// * otherwise pass to the base -// * class. -// */ -// virtual Point -// get_new_point_on_quad (const typename Triangulation::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::line_iterator &line, -// std::vector > &points) const; -// -// /** -// * Refer to the general -// * documentation of this class -// * and the documentation of the -// * base class. -// * -// * Only implemented for dim=3 -// * and for points.size()==1. -// */ -// virtual void -// get_intermediate_points_on_quad (const typename Triangulation::quad_iterator &quad, -// std::vector > &points) const; -// -// /** -// * Compute the normals to the -// * boundary at the vertices of -// * the given face. -// * -// * Refer to the general -// * documentation of this class -// * and the documentation of the -// * base class. -// */ -// virtual void -// get_normals_at_vertices (const typename Triangulation::face_iterator &face, -// typename Boundary::FaceVertexNormals &face_vertex_normals) const; -// }; -// -// -// -// /** -// * Class describing the boundaries of a hyper shell. Only the center -// * of the two spheres needs to be given, the radii of inner and outer -// * sphere are computed automatically upon calling one of the virtual -// * functions. -// * -// * @ingroup boundary -// * -// * @author Wolfgang Bangerth, 1999 -// */ -// template -// class HyperShellBoundary : public HyperBallBoundary -// { -// public: -// /** -// * Constructor. The center of the -// * 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 -// */ -// HyperShellBoundary (const Point ¢er = Point()); -// }; -// -// -// -// /** -// * Variant of HyperShellBoundary which denotes a half hyper shell -// * where the first coordinate is restricted to the range $x>=0$ (or -// * $x>=center(0)$). In two dimensions, this equals the right half arc, -// * in three space dimensions it is a half shell. This class might be -// * useful for computations with rotational symmetry, where one -// * dimension is the radius from the axis of rotation. -// * -// * @ingroup boundary -// * -// * @author Wolfgang Bangerth, 2000, 2009 -// */ -// template -// class HalfHyperShellBoundary : public HyperShellBoundary -// { -// public: -// /** -// * Constructor. The center of the -// * spheres defaults to the -// * origin. -// * -// * If the radii are not specified, the -// * class tries to infer them from the -// * location of points on the -// * boundary. This works in 2d, but not in -// * 3d. As a consequence, in 3d these -// * radii must be given. -// */ -// HalfHyperShellBoundary (const Point ¢er = Point(), -// const double inner_radius = -1, -// const double outer_radius = -1); -// -// /** -// * Construct a new point on a line. -// */ -// virtual Point -// get_new_point_on_line (const typename Triangulation::line_iterator &line) const; -// -// /** -// * Construct a new point on a quad. -// */ -// virtual Point -// get_new_point_on_quad (const typename Triangulation::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::line_iterator &line, -// std::vector > &points) const; -// -// /** -// * Refer to the general -// * documentation of this class -// * and the documentation of the -// * base class. -// * -// * Only implemented for dim=3 -// * and for points.size()==1. -// */ -// virtual void -// get_intermediate_points_on_quad (const typename Triangulation::quad_iterator &quad, -// std::vector > &points) const; -// -// /** -// * Compute the normals to the -// * boundary at the vertices of -// * the given face. -// * -// * Refer to the general -// * documentation of this class -// * and the documentation of the -// * base class. -// */ -// virtual void -// get_normals_at_vertices (const typename Triangulation::face_iterator &face, -// typename Boundary::FaceVertexNormals &face_vertex_normals) const; -// -// private: -// /** -// * Inner and outer radii of the shell. -// */ -// const double inner_radius; -// const double outer_radius; -// }; -// -// -// /** -// * Class describing the boundary of the torus. The axis of the torus is the -// * $y$-axis while the plane of the torus is the $x$-$z$ plane. A torus of this -// * kind can be generated by GridGenerator::torus. -// * -// * This class is only implemented for -// * dim=2,spacedim=3, that is, just the surface. -// */ -// template -// class TorusBoundary : public Boundary -// { -// public: -// /** -// * Constructor.R has to be -// * greater than r. -// */ -// TorusBoundary (const double R, const double r); -// -// //Boundary Refinenment Functions -// /** -// * Construct a new point on a line. -// */ -// virtual Point -// get_new_point_on_line (const typename Triangulation::line_iterator &line) const; -// -// /** -// * Construct a new point on a quad. -// */ -// virtual Point -// get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const; -// -// /** -// * Construct a new points on a line. -// */ -// virtual void get_intermediate_points_on_line ( -// const typename Triangulation< dim, spacedim >::line_iterator &line, -// std::vector< Point< spacedim > > &points) const ; -// -// /** -// * Construct a new points on a quad. -// */ -// virtual void get_intermediate_points_on_quad ( -// const typename Triangulation< dim, spacedim >::quad_iterator &quad, -// std::vector< Point< spacedim > > &points ) const ; -// -// /** -// * Get the normal from cartesian -// * coordinates. This normal does not have -// * unit length. -// */ -// virtual void get_normals_at_vertices ( -// const typename Triangulation< dim, spacedim >::face_iterator &face, -// typename Boundary::FaceVertexNormals &face_vertex_normals) const ; -// -// private: -// //Handy functions -// /** -// * Function that corrects the value and -// * sign of angle, that is, given -// * angle=tan(abs(y/x)); if -// * (y > 0) && (x < 0) then -// * correct_angle = Pi - angle, -// * etc. -// */ -// -// double get_correct_angle(const double angle,const double x,const double y) const; -// -// /** -// * Get the cartesian coordinates of the -// * Torus, i.e., from (theta,phi) -// * to (x,y,z). -// */ -// Point get_real_coord(const Point &surfP) const ; -// -// /** -// * Get the surface coordinates of the -// * Torus, i.e., from (x,y,z) to -// * (theta,phi). -// */ -// Point get_surf_coord(const Point &p) const ; -// -// /** -// * Get the normal from surface -// * coordinates. This normal does not have -// * unit length. -// */ -// Point get_surf_norm_from_sp(const Point &surfP) const ; -// -// /** -// * Get the normal from cartesian -// * coordinates. This normal does not have -// * unit length. -// */ -// Point get_surf_norm(const Point &p) const ; -// -// /** -// * Inner and outer radii of the shell. -// */ -// const double R; -// const double r; -// }; -// -// -// -// /* -------------- declaration of explicit specializations ------------- */ -// -// #ifndef DOXYGEN -// -// template <> -// Point<1> -// HyperBallBoundary<1>:: -// get_new_point_on_quad (const Triangulation<1>::quad_iterator &) const; -// template <> -// void -// HyperBallBoundary<1>::get_intermediate_points_on_line ( -// const Triangulation<1>::line_iterator &, -// std::vector > &) const; -// template <> -// void -// HyperBallBoundary<3>::get_intermediate_points_on_quad ( -// const Triangulation<3>::quad_iterator &quad, -// std::vector > &points) const; -// template <> -// void -// HyperBallBoundary<1>:: -// get_normals_at_vertices (const Triangulation<1,1>::face_iterator &, -// Boundary<1,1>::FaceVertexNormals &) const; -// template <> -// Point<1> -// HalfHyperBallBoundary<1>:: -// get_new_point_on_quad (const Triangulation<1>::quad_iterator &) const; -// template <> -// void -// HalfHyperBallBoundary<1>:: -// get_intermediate_points_on_quad (const Triangulation<1>::quad_iterator &, -// std::vector > &) const; -// template <> -// void -// HalfHyperBallBoundary<1>:: -// get_normals_at_vertices (const Triangulation<1,1>::face_iterator &, -// Boundary<1,1>::FaceVertexNormals &) const; -// template <> -// Point<1> -// HalfHyperShellBoundary<1>:: -// get_new_point_on_quad (const Triangulation<1>::quad_iterator &) const; -// template <> -// void -// HalfHyperShellBoundary<1>:: -// get_intermediate_points_on_quad (const Triangulation<1>::quad_iterator &, -// std::vector > &) const; -// template <> -// void -// HalfHyperShellBoundary<1>:: -// get_normals_at_vertices (const Triangulation<1,1>::face_iterator &, -// Boundary<1,1>::FaceVertexNormals &) const; -// -// -// #endif // DOXYGEN -// DEAL_II_NAMESPACE_CLOSE #endif 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 17890b2f41..971558bcef 100644 --- a/deal.II/include/deal.II/grid/tria_boundary_lib.h +++ b/deal.II/include/deal.II/grid/tria_boundary_lib.h @@ -78,13 +78,13 @@ public: * boundary to function properly. */ virtual Point - project_to_manifold (const Point candidate) const; + project_to_manifold (const Point &candidate) const; /** * Compute the normal to the surface. */ virtual Point - normal_vector (const Point point) const; + normal_vector (const Point &point) const; /** * Return the radius of the cylinder. @@ -186,7 +186,7 @@ public: * boundary to function properly. */ virtual Point - project_to_manifold (const Point candidate) const; + project_to_manifold (const Point &candidate) const; /** @@ -197,7 +197,7 @@ public: */ virtual Point - normal_vector (const Point point) const; + normal_vector (const Point &point) const; protected: /** @@ -266,7 +266,7 @@ public: */ virtual Point - normal_vector (const Point p) const; + normal_vector (const Point &p) const; /** @@ -357,7 +357,7 @@ public: */ virtual Point - normal_vector (const Point p) const; + normal_vector (const Point &p) const; }; @@ -425,7 +425,7 @@ public: * Compute the normal to the surface. */ virtual Point - normal_vector (const Point point) const; + normal_vector (const Point &point) const; private: /** @@ -463,7 +463,7 @@ public: * information. */ virtual Point - pull_back(const Point space_point) const; + pull_back(const Point &space_point) const; /** * Given a point in the dim dimensianal Euclidean space, this @@ -472,13 +472,13 @@ public: * i.e., from (theta,phi) to (x,y,z). */ virtual Point - push_forward(const Point chart_point) const; + push_forward(const Point &chart_point) const; /** * Get the normal from cartesian coordinates. This normal does not * have unit length. */ - Point normal_vector(const Point p) const; + Point normal_vector(const Point &p) const; private: double get_correct_angle(const double angle,const double x,const double y) const; diff --git a/deal.II/source/grid/manifold.cc b/deal.II/source/grid/manifold.cc index fb02d1bb20..01bc5a34f2 100644 --- a/deal.II/source/grid/manifold.cc +++ b/deal.II/source/grid/manifold.cc @@ -34,7 +34,7 @@ Manifold::~Manifold () template Point -Manifold::project_to_manifold (const Point candidate) const +Manifold::project_to_manifold (const Point &candidate) const { Assert (false, ExcPureFunctionCalled()); return candidate; @@ -52,7 +52,7 @@ Manifold::get_normals_at_points(std::vector > &normals template Point -Manifold::normal_vector(const Point point) const +Manifold::normal_vector(const Point &point) const { Assert (false, ExcPureFunctionCalled()); return point; @@ -177,7 +177,7 @@ get_new_point (const std::vector > &surrounding_points, template Point -FlatManifold::project_to_manifold (const Point candidate) const +FlatManifold::project_to_manifold (const Point &candidate) const { return candidate; } diff --git a/deal.II/source/grid/tria_boundary_lib.cc b/deal.II/source/grid/tria_boundary_lib.cc index 025a58b879..42c35d8b0c 100644 --- a/deal.II/source/grid/tria_boundary_lib.cc +++ b/deal.II/source/grid/tria_boundary_lib.cc @@ -61,7 +61,7 @@ CylinderBoundary::get_axis_vector (const unsigned int axis) template Point CylinderBoundary:: -project_to_manifold (const Point middle) const +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 @@ -85,7 +85,7 @@ project_to_manifold (const Point middle) const template Point CylinderBoundary:: -normal_vector (const Point vertex) const +normal_vector (const Point &vertex) const { const Point vector_from_axis = (vertex-point_on_axis) - ((vertex-point_on_axis) * direction) * direction; @@ -134,7 +134,7 @@ double ConeBoundary::get_radius (Point x) const template Point ConeBoundary:: -project_to_manifold (const Point middle) const +project_to_manifold (const Point &middle) const { const Point axis = x_1 - x_0; // To project it on the boundary of the cone we first compute the orthogonal @@ -149,7 +149,7 @@ project_to_manifold (const Point middle) const template Point ConeBoundary:: -normal_vector (const Point vertex) const +normal_vector (const Point &vertex) const { const Point axis = x_1 - x_0; @@ -204,7 +204,7 @@ HyperBallBoundary::get_new_point(const std::vector template Point HyperBallBoundary:: -normal_vector (const Point vertex) const +normal_vector (const Point &vertex) const { return vertex-center; } @@ -261,7 +261,7 @@ HalfHyperBallBoundary::get_new_point(const std::vector > &surrou template Point HalfHyperBallBoundary:: -normal_vector (const Point vertex) const +normal_vector (const Point &vertex) const { // Check whether the point is inside the flat part, or outside. If // it is both at distance R from the center and with zero first @@ -322,7 +322,7 @@ HalfHyperShellBoundary::HalfHyperShellBoundary (const Point ¢er, template Point HalfHyperShellBoundary:: -normal_vector (const Point vertex) const +normal_vector (const Point &vertex) const { if (vertex(0) == this->center(0)) { @@ -386,7 +386,7 @@ TorusBoundary::get_correct_angle(const double angle, template <> Point<3> -TorusBoundary<2,3>::push_forward (const Point<2> surfP) const +TorusBoundary<2,3>::push_forward (const Point<2> &surfP) const { const double theta=surfP(0); const double phi=surfP(1); @@ -400,7 +400,7 @@ TorusBoundary<2,3>::push_forward (const Point<2> surfP) const template <> Point<2> -TorusBoundary<2,3>::pull_back(const Point<3> p) const +TorusBoundary<2,3>::pull_back(const Point<3> &p) const { const double phi=std::asin(std::abs(p(1))/r); const double Rr_2=p(0)*p(0)+p(2)*p(2); @@ -449,7 +449,7 @@ TorusBoundary<2,3>:: get_surf_norm_from_sp(const Point<2> &surfP) const //Normal field without unit length template <> Point<3> -TorusBoundary<2,3>::normal_vector(const Point<3> p) const +TorusBoundary<2,3>::normal_vector(const Point<3> &p) const { Point<2> surfP=pull_back(p); -- 2.39.5