From 2497ac5fff20ebd451b880ea5b358de63b64595a Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Thu, 2 Nov 2017 11:49:54 -0500 Subject: [PATCH 1/3] Document the parameters to Discretization (thanks to Li Lu for pointing this out). --- doc/conf.py | 6 ++++-- meshmode/discretization/__init__.py | 21 +++++++++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 1e5a0227..ac63d6cb 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -275,5 +275,7 @@ texinfo_documents = [ #texinfo_no_detailmenu = False -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'http://docs.python.org/': None} +intersphinx_mapping = { + 'http://docs.python.org/': None, + 'https://documen.tician.de/pyopencl': None +} diff --git a/meshmode/discretization/__init__.py b/meshmode/discretization/__init__.py index 6ff44165..aadf6d31 100644 --- a/meshmode/discretization/__init__.py +++ b/meshmode/discretization/__init__.py @@ -68,12 +68,12 @@ class ElementGroupBase(object): .. method:: grad_basis() - :returns: a :class:`tuple` of functions, each of which - accepts arrays of shape *(dims, npts)* - and returns a :class:`tuple` of length *dims* containing - the derivatives along each axis as an array of size *npts*. - 'Scalar' evaluation, by passing just one vector of length *dims*, - is also supported. + :returns: a :class:`tuple` of functions, each of which + accepts arrays of shape *(dims, npts)* and returns a + :class:`tuple` of length *dims* containing the + derivatives along each axis as an array of size + *npts*. 'Scalar' evaluation, by passing just one + vector of length *dims*, is also supported. .. method:: diff_matrices() @@ -86,6 +86,7 @@ class ElementGroupBase(object): Returns an array of length :attr:`nunit_nodes` containing quadrature weights. + """ def __init__(self, mesh_el_group, order, node_nr_base): @@ -162,6 +163,13 @@ class OrderBasedGroupFactory(ElementGroupFactory): class Discretization(object): """An unstructured composite discretization. + :param cl_ctx: A :class:`pyopencl.Context` + :param mesh: A :class:`meshmode.mesh.Mesh` over which the discretization is + built + :param group_factory: An :class:`ElementGroupFactory` + :param real_dtype: The :mod:`numpy` data type used for representing real + data, either :class:`numpy.float32` or :class:`numpy.float64` + .. attribute:: real_dtype .. attribute:: complex_dtype @@ -189,6 +197,7 @@ class Discretization(object): .. method:: quad_weights(queue) shape: ``(nnodes)`` + """ def __init__(self, cl_ctx, mesh, group_factory, real_dtype=np.float64): -- GitLab From f0f7d99099f200ab1407fb1b4294bc5e1504a09b Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Thu, 2 Nov 2017 11:50:33 -0500 Subject: [PATCH 2/3] Fix a warning in doc generation. --- meshmode/discretization/connection/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshmode/discretization/connection/__init__.py b/meshmode/discretization/connection/__init__.py index 8e217d13..4a56722f 100644 --- a/meshmode/discretization/connection/__init__.py +++ b/meshmode/discretization/connection/__init__.py @@ -60,8 +60,9 @@ __doc__ = """ .. autofunction:: make_same_mesh_connection -.. autofunction:: FRESTR_INTERIOR_FACES -.. autofunction:: FRESTR_ALL_FACES +.. autodata:: FRESTR_INTERIOR_FACES +.. autodata:: FRESTR_ALL_FACES + .. autofunction:: make_face_restriction .. autofunction:: make_face_to_all_faces_embedding -- GitLab From 72fc468d43b741f80f1c62210bf1f2a3a64c9d65 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Thu, 2 Nov 2017 12:52:16 -0400 Subject: [PATCH 3/3] Undo some whitespace changes --- meshmode/discretization/__init__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/meshmode/discretization/__init__.py b/meshmode/discretization/__init__.py index aadf6d31..db3712dd 100644 --- a/meshmode/discretization/__init__.py +++ b/meshmode/discretization/__init__.py @@ -86,7 +86,6 @@ class ElementGroupBase(object): Returns an array of length :attr:`nunit_nodes` containing quadrature weights. - """ def __init__(self, mesh_el_group, order, node_nr_base): @@ -197,7 +196,6 @@ class Discretization(object): .. method:: quad_weights(queue) shape: ``(nnodes)`` - """ def __init__(self, cl_ctx, mesh, group_factory, real_dtype=np.float64): -- GitLab