diff --git a/doc/conf.py b/doc/conf.py index ac63d6cbeaf793d197dbfc821de4ffce568d4587..866653625acb09a79319be6bec7c07872081f38f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -274,8 +274,11 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False - intersphinx_mapping = { 'http://docs.python.org/': None, - 'https://documen.tician.de/pyopencl': None + 'http://docs.scipy.org/doc/numpy/': None, + 'https://documen.tician.de/pyopencl': None, + 'https://documen.tician.de/meshpy': None, + 'https://documen.tician.de/modepy': None, + 'https://documen.tician.de/loopy': None } diff --git a/meshmode/mesh/__init__.py b/meshmode/mesh/__init__.py index 211e764c87b95310d5b68995677f0d958a8c9550..95416568b8023d92fa2c0a688e88e82dcf6ef728 100644 --- a/meshmode/mesh/__init__.py +++ b/meshmode/mesh/__init__.py @@ -42,6 +42,7 @@ __doc__ = """ .. autoclass:: NodalAdjacency .. autoclass:: FacialAdjacencyGroup +.. autoclass:: InterPartitionAdjacencyGroup .. autofunction:: as_python .. autofunction:: check_bc_coverage @@ -68,22 +69,22 @@ class BTAG_NONE(object): # noqa class BTAG_ALL(object): # noqa """A boundary tag representing the entire boundary or volume. - In the case of the boundary, TAG_ALL does not include rank boundaries, - or, more generally, anything tagged with TAG_NO_BOUNDARY.""" + In the case of the boundary, :class:`BTAG_ALL` does not include rank boundaries, + or, more generally, anything tagged with :class:`BTAG_NO_BOUNDARY`.""" pass class BTAG_REALLY_ALL(object): # noqa """A boundary tag representing the entire boundary. - Unlike :class:`TAG_ALL`, this includes rank boundaries, - or, more generally, everything tagged with :class:`TAG_NO_BOUNDARY`.""" + Unlike :class:`BTAG_ALL`, this includes rank boundaries, + or, more generally, everything tagged with :class:`BTAG_NO_BOUNDARY`.""" pass class BTAG_NO_BOUNDARY(object): # noqa """A boundary tag indicating that this edge should not fall under - :class:`TAG_ALL`. Among other things, this is used to keep rank boundaries + :class:`BTAG_ALL`. Among other things, this is used to keep rank boundaries out of :class:`BTAG_ALL`. """ pass @@ -171,7 +172,7 @@ class MeshElementGroup(Record): element_nr_base=None, node_nr_base=None, unit_nodes=None, dim=None): """ - :arg order: the mamximum total degree used for interpolation. + :arg order: the maximum total degree used for interpolation. :arg nodes: ``[ambient_dim, nelements, nunit_nodes]`` The nodes are assumed to be mapped versions of *unit_nodes*. :arg unit_nodes: ``[dim, nunit_nodes]`` @@ -263,7 +264,7 @@ class SimplexElementGroup(MeshElementGroup): element_nr_base=None, node_nr_base=None, unit_nodes=None, dim=None): """ - :arg order: the mamximum total degree used for interpolation. + :arg order: the maximum total degree used for interpolation. :arg nodes: ``[ambient_dim, nelements, nunit_nodes]`` The nodes are assumed to be mapped versions of *unit_nodes*. :arg unit_nodes: ``[dim, nunit_nodes]`` @@ -339,7 +340,7 @@ class TensorProductElementGroup(MeshElementGroup): element_nr_base=None, node_nr_base=None, unit_nodes=None): """ - :arg order: the mamximum total degree used for interpolation. + :arg order: the maximum total degree used for interpolation. :arg nodes: ``[ambient_dim, nelements, nunit_nodes]`` The nodes are assumed to be mapped versions of *unit_nodes*. :arg unit_nodes: ``[dim, nunit_nodes]`` @@ -594,7 +595,7 @@ class Mesh(Record): the set of facial adjacency relations between group *igrp* and *ineighbor_group*. *ineighbor_group* and *igrp* may be identical, or *ineighbor_group* may be *None*, in which case - an :class:``InterPartitionAdjacency`` group containing boundary + an :class:`InterPartitionAdjacencyGroup` group containing boundary faces is returned. Referencing this attribute may raise @@ -855,8 +856,8 @@ class Mesh(Record): return self._nodal_adjacency def nodal_adjacency_init_arg(self): - """Returns an 'nodal_adjacency' argument that can be - passed to a Mesh constructor. + """Returns a *nodal_adjacency* argument that can be + passed to a :class:`Mesh` constructor. """ return self._nodal_adjacency diff --git a/meshmode/mesh/generation.py b/meshmode/mesh/generation.py index 92c49b7d0e6183da5375b79a53daab261dc2f540..be14cfb9401fe4cbbd3d7afb905d4e89d83f1526 100644 --- a/meshmode/mesh/generation.py +++ b/meshmode/mesh/generation.py @@ -577,12 +577,12 @@ def refine_mesh_and_get_urchin_warper(order, m, n, est_rel_interp_tolerance, min_rad=0.2, uniform_refinement_rounds=0): """ :returns: a tuple ``(refiner, warp_mesh)``, where *refiner* is - a :class:`meshmode.refinement.Refiner` (from which the unwarped mesh + a :class:`~meshmode.mesh.refinement.Refiner` (from which the unwarped mesh may be obtained), and whose - :meth:`meshmode.refinement.Refiner.get_current_mesh` returns a - locally-refined :class:`meshmode.mesh.Mesh` of a sphere and *warp_mesh* + :meth:`~meshmode.mesh.refinement.Refiner.get_current_mesh` returns a + locally-refined :class:`~meshmode.mesh.Mesh` of a sphere and *warp_mesh* is a callable taking and returning a mesh that warps the unwarped mesh - into a smooth shape govered by a spherical harmonic of order *(m, n)*. + into a smooth shape covered by a spherical harmonic of order *(m, n)*. :arg order: the polynomial order of the returned mesh :arg est_rel_interp_tolerance: a tolerance for the relative interpolation error estimates on the warped version of the mesh. @@ -654,7 +654,7 @@ def refine_mesh_and_get_urchin_warper(order, m, n, est_rel_interp_tolerance, def generate_urchin(order, m, n, est_rel_interp_tolerance, min_rad=0.2): """ - :returns: a refined :class:`meshmode.mesh.Mesh` of a smooth shape govered + :returns: a refined :class:`~meshmode.mesh.Mesh` of a smooth shape covered by a spherical harmonic of order *(m, n)*. :arg order: the polynomial order of the returned mesh :arg est_rel_interp_tolerance: a tolerance for the relative @@ -851,14 +851,14 @@ def generate_warped_rect_mesh(dim, order, n): @log_process(logger) def warp_and_refine_until_resolved( unwarped_mesh_or_refiner, warp_callable, est_rel_interp_tolerance): - """Given an original ("un-warped") :class:`meshmode.mesh.Mesh` and a + """Given an original ("unwarped") :class:`meshmode.mesh.Mesh` and a warping function *warp_callable* that takes and returns a mesh and a tolerance to which the mesh should be resolved by the mapping polynomials, this function will iteratively refine the *unwarped_mesh* until relative interpolation error estimates on the warped version are smaller than *est_rel_interp_tolerance* on each element. - :returns: The refined, un-warped mesh. + :returns: The refined, unwarped mesh. .. versionadded:: 2018.1 """ diff --git a/meshmode/mesh/io.py b/meshmode/mesh/io.py index de21ddfbfe08c964b6dbc242fad7386694493ae8..30c3fcbfd45037c11684a9cb3329108f1c44be9b 100644 --- a/meshmode/mesh/io.py +++ b/meshmode/mesh/io.py @@ -298,7 +298,7 @@ def generate_gmsh(source, dimensions=None, order=None, other_options=[], :arg source: an instance of either :class:`FileSource` or :class:`LiteralSource` - :arg force_ambient_dim: if not None, truncate point coordinates to + :arg force_ambient_dim: if not *None*, truncate point coordinates to this many dimensions. :arg mesh_construction_kwargs: *None* or a dictionary of keyword arguments passed to the :class:`meshmode.mesh.Mesh` constructor. @@ -349,7 +349,7 @@ def generate_gmsh(source, dimensions=None, order=None, other_options=[], def from_meshpy(mesh_info, order=1): """Imports a mesh from a :mod:`meshpy` *mesh_info* data structure, which may be generated by either :mod:`meshpy.triangle` or - :mod:`meshpy_tet`. + :mod:`meshpy.tet`. """ from meshmode.mesh import Mesh from meshmode.mesh.generation import make_group_from_vertices @@ -407,7 +407,7 @@ def from_vertices_and_simplices(vertices, simplices, order=1, fix_orientation=Fa def to_json(mesh): """Return a JSON-able Python data structure for *mesh*. The structure directly - reflects the :class:`Mesh` data structure.""" + reflects the :class:`meshmode.mesh.Mesh` data structure.""" def btag_to_json(btag): if isinstance(btag, str): diff --git a/meshmode/mesh/processing.py b/meshmode/mesh/processing.py index 9cb71a1a501f2e79d94e9c09a7ef6847b5b621f7..97b9bbda9c99fd0dc1f537e6cbbbaf043bc6140c 100644 --- a/meshmode/mesh/processing.py +++ b/meshmode/mesh/processing.py @@ -44,11 +44,11 @@ __doc__ = """ def find_group_indices(groups, meshwide_elems): """ - :arg groups: A list of :class:``MeshElementGroup`` instances that contain - ``meshwide_elems``. - :arg meshwide_elems: A :class:``numpy.ndarray`` of mesh-wide element numbers + :arg groups: A list of :class:`~meshmode.mesh.MeshElementGroup` instances + that contain *meshwide_elems*. + :arg meshwide_elems: A :class:`numpy.ndarray` of mesh-wide element numbers. Usually computed by ``elem + element_nr_base``. - :returns: A :class:``numpy.ndarray`` of group numbers that ``meshwide_elem`` + :returns: A :class:`numpy.ndarray` of group numbers that *meshwide_elem* belongs to. """ grps = np.zeros_like(meshwide_elems) @@ -63,14 +63,14 @@ def find_group_indices(groups, meshwide_elems): def partition_mesh(mesh, part_per_element, part_num): """ - :arg mesh: A :class:`meshmode.mesh.Mesh` to be partitioned. + :arg mesh: A :class:`~meshmode.mesh.Mesh` to be partitioned. :arg part_per_element: A :class:`numpy.ndarray` containing one integer per element of *mesh* indicating which part of the partitioned mesh the element is to become a part of. :arg part_num: The part number of the mesh to return. :returns: A tuple ``(part_mesh, part_to_global)``, where *part_mesh* - is a :class:`meshmode.mesh.Mesh` that is a partition of mesh, and + is a :class:`~meshmode.mesh.Mesh` that is a partition of mesh, and *part_to_global* is a :class:`numpy.ndarray` mapping element numbers on *part_mesh* to ones in *mesh*. @@ -321,7 +321,7 @@ def find_volume_mesh_element_orientations(mesh, tolerate_unimplemented_checks=Fa each negatively oriented element. :arg tolerate_unimplemented_checks: If *True*, elements for which no - check is available will return NaN. + check is available will return *NaN*. """ result = np.empty(mesh.nelements, dtype=np.float64) @@ -414,7 +414,8 @@ def flip_simplex_element_group(vertices, grp, grp_flip_flags): def perform_flips(mesh, flip_flags, skip_tests=False): """ - :arg flip_flags: A :class:`numpy.ndarray` with *mesh.nelements* entries + :arg flip_flags: A :class:`numpy.ndarray` with + :attr:`meshmode.mesh.Mesh.nelements` entries indicating by their Boolean value whether the element is to be flipped. """