def boundary_nodes(self, V, sub_domain): if sub_domain in ["bottom", "top"]: if not V.extruded: raise ValueError("Invalid subdomain '%s' for non-extruded mesh", sub_domain) entity_dofs = eutils.flat_entity_dofs(V.finat_element.entity_dofs()) key = (entity_dofs_key(entity_dofs), sub_domain) return get_top_bottom_boundary_nodes(V.mesh(), key, V) else: if sub_domain == "on_boundary": sdkey = sub_domain else: sdkey = as_tuple(sub_domain) key = (entity_dofs_key(V.finat_element.entity_dofs()), sdkey) return get_facet_closure_nodes(V.mesh(), key, V)
def boundary_nodes(self, V, sub_domain, method): if method not in {"topological", "geometric"}: raise ValueError("Don't know how to extract nodes with method '%s'", method) if sub_domain in ["bottom", "top"]: if not V.extruded: raise ValueError("Invalid subdomain '%s' for non-extruded mesh", sub_domain) entity_dofs = eutils.flat_entity_dofs(V.finat_element.entity_dofs()) key = (entity_dofs_key(entity_dofs), sub_domain, method) return get_top_bottom_boundary_nodes(V.mesh(), key, V) else: if sub_domain == "on_boundary": sdkey = sub_domain else: sdkey = as_tuple(sub_domain) key = (entity_dofs_key(V.finat_element.entity_dofs()), sdkey, method) return get_boundary_nodes(V.mesh(), key, V)