Skip to content

Commit 123aff7

Browse files
authored
fixed few more CI issues (#5156)
1 parent 37eab7e commit 123aff7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/pybamm/spatial_methods/scikit_finite_element_3d.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -661,22 +661,22 @@ def process_binary_operators(self, bin_op, left, right, disc_left, disc_right):
661661
isinstance(disc_left, pybamm.Concatenation)
662662
and disc_left.concatenation_function is None
663663
):
664-
new_disc_left = pybamm.Concatenation(
665-
*disc_left.children, concat_fun=np.hstack
666-
)
667-
new_disc_left.copy_domains(disc_left)
668-
disc_left = new_disc_left
669-
664+
target_domain = bin_op.domain
665+
new_children = [
666+
pybamm.PrimaryBroadcast(child, target_domain)
667+
for child in disc_left.children
668+
]
669+
disc_left = pybamm.Concatenation(*new_children, concat_fun=np.hstack)
670670
if (
671671
isinstance(disc_right, pybamm.Concatenation)
672672
and disc_right.concatenation_function is None
673673
):
674-
new_disc_right = pybamm.Concatenation(
675-
*disc_right.children, concat_fun=np.hstack
676-
)
677-
new_disc_right.copy_domains(disc_right)
678-
disc_right = new_disc_right
679-
674+
target_domain = bin_op.domain
675+
new_children = [
676+
pybamm.PrimaryBroadcast(child, target_domain)
677+
for child in disc_right.children
678+
]
679+
disc_right = pybamm.Concatenation(*new_children, concat_fun=np.hstack)
680680
return super().process_binary_operators(
681681
bin_op, left, right, disc_left, disc_right
682682
)

0 commit comments

Comments
 (0)