From 5af725a5da26d70cd7fa5818a9697847f009480e Mon Sep 17 00:00:00 2001 From: benSepanski Date: Thu, 30 Jul 2020 13:14:32 -0500 Subject: [PATCH] Removed extra definition of ElementGroupFactory from __init__.py --- meshmode/discretization/__init__.py | 24 ------------------- .../discretization/connection/refinement.py | 4 ++-- meshmode/discretization/poly_element.py | 4 ++++ 3 files changed, 6 insertions(+), 26 deletions(-) diff --git a/meshmode/discretization/__init__.py b/meshmode/discretization/__init__.py index 31f2deee..24ce02ca 100644 --- a/meshmode/discretization/__init__.py +++ b/meshmode/discretization/__init__.py @@ -32,7 +32,6 @@ from meshmode.dof_array import DOFArray as _DOFArray __doc__ = """ .. autoclass:: ElementGroupBase .. autoclass:: InterpolatoryElementGroupBase -.. autoclass:: ElementGroupFactory .. autoclass:: Discretization """ @@ -158,29 +157,6 @@ class InterpolatoryElementGroupBase(ElementGroupBase): # }}} -# {{{ group factories - -class ElementGroupFactory(object): - """ - .. function:: __call__(mesh_ele_group, node_nr_base) - """ - - -class OrderBasedGroupFactory(ElementGroupFactory): - def __init__(self, order): - self.order = order - - def __call__(self, mesh_el_group, node_nr_base): - if not isinstance(mesh_el_group, self.mesh_group_class): - raise TypeError("only mesh element groups of type '%s' " - "are supported" % self.mesh_group_class.__name__) - - return self.group_class(mesh_el_group, self.order, node_nr_base) - - -# }}} - - class Discretization(object): """An unstructured composite discretization. diff --git a/meshmode/discretization/connection/refinement.py b/meshmode/discretization/connection/refinement.py index 55026e59..7b1effaa 100644 --- a/meshmode/discretization/connection/refinement.py +++ b/meshmode/discretization/connection/refinement.py @@ -124,8 +124,8 @@ def make_refinement_connection(actx, refiner, coarse_discr, group_factory): with the mesh given to the refiner :arg group_factory: An instance of - :class:`meshmode.mesh.discretization.ElementGroupFactory`. Used for - discretizing the fine mesh. + :class:`meshmode.mesh.discretization.poly_element.ElementGroupFactory`. Used + for discretizing the fine mesh. """ from meshmode.discretization.connection import ( DiscretizationConnectionElementGroup, diff --git a/meshmode/discretization/poly_element.py b/meshmode/discretization/poly_element.py index d4d07ac4..f94e2970 100644 --- a/meshmode/discretization/poly_element.py +++ b/meshmode/discretization/poly_element.py @@ -48,6 +48,7 @@ Group types Group factories ^^^^^^^^^^^^^^^ +.. autoclass:: ElementGroupFactory .. autoclass:: InterpolatoryQuadratureSimplexGroupFactory .. autoclass:: QuadratureSimplexGroupFactory .. autoclass:: PolynomialWarpAndBlendGroupFactory @@ -365,6 +366,9 @@ class EquidistantTensorProductElementGroup( # {{{ group factories class ElementGroupFactory(object): + """ + .. function:: __call__(mesh_ele_group, node_nr_base) + """ pass -- GitLab