Skip to content

Commit 66be884

Browse files
committed
added info link
1 parent 75180f0 commit 66be884

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

examples/kdv_1d/kdv_1d_narrow_stencil.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@ mesh = Mesh1D(coordinates_min, coordinates_max, N)
1919
# using a narrow stencil third derivative operator is significantly faster than using
2020
# the upwind operator for the third derivative for a given N. However there are considerably more oscillations.
2121
# This can be improved by increasing N, which in fact leads to it being slower again.
22+
# see: https://github.com/NumericalMathematics/DispersiveShallowWater.jl/pull/198#discussion_r2093451059
2223
# TODO: This text maybe in the docs somewhere?
2324
accuracy_order = 4
2425
solver = Solver(mesh, accuracy_order)
2526

27+
D1_upwind = upwind_operators(periodic_derivative_operator;
28+
derivative_order = 1, accuracy_order = 3,
29+
xmin = xmin(mesh), xmax = xmax(mesh),
30+
N = nnodes(mesh))
31+
solver = Solver(D1_upwind)
32+
2633
semi = Semidiscretization(mesh, equations, initial_condition, solver,
2734
boundary_conditions = boundary_conditions)
2835

0 commit comments

Comments
 (0)