From 50dcccfeb19b05e879df93748b9c3bf2ba5a1fd6 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 30 Nov 2020 19:06:29 -0700 Subject: [PATCH] Better document TriaAccessor::diagonal(). --- include/deal.II/grid/tria_accessor.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index c0d7f44fe0..b2166d1424 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -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; -- 2.39.5