diff --git a/meshmode/discretization/__init__.py b/meshmode/discretization/__init__.py index ec40883fdef28b8dc304df572036f0f4b1cd2490..6f388fdd6bdf5235c0f96796bd38404840a09e30 100644 --- a/meshmode/discretization/__init__.py +++ b/meshmode/discretization/__init__.py @@ -42,7 +42,14 @@ class ElementGroupBase(object): one :class:`meshmode.mesh.MeshElementGroup`. .. attribute :: mesh_el_group + .. attribute :: order .. attribute :: node_nr_base + + .. autoattribute:: nelements + .. autoattribute:: nunit_nodes + .. autoattribute:: nnodes + .. autoattribute:: dim + .. automethod:: view """ def __init__(self, mesh_el_group, order, node_nr_base): @@ -80,6 +87,11 @@ class ElementGroupBase(object): (-1, -1)) def view(self, global_array): + """Return a view of *global_array* of shape ``(..., nelements, + nunit_nodes)`` where *global_array* is of shape ``(..., nnodes)``, + where *nnodes* is the global (per-discretization) node count. + """ + return global_array[ ..., self.node_nr_base:self.node_nr_base + self.nnodes] \ .reshape(