Skip to content

Commit

Permalink
fix(SciML): Make 3D compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
agdestein committed Jul 15, 2024
1 parent c640c2f commit 5bcd07e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/SciMLCompat/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ f = create_right_hand_side(setup, psolver)
f(stack(ustart), nothing, 0.0)

# Solve the ODE using SciML
prob = ODEProblem(f, stack(ustart), (0.0, 1))
prob = ODEProblem(f, stack(ustart), (0.0, 1.0))
sol = solve(
prob,
Tsit5();
Expand Down
2 changes: 1 addition & 1 deletion lib/SciMLCompat/src/SciMLCompat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ the OrdinaryDiffEq ODE solvers. Note that `u` has to be an array.
To convert the tuple `u = (ux, uy)` to an array, use `stack(u)`.
"""
create_right_hand_side(setup, psolver) = function right_hand_side(u, p, t)
u = eachslice(u; dims = 3)
u = eachslice(u; dims = ndims(u))
u = (u...,)
u = INS.apply_bc_u(u, t, setup)
F = INS.momentum(u, nothing, t, setup)
Expand Down

0 comments on commit 5bcd07e

Please sign in to comment.