Skip to content

Commit

Permalink
Derivative 2 Diff (#83)
Browse files Browse the repository at this point in the history
* remove TwoBand and SingularIntegrals

* tests pass

* v0.5
  • Loading branch information
dlfivefifty authored Jul 14, 2023
1 parent 9620af9 commit aeb524e
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 608 deletions.
10 changes: 4 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SemiclassicalOrthogonalPolynomials"
uuid = "291c01f3-23f6-4eb6-aeb0-063a639b53f2"
authors = ["Sheehan Olver <solver@mac.com>"]
version = "0.4.0"
version = "0.5"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand All @@ -15,21 +15,19 @@ InfiniteLinearAlgebra = "cde9dba0-b1de-11e9-2c62-0bab9446c55c"
LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
QuasiArrays = "c4ea9172-b204-11e9-377d-29865faadc5c"
SingularIntegrals = "d7440221-8b5e-42fc-909c-0567823f424a"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"

[compat]
ArrayLayouts = "1"
BandedMatrices = "0.17"
ClassicalOrthogonalPolynomials = "0.10.1"
ContinuumArrays = "0.12, 0.13"
ClassicalOrthogonalPolynomials = "0.11"
ContinuumArrays = "0.14"
FillArrays = "1"
HypergeometricFunctions = "0.3.4"
InfiniteArrays = "0.12.9"
InfiniteLinearAlgebra = "0.6.19"
LazyArrays = "1"
QuasiArrays = "0.9, 0.10"
SingularIntegrals = "0.1"
QuasiArrays = "0.11"
SpecialFunctions = "1.0, 2"
julia = "1.9"

Expand Down
137 changes: 0 additions & 137 deletions examples/equilibriummeasure.jl

This file was deleted.

17 changes: 0 additions & 17 deletions examples/idealfluidflow_2_plates.jl

This file was deleted.

20 changes: 9 additions & 11 deletions src/SemiclassicalOrthogonalPolynomials.jl
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
module SemiclassicalOrthogonalPolynomials
using ClassicalOrthogonalPolynomials: WeightedOPLayout
using ClassicalOrthogonalPolynomials, FillArrays, LazyArrays, ArrayLayouts, QuasiArrays, InfiniteArrays, ContinuumArrays, LinearAlgebra, BandedMatrices,
SpecialFunctions, HypergeometricFunctions, SingularIntegrals, InfiniteLinearAlgebra
SpecialFunctions, HypergeometricFunctions, InfiniteLinearAlgebra

import Base: getindex, axes, size, \, /, *, +, -, summary, ==, copy, sum, unsafe_getindex, convert, OneTo
import Base: getindex, axes, size, \, /, *, +, -, summary, ==, copy, sum, unsafe_getindex, convert, OneTo, diff

import ArrayLayouts: MemoryLayout, ldiv, diagonaldata, subdiagonaldata, supdiagonaldata
import BandedMatrices: bandwidths, AbstractBandedMatrix, BandedLayout, _BandedMatrix
import LazyArrays: resizedata!, paddeddata, CachedVector, CachedMatrix, CachedAbstractVector, LazyMatrix, LazyVector, arguments, ApplyLayout, colsupport, AbstractCachedVector, ApplyArray,
AccumulateAbstractVector, LazyVector, AbstractCachedMatrix, BroadcastLayout
import ClassicalOrthogonalPolynomials: OrthogonalPolynomial, recurrencecoefficients, jacobimatrix, normalize, _p0, UnitInterval, orthogonalityweight, NormalizedOPLayout,
Bidiagonal, Tridiagonal, SymTridiagonal, symtridiagonalize, normalizationconstant, LanczosPolynomial,
OrthogonalPolynomialRatio, Weighted, WeightLayout, UnionDomain, oneto, WeightedBasis, HalfWeighted,
OrthogonalPolynomialRatio, Weighted, AbstractWeightLayout, UnionDomain, oneto, WeightedBasis, HalfWeighted,
golubwelsch, AbstractOPLayout, weight, cholesky_jacobimatrix, qr_jacobimatrix, isnormalized
import SingularIntegrals: Hilbert, Associated, associated

import InfiniteArrays: OneToInf, InfUnitRange
import ContinuumArrays: basis, Weight, @simplify, AbstractBasisLayout, BasisLayout, MappedBasisLayout, grid, plotgrid, _equals, ExpansionLayout
import FillArrays: SquareEye
import HypergeometricFunctions: _₂F₁general2

export LanczosPolynomial, Legendre, Normalized, normalize, SemiclassicalJacobi, SemiclassicalJacobiWeight, WeightedSemiclassicalJacobi, OrthogonalPolynomialRatio, TwoBandJacobi, TwoBandWeight
export LanczosPolynomial, Legendre, Normalized, normalize, SemiclassicalJacobi, SemiclassicalJacobiWeight, WeightedSemiclassicalJacobi, OrthogonalPolynomialRatio

""""
SemiclassicalJacobiWeight(t, a, b, c)
Expand Down Expand Up @@ -72,8 +72,8 @@ function jacobiexpansion(w::SemiclassicalJacobiWeight{T}) where T
LanczosPolynomial(@.(x^a * (1-x)^b * (t-x)^c), P).w
end

_equals(::WeightLayout, ::ExpansionLayout, A::SemiclassicalJacobiWeight, B) = jacobiexpansion(A) == B
_equals(::ExpansionLayout, ::WeightLayout, A, B::SemiclassicalJacobiWeight) = A == jacobiexpansion(B)
_equals(::AbstractWeightLayout, ::ExpansionLayout, A::SemiclassicalJacobiWeight, B) = jacobiexpansion(A) == B
_equals(::ExpansionLayout, ::AbstractWeightLayout, A, B::SemiclassicalJacobiWeight) = A == jacobiexpansion(B)


"""
Expand Down Expand Up @@ -385,13 +385,13 @@ end

\(w_A::Weighted{<:Any,<:SemiclassicalJacobi}, w_B::Weighted{<:Any,<:SemiclassicalJacobi}) = convert(WeightedBasis, w_A) \ convert(WeightedBasis, w_B)

massmatrix(P::SemiclassicalJacobi) = Diagonal(Fill(sum(orthogonalityweight(P)),∞))
weightedgrammatrix(P::SemiclassicalJacobi) = Diagonal(Fill(sum(orthogonalityweight(P)),∞))

@simplify function *(Ac::QuasiAdjoint{<:Any,<:SemiclassicalJacobi}, wB::WeightedBasis{<:Any,<:SemiclassicalJacobiWeight,<:SemiclassicalJacobi})
A = parent(Ac)
w,B = arguments(wB)
P = SemiclassicalJacobi(w.t, w.a, w.b, w.c)
(P\A)' * massmatrix(P) * (P \ B)
(P\A)' * weightedgrammatrix(P) * (P \ B)
end

function ldiv(Q::SemiclassicalJacobi, f::AbstractQuasiVector)
Expand Down Expand Up @@ -440,8 +440,6 @@ convert(::Type{WeightedBasis}, Q::HalfWeighted{:ab,T,<:SemiclassicalJacobi}) whe
convert(::Type{WeightedBasis}, Q::HalfWeighted{:bc,T,<:SemiclassicalJacobi}) where T = SemiclassicalJacobiWeight(Q.P.t, zero(T),Q.P.b,Q.P.c) .* Q.P
convert(::Type{WeightedBasis}, Q::HalfWeighted{:ac,T,<:SemiclassicalJacobi}) where T = SemiclassicalJacobiWeight(Q.P.t, Q.P.a,zero(T),Q.P.c) .* Q.P


include("twoband.jl")
include("derivatives.jl")


Expand Down
Loading

2 comments on commit aeb524e

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/87501

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.0 -m "<description of version>" aeb524eb601e71ab3b634311cad60f76ade04f7d
git push origin v0.5.0

Please sign in to comment.