PDE Errors

Awesome! That makes sense for the rectangular case. It seems generalizing to other shapes is making some substantial progress too. I’ve implemented this fix

m = 5.0
x_min, x_max = 0.0, 5.0
y_min, y_max = 0.0, 3.0

@parameters t x y
@variables u(..)
Dt  = Differential(t)
Dxx = Differential(x)^2
Dyy = Differential(y)^2

eq = 1im * m * Dt(u(t,x,y)) ~ -Dxx(u(t, x, y)) - Dyy(u(t,x,y))

bcs = vcat([u(t,x_min,y) ~ 0.0,
            u(t,x_max,y) ~ 0.0,
            u(t,x,y_min) ~ 0.0,
            u(t,x,y_max) ~ 0.0], 
            u(0.0, x, y) ~ (3*cos(x+y) + 3im*sin(x+y)) * exp(-2.0 * (x^2 + y^2)))

domains = [t ∈ IntervalDomain(0.0, 15.0),
           x ∈ IntervalDomain(x_min,  x_max),
           y ∈ IntervalDomain(y_min,  y_max)]

pdesys = PDESystem(eq, bcs, domains, [t, x, y], [u(t, x, y)])

dx = 0.01
dy = 0.01
discretization = MOLFiniteDifference([x=>dx,y=>dy],t)

prob = discretize(pdesys, discretization)
sol = solve(prob,Tsit5())

but the bug still persists


MethodError: no method matching operation(::Int64)
Closest candidates are:
  operation(::Term) at /home/gmf/.julia/packages/SymbolicUtils/9ScfD/src/types.jl:343
  operation(::SymbolicUtils.Add) at /home/gmf/.julia/packages/SymbolicUtils/9ScfD/src/types.jl:605
  operation(::SymbolicUtils.Mul) at /home/gmf/.julia/packages/SymbolicUtils/9ScfD/src/types.jl:748
  ...

Stacktrace:
 [1] symbolic_discretize(pdesys::PDESystem, discretization::MOLFiniteDifference{Vector{Pair{Num, Float64}}, Num})
   @ DiffEqOperators ~/.julia/packages/DiffEqOperators/Fmo6r/src/MOLFiniteDifference/MOL_discretization.jl:80
 [2] discretize(pdesys::PDESystem, discretization::MOLFiniteDifference{Vector{Pair{Num, Float64}}, Num})
   @ DiffEqOperators ~/.julia/packages/DiffEqOperators/Fmo6r/src/MOLFiniteDifference/MOL_discretization.jl:152
 [3] top-level scope
   @ In[7]:29

The other bug appears to be gone, but it seems there’s something wrong with the t = 0 boundary condition. Thanks again!