On Wed, Oct 21, 2020 at 12:39 PM Laura Scarabosio <
laura.scarabo...@gmail.com> wrote:

> Hi,
>
> I would like to find the neighbors of a mesh element including those that
> share a vertex only with that element, not only those that share an edge
> with the element (so the method neighbor_ptr does not help). Is there a way
> to do this?
>

Hi Laura,

This information (point neighbors) isn't stored in the Mesh by default
since it isn't needed in most cases. You may want to look into calling

MeshTools::build_nodes_to_elem_map()

which builds a data structure which associates, to each Node, a vector of
connected Elem ids. It's a bit expensive to build this map, so best to do
it only once and then use it each time you need to find a point neighbor.

-- 
John

_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to