Triangle-checkpoint



In [4]:
using ApproxFun, MultivariateOrthogonalPolynomials, LinearAlgebra
import Makie
include("/Users/solver/Documents/Papers/Multivariate Orthogonal Polynomials/MultivariateTriangle/src/MultivariateTriangle.jl")
using .MultivariateTriangle


┌ Info: Precompiling MultivariateOrthogonalPolynomials [13a07efc-aef2-5bfe-8cb7-71b873e3b213]
└ @ Base loading.jl:1186

In [19]:
@time f = Fun((x,y) -> exp(cos(200x*y)), Triangle())
@show ncoefficients(f)
contourf(f; shading=false)


  1.714523 seconds (10.75 M allocations: 857.092 MiB, 29.38% gc time)
ncoefficients(f) = 205796
Out[19]:

In [15]:
S = TriangleWeight(1,1,1,JacobiTriangle(1,1,1))
Δ = Laplacian(S)
f = Fun((x,y) -> x*y*(1-x-y)*exp(cos(20x*y)), Triangle())

@time u = \(Δ + 100^2*I , f ; tolerance = 1E-5)

contourf(u; shading=false)


  2.264887 seconds (32.85 M allocations: 1.321 GiB, 22.13% gc time)
Out[15]: