Skip to content

Commit

Permalink
fix scale_by_mass_matrix!
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLampert committed Dec 11, 2024
1 parent 40f52cb commit f017619
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/equations/equations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ function solve_system_matrix!(dv, system_matrix, rhs,
if issuccess(factorization)
scale_by_mass_matrix!(rhs, D1)
# see https://github.com/JoshuaLampert/DispersiveShallowWater.jl/issues/122
dv .= factorization \ rhs
dv .= system_matrix \ rhs[2:(end - 1)]
else
# The factorization may fail if the time step is too large
# and h becomes negative.
Expand Down
2 changes: 1 addition & 1 deletion src/equations/svaerd_kalisch_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ function rhs!(dq, q, t, mesh, equations::SvaerdKalischEquations1D,
@trixi_timeit timer() "solving elliptic system" begin
tmp1 .= dv
solve_system_matrix!((@view dv[2:(end - 1)]), system_matrix,
(@view tmp1[2:(end - 1)]), equations, D1,
tmp1, equations, D1,
cache)
dv[1] = dv[end] = zero(eltype(dv))
end
Expand Down

0 comments on commit f017619

Please sign in to comment.