pjgaudre / DESincEig.jl

Computes the eigenvalues of Sturm-Liouville problems
MIT License
4 stars 2 forks source link

Centrosymmetry #7

Closed pjgaudre closed 8 years ago

pjgaudre commented 8 years ago

I can't seem to get my code for centrosymmetry to work. When I run my code, I obtain the following error:

using DESincEig, SincFun (RESULTS, All_Abs_Error_Approx , hoptimal , n, MatrixSizes)=SincEigen(x->x.^2+x.^4,ones,infinite2{Float64}(), [0.125,0.125] , [2.0,2.0] , pi/4,Centro=true)

WARNING: [a,b] concatenation is deprecated; use [a;b] instead in depwarn at deprecated.jl:73 in oldstyle_vcat_warning at abstractarray.jl:29 in vect at abstractarray.jl:38 in SincEigen at C:\Users\Philippe.julia\v0.4\DESincEig\src\DESincEig.jl:228 while loading no file, in expression starting on line 0 ERROR: MethodError: call has no method matching call(::Float64, ::Array{Float6 4,1}) Closest candidates are: BoundsError() BoundsError(::Any...) DivideError() ... in qtilde at C:\Users\Philippe.julia\v0.4\DESincEig\src\DESincEig.jl:158 in SincEigen at C:\Users\Philippe.julia\v0.4\DESincEig\src\DESincEig.jl:222

It appears to be in the function qtilde, however, when I run my code without any centrosymmety, (Centro =false), there is no problem....

MikaelSlevinsky commented 8 years ago

It looks like you've redefined the input function q to be a Float64.

Cheers,

Mikael

On Nov 13, 2015, at 1:48 AM, Philippe Gaudreau notifications@github.com wrote:

I can't seem to get my code for centrosymmetry to work. When I run my code, I obtain the following error:

using DESincEig, SincFun (RESULTS, All_Abs_Error_Approx , hoptimal , n, MatrixSizes)=SincEigen(x->x.^2+x.^4,ones,infinite2{Float64}(), [0.125,0.125] , [2.0,2.0] , pi/4,Centro=true)

WARNING: [a,b] concatenation is deprecated; use [a;b] instead in depwarn at deprecated.jl:73 in oldstyle_vcat_warning at abstractarray.jl:29 in vect at abstractarray.jl:38 in SincEigen at C:\Users\Philippe.julia\v0.4\DESincEig\src\DESincEig.jl:228 while loading no file, in expression starting on line 0 ERROR: MethodError: call has no method matching call(::Float64, ::Array{Float6 4,1}) Closest candidates are: BoundsError() BoundsError(::Any...) DivideError() ... in qtilde at C:\Users\Philippe.julia\v0.4\DESincEig\src\DESincEig.jl:158 in SincEigen at C:\Users\Philippe.julia\v0.4\DESincEig\src\DESincEig.jl:222

It appears to be in the function qtilde, however, when I run my code without any centrosymmety, (Centro =false), there is no problem....

— Reply to this email directly or view it on GitHub.

pjgaudre commented 8 years ago

I used the variable q as my center element in one of the centrosymmetric matrices. Fixed the issue, by switching the name of the variable from q to qc.