Giter Club home page Giter Club logo

sparsegrids.jl's People

Contributors

jackyarndley avatar juliatagbot avatar rjdennis avatar robertdj avatar tobydriscoll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sparsegrids.jl's Issues

[Bug] MethodError when using tensorgrid().

Hi,
I've just installed the package in a new 1.9 environment and tried using the function tensorgrid but it returns a MethodError. A minimal working example is

using SparseGrids, FastGaussQuadrature

Nt, Wt = tensorgrid(2, 4, gausslegendre)

which produces the following error

ERROR: MethodError: objects of type Vector{Vector{Float64}} are not callable
Use square brackets [] for indexing an Array.

If I instead use the sparsegrid method with the same syntax, everything's fine:

n,w = sparsegrid(2,4,gausslegendre)

produces the correct output.

I've dived a bit into the code and discovered that the code line where tensorW is defined raises the Error. I don't know what the correct output should be, so I couldn't discover much at the moment.

This issue also arises if using julia 1.7 or 1.5 in new environments. Note that I haven't tested every Julia version, I just chose those two.

Best regards,
pmc4

Ps.: Could you please add the bug label to the issue? The option is disabled for me.

Unable to find functions / modules

Something seems buggy with the internal package management "using" and "include" (at least on my El Capitan Mac with Julia 0.4.6)

SparseGrids does not seem to locate the "kpn" function when called. For example:
sparsegrid(3,5,f=kpn). However, when kpn is copied explicitly from your source code and defined in the Julia kernel, the example works.

Additionally, SparseGrids does not recognize gausshermite unless an explicit statement "using FastGuassQuadrature" is run in advance of "using SparseGrids".

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

sparse grid produces more nodes than tensorgrid

The code below produces

1 7 (7, 7)
1 11 (11, 11)
2 7 (49, 137)
2 11 (121, 501)
3 7 (343, 681)
3 11 (1331, 5297)

I had expected the number of sparse nodes to be less than the number of tensor nodes. What am I doing wrong?

using SparseGrids, FastGaussQuadrature


function hmmm( d, o )
    nt, wt = tensorgrid( d, o )
    ns, ws = sparsegrid( d, o )
    length( wt ), length( ws )
end


for d ∈ 1:3, o ∈ [ 7, 11 ]
    println( "$d $o ", hmmm( d,o) )
end

Enable Gauss-Kronrod rules

I'd be interested to see if this package could compose with the QuadGK.jl package for Gauss-Kronrod points. This type of points has Gauss points mixed in with Kronrod points, together with weights. The Kronrod points work to augment the accuracy of the overall scheme as well as to provide an estimate of the error.

julia> FastGaussQuadrature.gausslegendre(2)
([-0.5773502691896258, 0.5773502691896258], [1.0, 1.0])

julia> QuadGK.kronrod(2)
([-0.9258200997725514, -0.5773502691896257, 0.0], [0.19797979797979798, 0.4909090909090911, 0.6222222222222223], [1.0000000000000002])

How easy would it be to accommodate this functionality?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.