Hi John,

I also found these two functions. I am working on it ;-)
Thank you very much.

Cheers,
Xujun

On Fri, Oct 30, 2015 at 11:22 AM, John Peterson <[email protected]>
wrote:

>
>
> On Fri, Oct 30, 2015 at 9:50 AM, Xujun Zhao <[email protected]> wrote:
>
>> Hi all,
>>
>> I want to find the neighboring nodes that are connected with an specific
>> node i. Does libMesh have functions to do this? Thank you very much.
>
>
> Yes.
>
> // find_nodal_neighbors() needs a data structure which is prepared by
> another function
> std::vector<std::vector<const Elem*> > nodes_to_elem_map;
> MeshTools::build_nodes_to_elem_map(mesh, nodes_to_elem_map);
>
> // Then you can call (*node is a reference to the node whose neighbors you
> want):
> std::vector<const Node*> neighbors;
> MeshTools::find_nodal_neighbors(mesh, *node, nodes_to_elem_map, neighbors);
>
> --
> John
>
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to