From 859a39b8c0fc4bd08cd3e039c66cea0730e4ce55 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 19 Apr 2017 13:38:02 -0600 Subject: [PATCH] Update documentation of TriaAccessor::barycenter. --- include/deal.II/grid/tria_accessor.h | 16 +++++++++++++++- source/grid/tria_accessor.cc | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index 37798404f6..22ac5d147b 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -1290,7 +1290,21 @@ public: const bool use_laplace_transformation=false) const; /** - * Barycenter of the object. + * Return the barycenter (also called centroid) + * of the object. The barycenter for an object $K$ + * of dimension $d$ in $D$ space dimensions is given by the $D$-dimensional + * vector $\mathbf x_K$ defined by + * @f{ + * \mathbf x_K = \frac{1}{|K|} \int_K \mathbf x \; \textrm{d}x + * @f} + * where the measure of the object is given by + * @f{ + * |K| = \int_K \mathbf 1 \; \textrm{d}x. + * @f} + * This function assumes that $K$ is mapped by a $d$-linear function from + * the reference $d$-dimensional cell. Then the integrals above can be + * pulled back to the reference cell and evaluated exactly (if through + * lengthy and, compared to the center() function, expensive computations). */ Point barycenter () const; diff --git a/source/grid/tria_accessor.cc b/source/grid/tria_accessor.cc index a043d573f5..73a767f36c 100644 --- a/source/grid/tria_accessor.cc +++ b/source/grid/tria_accessor.cc @@ -141,7 +141,7 @@ namespace /* Get the computation of the barycenter by this little Maple script. We use the bilinear mapping of the unit quad to the real quad. However, - every transformation mapping the unit faces to strait lines should + every transformation mapping the unit faces to straight lines should do. Remember that the area of the quad is given by -- 2.39.5