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:                 [email protected]
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/d16f2db8-9d59-d72c-ccf7-9738801cd3df%40colostate.edu.

Reply via email to