Skip to content

Commit 2ef770d

Browse files
committed
Nonlinear problem tests passing
1 parent 594171d commit 2ef770d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

test/components/DiscreteSpace.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ using ModelingToolkit, MethodOfLines, DomainSets, Test, Symbolics, SymbolicUtils
4949
@test s.axies[x] == s.grid[x]
5050
@test s.axies[y] == s.grid[y]
5151

52-
@test all([all(I[i] .∈ (collect(s.Igrid),)) for I in values(s.Iedge), i in [1,2]])
52+
@test all([all(I[i] .∈ (collect(s.Igrid),)) for I in values(s.Iedges), i in [1,2]])
5353

5454
@test s.Iaxies == s.Igrid
5555

@@ -101,7 +101,7 @@ end
101101
@test s.axies[x] != s.grid[x]
102102
@test s.axies[y] != s.grid[y]
103103

104-
@test all([all(I[i] .∈ (collect(s.Igrid),)) for I in values(s.Iedge), i in [1,2]])
104+
@test all([all(I[i] .∈ (collect(s.Igrid),)) for I in values(s.Iedges), i in [1,2]])
105105

106106
@test s.Iaxies != s.Igrid
107107

test/pde_systems/MOL_1D_PDAE.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ using ModelingToolkit: Differential
3737
# Method of lines discretization
3838
l = 20
3939
dx = range(0.0,1.0,length=l)
40+
dx_ = dx[2] - dx[1]
4041
order = 2
41-
discretization = MOLFiniteDifference([x=>dx],t)
42+
discretization = MOLFiniteDifference([x=>dx_],t)
4243

4344
# Convert the PDE problem into an ODE problem
4445
prob = discretize(pdesys,discretization)

test/pde_systems/MOL_NonlinearProblem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ end
102102
# test boundary
103103
@test all(abs.(u_sol[:,1]) .< eps(Float32))
104104
@test all(abs.(u_sol[1,:]) .< eps(Float32))
105-
@test u_sol[:,end] 0:dy:1.0
106-
@test u_sol[end,:] 0:dx:1.0
105+
@test u_sol[2:end-1,end] (0.0:dy:1.0)[2:end-1]
106+
@test u_sol[end,2:end-1] (0.0:dx:1.0)[2:end-1]
107107

108108
# test interior with finite differences
109109
interior = CartesianIndices((axes(xs)[1], axes(ys)[1]))[2:end-1,2:end-1]

0 commit comments

Comments
 (0)