Skip to content

Unknown epsilon keyword in WENOScheme() #472

@hurak

Description

@hurak

I am trying to solve a simple linear advection equation and I am trying to use the WENOScheme as proposed at https://docs.sciml.ai/MethodOfLines/stable/advection_schemes/. I copy and paste the form using the epsilon keyword as in

julia> discretization = MOLFiniteDifference([x => Δx], t, advection_scheme = WENOScheme(epsilon=1e-6))
ERROR: MethodError: no method matching WENOScheme(; epsilon::Float64)
This method may not support any kwargs.

Closest candidates are:
  WENOScheme() got unsupported keyword argument "epsilon"
   @ MethodOfLines ~/.julia/packages/MethodOfLines/JDu9X/src/discretization/schemes/WENO/WENO.jl:64
  WENOScheme(::Any) got unsupported keyword argument "epsilon"
   @ MethodOfLines ~/.julia/packages/MethodOfLines/JDu9X/src/discretization/schemes/WENO/WENO.jl:64

Stacktrace:
 [1] top-level scope
   @ REPL[2]:1

but the epsilon keyword argument does not seem to be supported.

For possible reproduction of the problem, here comes the code

using OrdinaryDiffEq, ModelingToolkit, MethodOfLines, DomainSets

@independent_variables t x
@variables T(..)
Dₜ = Differential(t)
Dₓ = Differential(x)

eq  = Dₜ(T(t, x)) ~ -Dₓ(T(t, x))

T₀ = 0.0
bcs = [T(0, x) ~ T₀+exp(-((x-2.5)^2)/0.5),
       T(t, 0) ~ T₀+exp(-((-t-2.5)^2)/0.5)]

domains = [t  Interval(0.0, 7.0),
           x  Interval(0.0, 5.0)]

@named pdesys = PDESystem(eq, bcs, domains, [t, x], [T(t, x)])

Δx = 0.2

discretization = MOLFiniteDifference([x => Δx], t, advection_scheme = WENOScheme(epsilon=1e-6))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions