diff --git a/meshmode/discretization/connection/__init__.py b/meshmode/discretization/connection/__init__.py index ade9754d96b2da27ec07df863511f7bc5186b949..30e886eda68462ba6ecd0222e74c247f6279050c 100644 --- a/meshmode/discretization/connection/__init__.py +++ b/meshmode/discretization/connection/__init__.py @@ -383,19 +383,18 @@ class DirectDiscretizationConnection(DiscretizationConnection): for i_tgrp, (tgrp, cgrp) in enumerate( zip(self.to_discr.groups, self.groups)): for i_batch, batch in enumerate(cgrp.batches): - if len(batch.from_element_indices): - if not len(batch.from_element_indices): - continue + if not len(batch.from_element_indices): + continue - sgrp = self.from_discr.groups[batch.from_group_index] + sgrp = self.from_discr.groups[batch.from_group_index] - knl()(queue, - resample_mat=self._resample_matrix(i_tgrp, i_batch), - result=result, - itgt_base=tgrp.node_nr_base, - isrc_base=sgrp.node_nr_base, - from_element_indices=batch.from_element_indices, - to_element_indices=batch.to_element_indices) + knl()(queue, + resample_mat=self._resample_matrix(i_tgrp, i_batch), + result=result, + itgt_base=tgrp.node_nr_base, + isrc_base=sgrp.node_nr_base, + from_element_indices=batch.from_element_indices, + to_element_indices=batch.to_element_indices) return result