Skip to content

Commit

Permalink
Test on ContinuousDirectSolver
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentcp committed Jul 7, 2017
1 parent 9a5c06c commit 1b692a8
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
4 changes: 0 additions & 4 deletions .travis/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@ set -ev
if [[ $TRAVIS_BRANCH == 'development' ]]; then
julia -e 'Pkg.checkout("BasisFunctions","development")'
fi

if [[ $TRAVIS_BRANCH == 'continuous' ]]; then
julia -e 'Pkg.checkout("BasisFunctions","development")'
fi
18 changes: 9 additions & 9 deletions src/recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ end
plot_ext ? (SetExpansion(basis(F),coefficients(F)), target) : (expansion(F), target)
end

@recipe function f(dom::Domain2d; n=300)
seriescolor --> :blues
seriestype --> :heatmap
B = boundingbox(dom)
grid = equispaced_aspect_grid(B,n)
Z = indomain_broadcast(grid, dom)
grid, 1./Z
end

# Postprocessing when the set is a frame: set values outside the domain to NaN
function postprocess(D::Domain, grid, vals, value=NaN)
mgrid = subgrid(grid, D)
Expand Down Expand Up @@ -50,3 +41,12 @@ plotgrid(B::ExtensionFrame, n) = plotgrid(basis(B),n)
plotdata = distance ? dist.(grid,dom) : in.(grid,dom)
xrange,yrange,plotdata
end

# @recipe function f(dom::Domain2d; n=300)
# seriescolor --> :blues
# seriestype --> :heatmap
# B = boundingbox(dom)
# grid = equispaced_aspect_grid(B,n)
# Z = indomain_broadcast(grid, dom)
# grid, 1./Z
# end
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include( "test_suite_support.jl")
include("test_suite.jl")
include("test_suite_applications.jl")
include("test_continuous_approximation.jl")
include("test_suite_adaptive.jl")
include("test_suite_gram.jl")
include("test_suite_domains.jl")
Expand Down
20 changes: 15 additions & 5 deletions test/test_continuous_approximation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ using BasisFunctions
using FrameFun
using Base.Test

function delimit(s::AbstractString)
println()
println("############")
println("# ",s)
println("############")
end

delimit("Continuous solver")

for basistype in (ChebyshevBasis, FourierBasis, BSplineTranslatesBasis), T in (Float32, Float64,)
frameF = 0
basisF = 0
@testset for basistype in (ChebyshevBasis, FourierBasis, BSplineTranslatesBasis), T in (Float32, Float64,)
tol = sqrt(eps(T))

B = instantiate(basistype,11, T)
Expand Down Expand Up @@ -33,7 +43,7 @@ for basistype in (ChebyshevBasis, FourierBasis, BSplineTranslatesBasis), T in (F
# println(norm(frameFcoef-basisFcoef))
end

using Plots

plot(frameF)
plot!(basisF, linestyle=:dot, ylims=[-1,10])
# using Plots
#
# plot(frameF)
# plot!(basisF, linestyle=:dot, linewidth=10, color=:red)

0 comments on commit 1b692a8

Please sign in to comment.