Vachan, There is TriaAccessor::barycenter( https://www.dealii.org/current/doxygen/deal.II/classTriaAccessor.html#a56cc737f4b28f8d28a576d2e3d32ef9f) and TriaAccessor::measure( https://www.dealii.org/current/doxygen/deal.II/classTriaAccessor.html#a9cecb2b7c9a1644fb5fd44bbba40ab0c) for a single cell but I don't think such a function exists for the whole triangulation. 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.
Best, Daniel Best, Daniel Am Di., 2. Nov. 2021 um 05:16 Uhr schrieb vachanpo...@gmail.com < vachanpotluri1...@gmail.com>: > Dear all, > > Is there a built-in function to calculate centroid of the area spanned by > all the owned cells? I couldn't find any related function in GridTools. > Using a bounding box will not work in all cases for my problem. > > Thanking in anticipation > Vachan > > -- > 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 dealii+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dealii/9e76890d-412e-44f8-a3a7-70b55a566a29n%40googlegroups.com > <https://groups.google.com/d/msgid/dealii/9e76890d-412e-44f8-a3a7-70b55a566a29n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CAOYDWbJb2Sj31%3D2TvoT2QJB1NwbQe_7CKA-vECy2tVAVjc3KZw%40mail.gmail.com.