diff --git a/src/equations/equations.jl b/src/equations/equations.jl index 85e098ef..1fe16d5f 100644 --- a/src/equations/equations.jl +++ b/src/equations/equations.jl @@ -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. diff --git a/src/equations/svaerd_kalisch_1d.jl b/src/equations/svaerd_kalisch_1d.jl index a8e2ecfd..054b60fb 100644 --- a/src/equations/svaerd_kalisch_1d.jl +++ b/src/equations/svaerd_kalisch_1d.jl @@ -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