TensorizedBasis

Each multi-index $\mu = [\mu_1,\mu_2,\ldots,\mu_M]$ encodes a tensorized basis function for the parameter space of the form $H_\mu = \prod_{k=1}^M H_k$ where the $H_k$ are the orthogonal polynomials. The TensorizedBasis collects all information necessary to evaluate those basis functions, i.e. the set of multi-indices and the triple products of the form $(y_mH_\mu, H_\lambda)$ for each $m$ and $\mu, \lambda$ in the set of multi-indices as a sparse matrix. There are analytic formulas to evaluate these triple products in terms of recurrence coefficients, but it makes sense to store them for faster evaluation times.

ExtendableASGFEM.TensorizedBasisType
TensorizedBasis(
    OBT::Type{<:OrthogonalPolynomialType},
    M,
    order,
    maxorder;
    ...
) -> TensorizedBasis{Float64, ONBasis{T, OBT, npoly, nquad}} where {T<:Real, OBT<:OrthogonalPolynomialType, npoly, nquad}
TensorizedBasis(
    OBT::Type{<:OrthogonalPolynomialType},
    M,
    order,
    maxorder,
    maxquadorder;
    T,
    multi_indices
) -> TensorizedBasis{Float64, ONBasis{T, OBT, npoly, nquad}} where {T<:Real, OBT<:OrthogonalPolynomialType, npoly, nquad}

constructor for a tensorized basis for the given OrthogonalPolynomialType. If no multi-indices are provided it automatically generates all multi-indices up to support length M and polynomial order maxorder.

source
ExtendableASGFEM.TensorizedBasisType
struct TensorizedBasis{T<:Real, ONBType<:ONBasis, MIType}

Structure that stores information of a tensorized orthogonal for a certain set of multi-indices.

source
Base.showMethod
show(io::IO, TB::TensorizedBasis)

shows information on the tensorized basis.

source
ExtendableASGFEM.evaluateMethod
evaluate(TB::TensorizedBasis{T}, j) -> Any

evaluates the basis function for the j-th multi-index at the sample that was set with set_sample.

source
ExtendableASGFEM.sample_distributionMethod
sample_distribution(
    TB::TensorizedBasis,
    nsamples;
    M,
    Mweights
) -> Tuple{Matrix{Float64}, Any}

Generate samples and weights for the distribution of the ON basis that the tensorized basis is based upon (that can be used for a Monte-Carlo estimator).

source
ExtendableASGFEM.set_sample!Method
set_sample!(
    TB::TensorizedBasis,
    x;
    normalize
) -> Array{Vector{T}, 1} where T<:Real

evaluates all basis functions at sample vector x; call this before using evaluate!

source