SciML / PolyChaos.jl

A Julia package to construct orthogonal polynomials, their quadrature rules, and use it with polynomial chaos expansions.
https://docs.sciml.ai/PolyChaos/stable/
MIT License
115 stars 26 forks source link

Error on Uniform01Measure #50

Closed Alexander-Murray closed 3 years ago

Alexander-Murray commented 3 years ago

I tried to use the following command following the Numerical Integration tutorial: Uniform01Measure(PolyChaos.w_uniform01, (0.0, 1.0), true) However I get the following error message:

MethodError: no method matching Uniform01Measure(::typeof(w_uniform01), ::Tuple{Float64,Float64}, ::Bool)

Stacktrace:
 [1] top-level scope at In[7]:1
 [2] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1091
timueh commented 3 years ago

Hey Alex,

I'm not sure, I can follow. I get the following

julia> using PolyChaos
julia> measure = Uniform01Measure()
Uniform01Measure(PolyChaos.w_uniform01, (0.0, 1.0), true)

This is exactly the output to be expected?

Are you using v0.2.3?

Alexander-Murray commented 3 years ago

Yes, I am using v0.2.3. I think the error lies in the syntax since calling Uniform01Measure() works without issue. However, to integrate from -1 to 1 I tried using Uniform01Measure(PolyChaos.w_uniform01, (-1.0, 1.0), true) given the form of the output when no argument is given to Uniform01Measure. What would be the correct syntax in this case?

timueh commented 3 years ago

Did you see this issue?

Does using Uniform_11Measure/Uniform_11Orthopoly do the job?

Alexander-Murray commented 3 years ago

No, I didn't see that issue. That does solve the problem though!