Skip to content
Snippets Groups Projects
Commit 88506f31 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Connection applier: Do not assume one-to-one group mapping between 'from' and 'to'

parent 7bd4e678
Branches
Tags
No related merge requests found
...@@ -371,9 +371,11 @@ class DiscretizationConnection(object): ...@@ -371,9 +371,11 @@ class DiscretizationConnection(object):
if vec.shape != (self.from_discr.nnodes,): if vec.shape != (self.from_discr.nnodes,):
raise ValueError("invalid shape of incoming resampling data") raise ValueError("invalid shape of incoming resampling data")
for i_tgrp, (tgrp, sgrp, cgrp) in enumerate( for i_tgrp, (tgrp, cgrp) in enumerate(
zip(self.to_discr.groups, self.from_discr.groups, self.groups)): zip(self.to_discr.groups, self.groups)):
for i_batch, batch in enumerate(cgrp.batches): for i_batch, batch in enumerate(cgrp.batches):
sgrp = self.from_discr.groups[batch.from_group_index]
if not len(batch.from_element_indices): if not len(batch.from_element_indices):
continue continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment