MikaelSlevinsky / SincFun.jl

Sinc numerical methods in Julia
Other
3 stars 0 forks source link

Unify Domains #10

Closed MikaelSlevinsky closed 8 years ago

MikaelSlevinsky commented 8 years ago

There are Domain types in SincFun.jl, DEQuadrature.jl, and DESincEig. These should be unified, preferably in SincFun.jl as it is a general concept and utility, then imported in the other two packages.

MikaelSlevinsky commented 8 years ago

DEQuadrature.jl has been refactored to use SincFun.jl's Domains and ConformalMaps.

MikaelSlevinsky commented 8 years ago

Does it make sense to specify domains with only numeric data and not functions? For example, the Finite domain could look like this instead:

type Finite{T} <: Domain{T}
    ab::Vector{T} # endpoints of the interval
    algebraic::Vector{T} # exponents of the algebraic singularities of the endpoints
    logarithmic::Vector{T} # exponents of the logarithmic singularities of the endpoints
end

Then one could define the outer map, its inverse and derivative (and any other Functions that may be required) as:

ψ{T}(d::Finite{T},t) = (d.ab[1]+d.ab[2])/2+(d.ab[2]-d.ab[1])/2*tanh(t)
ψinv{T}(d::Finite{T},t) = atanh((2t-d.ab[1]-d.ab[2])/(d.ab[2]-d.ab[1]))
ψp{T}(d::Finite{T},t) = (d.ab[2]-d.ab[1])/2*sech(t).^2
...