Skip to content

Commit

Permalink
diff eq solving and transform
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub committed Oct 20, 2022
1 parent 51cbd84 commit db16987
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ using SnoopPrecompile
@precompile_setup begin
splist = Any[Jacobi(1, 1), Chebyshev(), Ultraspherical(1)]
append!(splist, Any[Jacobi(1, 1, 0..1), Chebyshev(0..1), Ultraspherical(1, 0..1)])
spreal = copy(splist)
push!(splist, Chebyshev(Segment(1.0+im,2.0+2im)))
# special functions
spfns = (sin, cos, exp)
v = ones(2)
m = ones(2,2)
a = ones(2,2,2)
@precompile_all_calls begin
for S in splist
f = Fun(S,v)
f(0.1)
1/(f^2+1)
abs(DefiniteIntegral()*f - sum(f))
norm(Derivative()*f-f')
Expand All @@ -18,6 +22,20 @@ using SnoopPrecompile
spfn(f)
end
end
for S in spreal
transform(S, v)
itransform(S, v)
transform!(S, v)
itransform!(S, v)
transform(S * S, m)
itransform(S * S, m)

[Derivative(S)^2 + 1; Dirichlet(S)] \ [1,0]

f2 = Fun((x,y) -> x*y, S^2); f2(0.1, 0.1)
P = ProductFun((x,y) -> x*y, S^2); P(0.1, 0.1)
L = LowRankFun((x,y) -> x*y, S^2); L(0.1, 0.1)
end
roots(Fun(sin,Interval(big"0.0", big"1.0")))
end
end

0 comments on commit db16987

Please sign in to comment.