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

Demo error #161

Closed
henry2004y opened this issue Aug 29, 2019 · 3 comments
Closed

Demo error #161

henry2004y opened this issue Aug 29, 2019 · 3 comments

Comments

@henry2004y
Copy link

henry2004y commented Aug 29, 2019

Hi,

I just found this package and was trying to run some simple demos. However, for the simple code I found on discourse below, it just returned error:

using DiffEqOperators

deriv = 2 # 2nd order derivative.
order = 2 # 2nd order approximation.
N  = 100  # Number of grid points.
xs = range(0,stop=2π,length=N)
dx = xs[2] - xs[1] 
#
# Use Delta to denote the Laplace operator.
#
Δ = DerivativeOperator{Float64}(deriv,order,dx,N,:Dirichlet0,:Dirichlet0)

ERROR: MethodError: no method matching DerivativeOperator{Float64,N,Wind,T2,S1,S2,T3,F} where F where T3 where S2<:(StaticArrays.SArray{Tuple{S},T,1,S} where T where S) where S1 where T2 where Wind where N(::Int64, ::Int64, ::Float64, ::Int64, ::Symbol, ::Symbol)

The same issue happened with the demo code in GSoC 2017: Efficient Discretizations of PDE Operators.

I was trying with both Julia 1.1 and Julia 1.2

@ChrisRackauckas
Copy link
Member

That syntax is not up to date. Please see the README. A lot has changed since the alpha version.

@henry2004y
Copy link
Author

Is there an equivalent expression for the old DerivativeOperator where central difference is performed in the interior while one-sided difference is performed on the sides?

@ChrisRackauckas
Copy link
Member

Yes, just DerivativeOperator with Neumann.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants