]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Better document TriaAccessor::diagonal(). 11285/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 1 Dec 2020 02:06:29 +0000 (19:06 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 1 Dec 2020 02:06:29 +0000 (19:06 -0700)
include/deal.II/grid/tria_accessor.h

index c0d7f44fe0decd6c4a7348bfec188b10ba719274..b2166d14241fd511fa3e709076dd34ee41ff9307 100644 (file)
@@ -1402,9 +1402,25 @@ public:
   /**
    * Diameter of the object.
    *
-   * The diameter of an object is computed to be the largest diagonal. This is
-   * not necessarily the true diameter for objects that may use higher order
-   * mappings, but completely sufficient for most computations.
+   * The diameter of an object is computed to be the largest diagonal of the
+   * current object. If this object is a quadrilateral, then there are two
+   * such diagonal, and if it is a hexahedron, then there are four diagonals
+   * that connect "opposite" points. For triangles and tetrahedra, the function
+   * simply returns the length of the longest edge.
+   *
+   * The situation is more difficult for wedges and pyramids: For wedges, we
+   * return the length of the longest diagonal of the three quadrilateral faces
+   * or the longest edge length of the two triangular faces. For pyramids,
+   * the same principle is applied.
+   *
+   * In all of these cases, this definition of "diameter" is
+   * not necessarily the true diameter in the sense of the largest distance
+   * between points inside the object. Indeed, one can often construct objects
+   * for which it is not, though these are generally quite deformed compared to
+   * the reference shape. Furthermore, for objects that may use higher order
+   * mappings, one may have bulging faces that also create trouble for
+   * computing an exact representation of the diameter of the object. That said,
+   * the definition used above is completely sufficient for most computations.
    */
   double
   diameter() const;

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.