Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit 5d926a4

Browse files
get it working
1 parent 119fb1d commit 5d926a4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/DiffEqOperators.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ using DiffEqBase, StaticArrays, LinearAlgebra
55
import LinearAlgebra: mul!, ldiv!, lmul!, rmul!, axpy!, opnorm, factorize, I
66
import DiffEqBase: AbstractDiffEqLinearOperator, update_coefficients!, is_constant
77
using SparseArrays, ForwardDiff, BandedMatrices, NNlib, LazyArrays, BlockBandedMatrices
8+
using ModelingToolkit
89

910
abstract type AbstractDerivativeOperator{T} <: AbstractDiffEqLinearOperator{T} end
1011
abstract type AbstractDiffEqCompositeOperator{T} <: AbstractDiffEqLinearOperator{T} end

src/MOL_discretization.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ struct MOLFiniteDifference{T} <: DiffEqBase.AbstractDiscretization
44
end
55
MOLFiniteDifference(args...;order=2) = MOLFiniteDifference(args,order)
66

7-
function discretize(pdesys::PDESystem,discretization::MOLFiniteDifference)
7+
function DiffEqBase.discretize(pdesys::PDESystem,discretization::MOLFiniteDifference)
88
tdomain = pdesys.domain[1].domain
99
domain = pdesys.domain[2].domain
1010
@assert domain isa IntervalDomain
@@ -13,7 +13,7 @@ function discretize(pdesys::PDESystem,discretization::MOLFiniteDifference)
1313
interior = domain.lower+dx:dx:domain.upper-dx
1414
X = domain.lower:dx:domain.upper
1515
L = CenteredDifference(2,2,dx,Int(len/dx)-2)
16-
Q = DiffEqOperators.DirichletBC([0.0,0.0],[1.0,1.0])
16+
Q = DirichletBC(0.0,0.0)
1717
function f(du,u,p,t)
1818
mul!(du,L,Array(Q*u))
1919
end

0 commit comments

Comments
 (0)