Skip to content
Snippets Groups Projects
Commit 5a11daf9 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Discretization docs

parent 82b61c7f
No related branches found
No related tags found
No related merge requests found
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment