Skip to content

Commit bd76e50

Browse files
PDE example works
1 parent 0b41991 commit bd76e50

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

src/domains.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export IntervalDomain, ProductDomain, , CircleDomain
2+
13
abstract type AbstractDomain{T,N} end
24

35
struct VarDomainPairing

src/equations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export Equation
1+
export Equation, ConstrainedEquation
22

33

44
"""

src/systems/pde/pdesystem.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export PDESystem
2+
13
struct PDESystem <: ModelingToolkit.AbstractSystem
24
eq
35
bcs

test/pde.jl

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@ domains = [t ∈ IntervalDomain(0.0,1.0),
1414

1515
pdesys = PDESystem(eq,bcs,domains,[t,x],[u])
1616
discretization = MOLFiniteDifference(0.1)
17-
prob = discretize(pdesys,discretization)
17+
prob = discretize(pdesys,discretization) # This gives an ODEProblem since it's time-dependent
1818

1919
using OrdinaryDiffEq
2020
sol = solve(prob,Tsit5(),saveat=0.1)
21-
22-
#=
23-
using Plots
24-
plot(prob.space,Array(prob.extrapolation*sol[1]))
25-
plot!(prob.space,Array(prob.extrapolation*sol[2]))
26-
plot!(prob.space,Array(prob.extrapolation*sol[3]))
27-
plot!(prob.space,Array(prob.extrapolation*sol[4]))
28-
=#

0 commit comments

Comments
 (0)