]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use copydoc for Tria wrappers
authorAlexander Grayver <agrayver@erdw.ethz.ch>
Mon, 16 Mar 2020 10:29:30 +0000 (11:29 +0100)
committerAlexander Grayver <agrayver@erdw.ethz.ch>
Mon, 16 Mar 2020 10:29:30 +0000 (11:29 +0100)
contrib/python-bindings/include/triangulation_wrapper.h

index 3639186059f5f8491dbf818ccec2d81e0cfeeef6..7b6277e5dc3e32d57277300348affca99ab75924 100644 (file)
@@ -72,43 +72,33 @@ namespace python
     unsigned int
     n_active_cells() const;
 
-    /**
-     * Generate a hyper cube (square in 2D and cube in 3D) with exactly one
-     * cell.
+    /*! @copydoc GridGenerator::hyper_cube
      */
     void
     generate_hyper_cube(const double left     = 0.,
                         const double right    = 1.,
                         const bool   colorize = false);
 
-    /**
-     * Generate a simplex with (dim+1) vertices and mesh cells.
+    /*! @copydoc GridGenerator::simplex
      */
     void
     generate_simplex(boost::python::list &vertices);
 
-    /**
-     * Same as hyper_cube but not only one cell is created but each coordinate
-     * direction is subdivided in @p repetitions cells.
+    /*! @copydoc GridGenerator::subdivided_hyper_cube
      */
     void
     generate_subdivided_hyper_cube(const unsigned int repetitions,
                                    const double       left  = 0.,
                                    const double       right = 1.);
 
-    /**
-     * Generate a coordinate-parallel brick from the two diagonally opposite
-     * corners points @p p1 and @p p2.
+    /*! @copydoc GridGenerator::hyper_rectangle
      */
     void
     generate_hyper_rectangle(PointWrapper &p1,
                              PointWrapper &p2,
                              const bool    colorize = false);
 
-    /**
-     * Generate a coordinate-parallel brick from the two diagonally opposite
-     * corners points @p p1 and @p p2. In direction i, repetitions[i] cells are
-     * created.
+    /*! @copydoc GridGenerator::subdivided_hyper_rectangle
      */
     void
     generate_subdivided_hyper_rectangle(boost::python::list &repetitions,
@@ -155,64 +145,30 @@ namespace python
       const unsigned int repetitions  = 1,
       const bool         colorize     = false);
 
-    /**
-     * Rectangular domain with rectangular pattern of holes. The domain itself
-     * is rectangular, very much as if it had been generated by
-     * subdivided_hyper_rectangle(). The argument @p holes specifies how many
-     * square holes the domain should have in each coordinate direction. The
-     * total number of mesh cells in that direction is then this number plus
-     * one. The number of holes in one direction must be at least one.
+    /*! @copydoc GridGenerator::cheese
      */
     void
     generate_cheese(boost::python::list &holes);
 
-    /**
-     * A general quadrilateral in 2d or a general hexahedron in 3d. It is the
-     * responsibility of the user to provide the vertices in the right order
-     * (see the documentation of the GeometryInfo class) because the vertices
-     * are stored in the same order as they are given. It is also important to
-     * make that the volume of the cell is positive. If the argument @p colorize
-     * is false, all boundary indicators are set to zero ("not colorized") for
-     * 2d and 3d. If it is true, the boundary is colorized as in
-     * hyper_rectangle(). In 1d, the indicators are always colorized.
+    /*! @copydoc GridGenerator::general_cell
      */
     void
     generate_general_cell(boost::python::list &vertices,
                           const bool           colorize = false);
 
-    /**
-     * A parallelogram. The first corner point is the origin. The @tparam dim
-     * adjacent points are the ones given in the second argument and the fourth
-     * point will be the sum of these two vectors. Colorizing is done in the
-     * same way as in hyper_rectangle().
-     * @note This function is implemented in 2d only.
+    /*! @copydoc GridGenerator::parallelogram
      */
     void
     generate_parallelogram(boost::python::list &corners,
                            const bool           colorize = false);
 
-    /**
-     * A parallelepiped. The first corner point is the origin. The @tparam dim
-     * adjacent points are vectors describing the edges of the parallelepiped
-     * with respect to the origin. Additional points are sums of these dim
-     * vectors. Colorizing is done according to hyper_rectangle().
-     * @note This function silently reorders the vertices on the cells to
-     * lexicographic ordering (see GridReordering::reoder_grid()). In other
-     * words, if reordering of the vertices does occur, the ordering of vertices
-     * in the array of @p corners will no longer refer to the same
-     * triangulation.
+    /*! @copydoc GridGenerator::parallelepiped
      */
     void
     generate_parallelepiped(boost::python::list &corners,
                             const bool           colorize = false);
 
-    /**
-     * A subdivided parallelepiped. The first corner point is the origin. The
-     * @tparam dim adjacent points are vectors describing the edges of the
-     * parallelepiped with respect to the origin. Additional points are sums of
-     * these dim vectors. The variable @p n_subdivisions designates the number
-     * of subdivisions in each of the @tparam dim directions. Colorizing is odne
-     * according to hyper_rectangle().
+    /*! @copydoc GridGenerator::subdivided_parallelepiped
      */
     void
     generate_fixed_subdivided_parallelepiped(const unsigned int n_subdivisions,
@@ -230,14 +186,7 @@ namespace python
       boost::python::list &corners,
       const bool           colorize = false);
 
-    /**
-     * Hypercube with a layer of hypercubes around it. The first two parameters
-     * give the lower and upper bound of the inner hypercube in all coordinate
-     * directions. @p thickness marks the size of the layer cells. If the flag
-     * @p colorize is set, the outer cells get material id's according to the
-     * following scheme: extending over the inner cube (+/-) x-direction: 1/2.
-     * In y-direction 4/8, in z-direction 16/32. The cells at corners and edges
-     * (3d) get these values bitwise or'd.
+    /*! @copydoc GridGenerator::enclosed_hyper_cube
      */
     void
     generate_enclosed_hyper_cube(const double left      = 0.,
@@ -245,54 +194,27 @@ namespace python
                                  const double thickness = 1.,
                                  const bool   colorize  = false);
 
-    /**
-     * Generate a hyperball, i.e. a circle or a ball around @p center with
-     * given @p radius. In order to avoid degenerate cells at the boundaries,
-     * the circle is triangulated by five cells, the ball by seven cells. The
-     * diameter of the center cell is chosen so that the aspect ratio of the
-     * boundary cells after one refinement is optimized. You should attach a
-     * SphericalManifold to the cells and faces for correct placement of
-     * vertices upon refinement and to be able to use higher order mappings.
+    /*! @copydoc GridGenerator::hyper_ball
      */
     void
     generate_hyper_ball(PointWrapper &center, const double radius = 1.);
 
-    /**
-     * Generate a hyper sphere, i.e., a surface of a ball in @tparam spacedim
-     * dimensions. This function only exists for dim+1=spacedim in 2 and 3 space
-     * dimensions. You should attach a SphericalManifold to the cells and faces
-     * for correct placement of vertices upon refinement and to be able to use
-     * higher order mappings.
+    /*! @copydoc GridGenerator::hyper_sphere
      */
     void
     generate_hyper_sphere(PointWrapper &center, const double radius = 1.);
 
-    /**
-     * Generate a hyper-ball intersected with the positive orthant relate to @p
-     * center, which contains three elements in 2d and four in 3d. The boundary
-     * indicators for the final triangulations are 0 for the curved boundary
-     * and 1 for the cut plane. The appropriate manifold class is
-     * SphericalManifold.
+    /*! @copydoc GridGenerator::quarter_hyper_ball
      */
     void
     generate_quarter_hyper_ball(PointWrapper &center, const double radius = 1.);
 
-    /**
-     * Generate a half hyper-ball around @p center, which contains four elements
-     * in 2d and 6 in 3d. The cut plane is perpendicular to the x-axis. The
-     * boundary indicators for the final triangulation are 0 for the curved
-     * boundary and 1 for the cut plane. The appropriate manifold class is
-     * SphericalManifold.
+    /*! @copydoc GridGenerator::half_hyper_ball
      */
     void
     generate_half_hyper_ball(PointWrapper &center, const double radius = 1.);
 
-    /**
-     * Produce a hyper-shell, the region between two spheres around center,
-     * with given inner_radius and outer_radius. The number n_cells indicates
-     * the number of cells of the resulting triangulation, i.e., how many
-     * cells form the ring (in 2d) or the shell (in 3d).
-     * The appropriate manifold class is SphericalManifold.
+    /*! @copydoc GridGenerator::hyper_shell
      */
     void
     generate_hyper_shell(PointWrapper & center,
@@ -301,123 +223,72 @@ namespace python
                          const unsigned n_cells  = 0,
                          bool           colorize = false);
 
-    /**
-     * Shift each vertex of the Triangulation by the given @p shift_list.
+    /*! @copydoc GridTools::shift
      */
     void
     shift(boost::python::list &shift_list);
 
-    /**
-     * Scale the entire triangulation by the given factor. To preserve
-     * the orientation of the triangulation, the factor must be positive.
+    /*! @copydoc GridTools::scale
      */
     void
     scale(const double scaling_factor);
 
-    /**
-     * Given two triangulations, create the triangulation that contains the
-     * cells of both triangulations.
+    /*! @copydoc GridGenerator::merge_triangulations
      */
     void
     merge_triangulations(TriangulationWrapper &triangulation_1,
                          TriangulationWrapper &triangulation_2);
 
-    /**
-     * Create a new flat triangulation @param out_tria which contains a single
-     * level with all active cells of the input triangulation. If the spacedim
-     * are different, only the smalled spacedim components of the vertices are
-     * copied over. This is useful to create a Triangulation<2,3> out of a
-     * Triangulation<2,2>, or to project a Triangulation<2,3> into a
-     * Triangulation<2,2>, by neglecting the z component of the vertices. No
-     * internal checks are performed on the vertices, which are assumed to make
-     * sense topologically in the target spacedim dimensional space. If this is
-     * not the case, you will encounter problems when using the triangulation
-     * later on. All information about cell manifold_ids and material ids are
-     * copied from one triangulation to the other, and only the boundary
-     * manifold_ids and boundary_ids are copied over from the faces of the
-     * triangulation to the faces of @p out_tria. If you need to specify
-     * manifold ids on interior faces, they have to be specified manually after
-     * the triangulation is created. This function will fail the input
-     * Triangulation contains hanging nodes.
+    /*! @copydoc GridGenerator::flatten_triangulation
      */
     void
     flatten_triangulation(TriangulationWrapper &tria_out);
 
-    /**
-     * Take a 2d Triangulation that is being extruded in z direction by
-     * the total height of height using n_slices slices (minimum is 2).
-     * The boundary indicators of the faces of input are going to be
-     * assigned to the corresponding side walls in z direction. The
-     * bottom and top get the next two free boundary indicators.
+    /*! @copydoc GridGenerator::extrude_triangulation
      */
     void
     extrude_triangulation(const unsigned int    n_slices,
                           const double          height,
                           TriangulationWrapper &tria_out);
 
-    /**
-     * Distort the given triangulation by randomly moving around all the
-     * vertices of the grid. The direction of movement of each vertex is
-     * random, while the length of the shift vector has a value of factor
-     * times the minimal length of the active edges adjacent to this vertex.
-     * Note that factor should obviously be well below 0.5.
+    /*! @copydoc GridTools::distort_random
      */
     void
     distort_random(const double factor, const bool keep_boundary = true);
 
-    /**
-     * Transform the vertices of the given triangulation by applying the
-     * function object provided as first argument to all its vertices.
+    /*! @copydoc GridTools::transform
      */
     void
     transform(boost::python::object &transformation);
 
-    /**
-     * Find and return an active cell that surrounds a given point p.
-     * The mapping is used to determine whether the given point is inside a
-     * given cell.
+    /*! @copydoc GridTools::find_active_cell_around_point
      */
     CellAccessorWrapper
     find_active_cell_around_point(
       PointWrapper &         p,
       MappingQGenericWrapper mapping = MappingQGenericWrapper());
 
-    /**
-     * Find and return a list of active cells that surround a given vertex with
-     * index vertex_index.
+    /*! @copydoc GridTools::find_cells_adjacent_to_vertex
      */
     boost::python::list
     find_cells_adjacent_to_vertex(const unsigned int vertex_index);
 
-    /**
-     * Assign a manifold object to a certain part of the triangulation.
-     * If an object with manifold number is refined, this object
-     * is used to find the location of new vertices (see the results
-     * section of step-49 for a more in-depth discussion of this, with
-     * examples). It is also used for non-linear (i.e.: non-Q1)
-     * transformations of cells to the unit cell in shape function
-     * calculations.
+    /*! @copydoc Triangulation::set_manifold
      */
     void
     set_manifold(const int number, ManifoldWrapper &manifold);
 
-    /**
-     * Reset those parts of the triangulation with the given manifold_number to
-     * use a FlatManifold object. This is the default state of a non-curved
-     * triangulation, and undoes assignment of a different Manifold object by
-     * the function Triangulation::set_manifold().
+    /*! @copydoc Triangulation::reset_manifold
      */
     void
     reset_manifold(const int number);
 
-    /**
-     * Refine all the cells @p n times.
+    /*! @copydoc Triangulation::refine_global
      */
     void
     refine_global(const unsigned int n);
 
-    /**
-     * Execute both refinement and coarsening of the Triangulation.
+    /*! @copydoc Triangulation::execute_coarsening_and_refinement
      */
     void
     execute_coarsening_and_refinement();
@@ -429,21 +300,17 @@ namespace python
     boost::python::list
     active_cells();
 
-    /**
-     * Return the diameter of the smallest active cell of a triangulation
+    /*! @copydoc GridTools::minimal_cell_diameter
      */
     double
     minimal_cell_diameter() const;
 
-    /**
-     * Return the diameter of the largest active cell of a triangulation
+    /*! @copydoc GridTools::maximal_cell_diameter
      */
     double
     maximal_cell_diameter() const;
 
-    /**
-     * Computes an aspect ratio measure for all active cells and fills a vector
-     * with one entry per cell.
+    /*! @copydoc GridTools::compute_aspect_ratio_of_cells
      */
     boost::python::list
     compute_aspect_ratio_of_cells(const MappingQGenericWrapper &mapping,

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.