// Aux function to compute the diameter of an element scalar_type estimate_h(const mesh & mesh, const size_type i) { std::vector<size_type> cpt = mesh.ind_points_of_convex(i); std::vector<size_type>::const_iterator icpt, jcpt; scalar_type d=0.0; for (icpt = cpt.begin(); icpt != cpt.end(); icpt++ ) { for (jcpt = cpt.begin(); jcpt != cpt.end(); jcpt++ ) { d = std::max(d, gmm::vect_norm2(mesh.points()[*icpt]-mesh.points()[*jcpt])); } } return d; }