On 11/2/21 7:52 AM, Daniel Arndt wrote:
> On the other hand, it should not be too difficult to implement that
> yourself if you use the former functions. You only need to integrate x
> over the whole domain and divide by the area of the whole domain which
> you can do by taking the sum of the barycenter of each cell mutlplied by
> its measure and divide by the sum of the measures. Alternatively,
> integrate x over the whale domain and divide by the integral of 1 over
> the whole domain.
Yes, this would work. A better starting point would be
GridTools::volume() which computes an integral that, with minor
modifications of the integrand would also yield the barycenter and, with
another small modification, the barycenter of a subdomain.
Vachan: If you'd like to implement such a function, it would be great to
have that integrated into namespace GridTools!
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/