Skip to content

Commit

Permalink
#1429 another test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinsulzer committed Mar 18, 2021
1 parent e29986b commit b7c0e1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 6 additions & 6 deletions pybamm/expression_tree/binary_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,16 +700,16 @@ def simplified_binary_broadcast_concatenation(left, right, operator):
for child in left.children
):
if right.evaluates_to_constant_number():
return pybamm.concatenation(
*[operator(child, right) for child in left.orphans]
return left._concatenation_new_copy(
[operator(child, right) for child in left.orphans]
)
elif (
isinstance(right, pybamm.Concatenation)
and all(child.is_constant() for child in left.children)
and all(child.is_constant() for child in right.children)
):
return pybamm.concatenation(
*[
return left._concatenation_new_copy(
[
operator(left_child, right_child)
for left_child, right_child in zip(left.orphans, right.orphans)
]
Expand All @@ -719,8 +719,8 @@ def simplified_binary_broadcast_concatenation(left, right, operator):
for child in right.children
):
if left.evaluates_to_constant_number():
return pybamm.concatenation(
*[operator(left, child) for child in right.orphans]
return right._concatenation_new_copy(
[operator(left, child) for child in right.orphans]
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def test_external_temperature(self):
external_variables = {"Cell temperature": T}
sim.step(dt, external_variables=external_variables)

@unittest.skipIf(not pybamm.have_idaklu(), "idaklu solver is not installed")
def test_dae_external_temperature(self):

model_options = {"thermal": "x-full", "external submodels": ["thermal"]}
Expand All @@ -74,7 +73,7 @@ def test_dae_external_temperature(self):
pybamm.standard_spatial_vars.r_p: 5,
}

solver = pybamm.IDAKLUSolver()
solver = pybamm.CasadiSolver()
sim = pybamm.Simulation(model, var_pts=var_pts, solver=solver)
sim.build()

Expand Down

0 comments on commit b7c0e1f

Please sign in to comment.