Skip to content

Multivariate integration #48

@Alexander-Murray

Description

@Alexander-Murray

Hey, I tried following the tutorial examples here but I can't seem to figure out the right syntax for multivariate integration. Here is what I am trying:

deg = [3, 5, 6, 4]
d = minimum(deg)
op1 = GaussOrthoPoly(deg[1], addQuadrature=true);
op2 = Uniform01OrthoPoly(deg[2], addQuadrature=true);
op3 = Beta01OrthoPoly(deg[3], 2, 1.2, addQuadrature=true);
ops = [op1, op2, op3];
mop = MultiOrthoPoly(ops, d);
integrate((a,b,c,d) -> a*b*c*d, mop)

however, I get the following error:

type MultiOrthoPoly has no field quad

Stacktrace:
 [1] getproperty(::MultiOrthoPoly{ProductMeasure,Quad{Float64,Array{Float64,1}},Array{AbstractCanonicalOrthoPoly{Array{Float64,1},M,Quad{Float64,Array{Float64,1}}} where M,1}}, ::Symbol) at .\Base.jl:33
 [2] integrate(::Function, ::MultiOrthoPoly{ProductMeasure,Quad{Float64,Array{Float64,1}},Array{AbstractCanonicalOrthoPoly{Array{Float64,1},M,Quad{Float64,Array{Float64,1}}} where M,1}}) at C:\Users\mrra\.julia\packages\PolyChaos\AlY80\src\auxfuns.jl:96
 [3] top-level scope at In[5]:8
 [4] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1091

Is there any way of doing this with the PolyChaos package?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions