-
-
Notifications
You must be signed in to change notification settings - Fork 74
Automated MOL Discretizations #180
Comments
what type is pdesys.prob? when do we get down to the level of individual operators? |
There is no using ModelingToolkit, DiffEqOperators, DiffEqBase, LinearAlgebra
# Define some variables
@parameters t x
@variables u(..)
@derivatives Dt'~t
@derivatives Dxx''~x
eq = Dt(u(t,x)) ~ Dxx(u(t,x))
bcs = [u(0,x) ~ - x * (x-1) * sin(x),
u(t,0) ~ 0, u(t,1) ~ 0]
domains = [t ∈ IntervalDomain(0.0,1.0),
x ∈ IntervalDomain(0.0,1.0)]
pdesys = PDESystem(eq,bcs,domains,[t,x],[u]) so that's all symbolic. The next step discretization = MOLFiniteDifference(0.1)
prob = discretize(pdesys,discretization) # This gives an ODEProblem since it's time-dependent is supposed to take the symbolic problem description and then concretize it. That's why #179 is just a start: it doesn't do the full parsing so it's not entirely correct. This is all good: It looks at the domain information and then uses that to piece together the numerical form as a range. We should make it check the number of domains and use that to find the dimension, but first let's stick to 1+1 dimensional. We need some way to tell But once it does all of that parsing (correctly), then it goes, oh yeah, the way to solve this is by making an ODE defined by ..., which is So here it outputs an |
This is from SciML/DifferentialEquations.jl#469 . #179 now begins down this path, but it's hardcoded for a specific problem. Now we need to make it actually read the PDE description and build the right MOL discretization.
The text was updated successfully, but these errors were encountered: