h for distributed triangulations

21 views
Skip to first unread message

Michael Harmon

unread,
Feb 18, 2016, 5:59:36 PM2/18/16
to deal.II User Group
Hi,

I can GridTools::maximal_cell_diameter(triangulation) when the triangulation is distributed, but under global refinements the value stays the same.  Is there anyone else that has had this issue?

Thanks,

Mike

Wolfgang Bangerth

unread,
Feb 18, 2016, 6:06:28 PM2/18/16
to dea...@googlegroups.com
The function is not implemented for parallel triangulations right now.
It looks like this:


template <int dim, int spacedim>
double
maximal_cell_diameter (const Triangulation<dim, spacedim> &triangulation)
{
double max_diameter = triangulation.begin_active()->diameter();
for (typename Triangulation<dim, spacedim>::active_cell_iterator
cell = triangulation.begin_active(); cell != triangulation.end();
++cell)
max_diameter = std::max (max_diameter,
cell->diameter());
return max_diameter;
}

It needs to learn to ignore cells that are not locally owned, and if the
triangulation is a shared triangulation, to take the max over all
processors. Want to give it a try to write a patch in this direction?

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

Michael Harmon

unread,
Feb 19, 2016, 10:31:42 AM2/19/16
to deal.II User Group
Thanks for the reply.

I needed h for the penalty term in the LDG method and wasnt getting the correct convergence rates. I changed the fluxes to get the correct convergence rates, so its not as pressing, but I will still look into it!
Reply all
Reply to author
Forward
0 new messages