Skip to content

Commit

Permalink
use banded matrix decomposition instead of dense LU for BBM-BBM (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranocha authored Feb 1, 2025
1 parent 1c6989a commit 3c3917e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/equations/bbm_bbm_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ function create_cache(mesh, equations::BBMBBMEquations1D,
N = nnodes(mesh)
M = mass_matrix(solver.D1)
Pd = BandedMatrix((-1 => fill(one(real(mesh)), N - 2),), (N, N - 2))
D2d = (sparse(solver.D2) * Pd)[2:(end - 1), :]
D2d = (BandedMatrix(solver.D2) * Pd)[2:(end - 1), :]
# homogeneous Dirichlet boundary conditions
invImD2d = lu(I - 1 / 6 * D2d * K_i)
m = diag(M)
Expand Down

0 comments on commit 3c3917e

Please sign in to comment.