From 91f2b9e73b3282e5625f4dce0deb7e3cd145fa86 Mon Sep 17 00:00:00 2001 From: Jake Bowhay Date: Fri, 23 May 2025 10:41:39 +0100 Subject: [PATCH] pass the order variable to MOLFiniteDifference --- docs/src/tutorials/PIDE.md | 2 +- docs/src/tutorials/heat.md | 6 +++--- docs/src/tutorials/sispde.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/src/tutorials/PIDE.md b/docs/src/tutorials/PIDE.md index c784a6bd1..3d775b37e 100644 --- a/docs/src/tutorials/PIDE.md +++ b/docs/src/tutorials/PIDE.md @@ -49,7 +49,7 @@ domains = [t ∈ Interval(0.0, 2.0), x ∈ Interval(xmin, xmax)] @named pde_system = PDESystem(eq, bcs, domains, [t, x], [u(t, x), cumuSum(t, x)]) order = 2 -discretization = MOLFiniteDifference([x => 30], t) +discretization = MOLFiniteDifference([x => 30], t, approx_order = order) prob = MethodOfLines.discretize(pde_system, discretization) sol = solve(prob, QNDF(), saveat = 0.1); diff --git a/docs/src/tutorials/heat.md b/docs/src/tutorials/heat.md index 1683806ec..5f888623d 100644 --- a/docs/src/tutorials/heat.md +++ b/docs/src/tutorials/heat.md @@ -31,7 +31,7 @@ domains = [t ∈ Interval(0.0, 1.0), # Method of lines discretization dx = 0.1 order = 2 -discretization = MOLFiniteDifference([x => dx], t) +discretization = MOLFiniteDifference([x => dx], t, approx_order = order) # Convert the PDE problem into an ODE problem prob = discretize(pdesys, discretization) @@ -87,7 +87,7 @@ domains = [t ∈ Interval(0.0, 1.0), # Need a small dx here for accuracy dx = 0.01 order = 2 -discretization = MOLFiniteDifference([x => dx], t) +discretization = MOLFiniteDifference([x => dx], t, approx_order = order) # Convert the PDE problem into an ODE problem prob = discretize(pdesys, discretization) @@ -144,7 +144,7 @@ domains = [t ∈ Interval(0.0, 1.0), # Need a small dx here for accuracy dx = 0.05 order = 2 -discretization = MOLFiniteDifference([x => dx], t) +discretization = MOLFiniteDifference([x => dx], t, approx_order = order) # Convert the PDE problem into an ODE problem prob = discretize(pdesys, discretization) diff --git a/docs/src/tutorials/sispde.md b/docs/src/tutorials/sispde.md index e633f7b83..4bc6014c9 100644 --- a/docs/src/tutorials/sispde.md +++ b/docs/src/tutorials/sispde.md @@ -75,7 +75,7 @@ domains = [t ∈ Interval(0.0, 10.0), # Need a small dx here for accuracy dx = 0.01 order = 2 -discretization = MOLFiniteDifference([x => dx], t) +discretization = MOLFiniteDifference([x => dx], t, approx_order = order) # Convert the PDE problem into an ODE problem prob = discretize(pdesys, discretization);