From: John P. <jwp...@gm...> - 2020-03-13 15:10:01
|
On Thu, Mar 12, 2020 at 5:12 AM Nikhil Vaidya <nik...@gm...> 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 |