[deal.II] Re: nearest neighbor

2016-09-13 Thread Joel Davidsson
Thanks Daniel, I had confused the dof_index with the vertex_number. Now It works as expected. Best, Joel On Wednesday, September 7, 2016 at 3:47:21 PM UTC+2, Daniel Arndt wrote: > > Joel, > > In GridTools::find_cells_adjacent_to_vertex(dof_handler,center_id) you > need to give the number of

[deal.II] Re: nearest neighbor

2016-09-07 Thread Daniel Arndt
Joel, In GridTools::find_cells_adjacent_to_vertex(dof_handler,center_id) you need to give the number of the vertex_number as center_id, not the number of the degree of freedom. Then, you want to use Quadrature quadrature_formula(dof_handler.get_fe().get_unit_support_points()); to create a

[deal.II] Re: nearest neighbor

2016-09-01 Thread Jean-Paul Pelteret
Hi Joel, Do you mean the index to a vertex? And by nearest, do you mean the vertex that shares the shortest common edge with the specified vertex? If so, then no. But it shouldn't be hard to write such a function. You would need to find all cells that share the initial vertex (I believe this