On Thu, Mar 12, 2020 at 5:12 AM Nikhil Vaidya <nikhilvaidy...@gmail.com> wrote:
> Hello, > > Does the libmesh MeshBase class provide a way to find out to which > subdomain(s) a particular node belongs? I looked through the documentation, > but couldn't find a function doing this. > Hi Nikhil, Nodes don't belong to a single subdomain in general, so this information is not stored anywhere. You could get the set of all Elems which are "connected" to a given node (see: build_nodes_to_elem_map() in mesh_tools.h), and then use a heuristic, e.g. the minimum connected Elem subdomain id, to "choose" a subdomain for a Node. You could then store this information as an "extra_node_integer" (see MeshBase::add_node_integer() in mesh_base.h) if desired. -- John _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users