pjgaudre / DESincEig.jl

Computes the eigenvalues of Sturm-Liouville problems
MIT License
4 stars 2 forks source link

Should we return converged generalized eigenvectors as SincFuns? #4

Open MikaelSlevinsky opened 9 years ago

pjgaudre commented 9 years ago

That is definitely doable. I'll start working on the code this upcoming week.

pjgaudre commented 9 years ago

I created a function (SincEigenStop) which returns the eigenvectors "v", the step size "h" and the truncation values (-M,N) of the sinc expansion for a user specified eigenvalue. Using this information, how would I construct a SincFun function?

MikaelSlevinsky commented 9 years ago

SincFun needs a few more constructors (and some more work!). Let's start with one eigenvector.

A sincfun stores the data for its fast & accurate evaluation via a barycentric formula. A new constructor must logically fill in the data in the type:

type sincfun{D,T}
    n::Integer    # the range (-n,n)
    h::T       # the step size
    fϕv::Vector{T} # vector of function values
    ϕpv::Vector{T} # vector of map derivative values
    ωv::Vector{T} # vector of envelope values at the same points as f
    ωscale::T # some constant
    ωβ::T # some constant
    jh::Vector{T} # vector of step-size-times-index-running-from (-n,n)
    domain::D # the domain
end

though this type should probably be modified. For example, we can modify it so that it uses the truncation values (-M,N) instead of the range (-n,n). There is a SincFun package function ω, which is a positive DE envelope function.

From the eigenvalue scenario, it's clear a partial constructor, with input from:

n (or (-M,N))
h
fϕv
domain

that filled in the rest would be useful.

MikaelSlevinsky commented 9 years ago

Probably the best way to start is to see how this is created and look at its data:

using SincFun
sf = sincfun(exp)