5353 make_face_restriction
5454)
5555from meshmode .mesh import Mesh , BTAG_PARTITION
56+ from meshmode .discretization .connection import DiscretizationConnection
57+
58+ from typing import Dict
5659
5760from warnings import warn
5861
@@ -244,7 +247,7 @@ def _has_affine_groups(self):
244247 return any (
245248 megrp .is_affine
246249 and issubclass (megrp ._modepy_shape_cls , Simplex )
247- for megrp in self ._volume_discr . mesh .groups )
250+ for megrp in self ._mesh .groups )
248251
249252 @memoize_method
250253 def _base_to_geoderiv_connection (self , dd : DOFDesc ):
@@ -443,7 +446,7 @@ def _discr_tag_volume_discr(self, discretization_tag):
443446
444447 # Refuse to re-make the volume discretization
445448 if discretization_tag is DISCR_TAG_BASE :
446- return self ._volume_discr
449+ return self .discr_from_dd ( "vol" )
447450
448451 from meshmode .discretization import Discretization
449452 return Discretization (
@@ -715,7 +718,7 @@ def make_discretization_collection(
715718 # Define the base and modal discretization
716719 from meshmode .discretization import Discretization
717720
718- volume_discr = Discretization (
721+ base_discr = Discretization (
719722 array_context , mesh ,
720723 discr_tag_to_group_factory [DISCR_TAG_BASE ]
721724 )
@@ -725,13 +728,13 @@ def make_discretization_collection(
725728 discr_tag_to_group_factory [DISCR_TAG_MODAL ]
726729 )
727730
728- discr_from_dd = {DD_VOLUME : volume_discr ,
731+ discr_from_dd = {DD_VOLUME : base_discr ,
729732 DD_VOLUME_MODAL : modal_vol_discr }
730733
731734 # Define boundary connections
732735 dist_boundary_connections = set_up_distributed_communication (
733736 array_context , mesh ,
734- volume_discr ,
737+ base_discr ,
735738 discr_tag_to_group_factory , comm = mpi_communicator
736739 )
737740
@@ -747,12 +750,13 @@ def make_discretization_collection(
747750
748751def set_up_distributed_communication (
749752 array_context : ArrayContext , mesh : Mesh ,
750- volume_discr ,
751- discr_tag_to_group_factory , comm = None ) -> dict :
753+ base_discr ,
754+ discr_tag_to_group_factory ,
755+ comm = None ) -> Dict [int , DiscretizationConnection ]:
752756 """Constructs a mapping from parallel boundary partition and the relevant
753757 discretization connections to that boundary. Used for distributed runs.
754758
755- :arg volume_discr : A :class:`meshmode.discretization.Discretization`
759+ :arg base_discr : A :class:`meshmode.discretization.Discretization`
756760 object for the base (:class:`grudge.dof_desc.DISCR_TAG_BASE`)
757761 volume discretization.
758762 :arg discr_tag_to_group_factory: A mapping from discretization tags
@@ -784,7 +788,7 @@ def set_up_distributed_communication(
784788 to_dd = DOFDesc (BTAG_PARTITION (i_remote_part ), DISCR_TAG_BASE )
785789 local_boundary_connections [i_remote_part ] = \
786790 make_face_restriction (array_context ,
787- volume_discr ,
791+ base_discr ,
788792 grp_factory ,
789793 boundary_tag = to_dd .domain_tag .tag )
790794
0 commit comments