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

Address comments from Matt's review

parent 2793de1c
No related branches found
No related tags found
No related merge requests found
......@@ -197,11 +197,9 @@ class Discretization(object):
.. automethod:: nodes()
.. method:: num_reference_derivative(queue, ref_axes, vec)
.. automethod:: num_reference_derivative
.. method:: quad_weights
A :class:`~meshmode.dof_array.DOFArray` with quadrature weights.
.. automethod:: quad_weights
"""
def __init__(self, actx: ArrayContext, mesh, group_factory,
......@@ -318,6 +316,8 @@ class Discretization(object):
@memoize_method
def quad_weights(self):
""":returns: A :class:`~meshmode.dof_array.DOFArray` with quadrature weights.
"""
actx = self._setup_actx
@memoize_in(actx, (Discretization, "quad_weights_prg"))
......
......@@ -187,7 +187,7 @@ def flatten_chained_connection(actx, connection):
If a large number of connections is chained, the number of groups and
batches can become very large.
:arg queue: An instance of :class:`pyopencl.CommandQueue`.
:arg actx: An instance of :class:`meshmode.array_contex.ArrayContext`.
:arg connection: An instance of
:class:`~meshmode.discretization.connection.DiscretizationConnection`.
:return: An instance of
......
......@@ -86,11 +86,9 @@ def _build_boundary_connection(actx, vol_discr, bdry_discr, connection_data,
InterpolationBatch(
from_group_index=igrp,
from_element_indices=actx.freeze(actx.from_numpy(
data.group_source_element_indices))
.with_queue(None),
data.group_source_element_indices)),
to_element_indices=actx.freeze(actx.from_numpy(
data.group_target_element_indices))
.with_queue(None),
data.group_target_element_indices)),
result_unit_nodes=result_unit_nodes,
to_element_face=face_id
))
......
......@@ -51,10 +51,15 @@ class DOFArray(np.ndarray):
:class:`~meshmode.discretization.Discretization`,
with one entry in the :class:`DOFArray` for each
:class:`~meshmode.discretization.ElementGroupBase`.
The arrays contained within a :class:`DOFArray`
are expected to be logically two-dimensional, with shape
``(nelements, nunit_dofs)``, using
:class:`~meshmode.discretization.ElementGroupBase.nelements`
and :class:`~meshmode.discretization.ElementGroupBase.nunit_dofs`.
It is derived from :class:`numpy.ndarray` with dtype object ("an object array").
The entries in this array are further arrays managed by :attr:`array_context`.
The main purpose of this class is to better describe the data structure,
One main purpose of this class is to describe the data structure,
i.e. when a :class:`DOFArray` occurs inside of further numpy object array,
the level representing the array of element groups can be recognized (by
people and programs).
......
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