dlfivefifty/ApproxFun.jl — pull request #39 by MikaelSlevinsky (2014-11-06 15:12:25+00:00)
Title: More Operators on Bivariate Funs

Below is a bit of a bug. It's an example of iterative solution of a system of an SIE and a PDE: PDE solve for a TensorFun which is the smooth part of the SIE kernel, and the SIE solution is one of the boundary values for the PDE. The problem is that, upon only one iteration, the bandwidth of the SIE's operator becomes large and addentries! (or something) is unable to evaluate even the position L_{1,1}. Yet, displaying L on screen works fine.

using ApproxFun

x = Fun(identity)
d = domain(x)
d2 = d^2
B = dirichlet(d)
B2 = dirichlet(d2)
H2 = Hilbert(d,2)

uSIE = Fun(one)
uPDE = Fun((x,y)->1.0,d2)

for i=1:2
L = H2[uPDE]+4x
println("The bandrange of L is: ",bandrange(L))
println("And the 1,1 entry is: ",L[1,1])
uSIE = [B,L]\[1.0,1.0]
println("The length of uSIE is: ",length(uSIE))
println("The extrema of uSIE are: ",extrema(uSIE))
uPDE = [B2,-lap(d2)]\[uSIE,ones(3)]
println("The rank of uPDE is: ",rank(LowRankFun(uPDE)))
end