Skip to content

Commit

Permalink
ContinuumArray 0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed Jan 26, 2025
1 parent 79edafa commit a8eee56
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 58 deletions.
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "HarmonicOrthogonalPolynomials"
uuid = "e416a80e-9640-42f3-8df8-80a93ca01ea5"
authors = ["Sheehan Olver <[email protected]>"]
version = "0.6.3"
version = "0.7"

[deps]
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
Expand All @@ -20,13 +20,13 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
[compat]
BlockArrays = "1.0"
BlockBandedMatrices = "0.13"
ClassicalOrthogonalPolynomials = "0.13, 0.14"
ContinuumArrays = "0.18"
ClassicalOrthogonalPolynomials = "0.15"
ContinuumArrays = "0.19"
DomainSets = "0.7"
FastTransforms = "0.15, 0.16, 0.17"
InfiniteArrays = "0.14, 0.15"
IntervalSets = "0.7"
QuasiArrays = "0.11"
QuasiArrays = "0.12"
SpecialFunctions = "1, 2"
StaticArrays = "1"
julia = "1.10"
Expand Down
34 changes: 1 addition & 33 deletions src/laplace.jl
Original file line number Diff line number Diff line change
@@ -1,36 +1,4 @@
# Laplacian

struct Laplacian{T,D} <: LazyQuasiMatrix{T}
axis::Inclusion{T,D}
end

Laplacian{T}(axis::Inclusion{<:Any,D}) where {T,D} = Laplacian{T,D}(axis)
# Laplacian{T}(domain) where T = Laplacian{T}(Inclusion(domain))
# Laplacian(axis) = Laplacian{eltype(axis)}(axis)

axes(D::Laplacian) = (D.axis, D.axis)
==(a::Laplacian, b::Laplacian) = a.axis == b.axis
copy(D::Laplacian) = Laplacian(copy(D.axis))

@simplify function *::Laplacian, P::AbstractSphericalHarmonic)
function laplacian(P::AbstractSphericalHarmonic; dims...)
# Spherical harmonics are the eigenfunctions of the Laplace operator on the unit sphere
P * Diagonal(mortar(Fill.((-(0:∞)-(0:∞).^2), 1:2:∞)))
end

# Negative fractional Laplacian (-Δ)^α or equiv. abs(Δ)^α

struct AbsLaplacianPower{T,D,A} <: LazyQuasiMatrix{T}
axis::Inclusion{T,D}
α::A
end

AbsLaplacianPower{T}(axis::Inclusion{<:Any,D},α) where {T,D} = AbsLaplacianPower{T,D,typeof(α)}(axis,α)

axes(D:: AbsLaplacianPower) = (D.axis, D.axis)
==(a:: AbsLaplacianPower, b:: AbsLaplacianPower) = a.axis == b.axis && a.α == b.α
copy(D:: AbsLaplacianPower) = AbsLaplacianPower(copy(D.axis), D.α)

abs::Laplacian) = AbsLaplacianPower(axes(Δ,1),1)
-::Laplacian) = abs(Δ)

^(D::AbsLaplacianPower, k) = AbsLaplacianPower(D.axis, D.α*k)
21 changes: 0 additions & 21 deletions src/multivariateops.jl
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@

#########
# PartialDerivative{k}
# takes a partial derivative in the k-th index.
#########


struct PartialDerivative{k,T,Ax<:Inclusion} <: LazyQuasiMatrix{T}
axis::Ax
end

PartialDerivative{k,T}(axis::Inclusion) where {k,T} = PartialDerivative{k,T,typeof(axis)}(axis)
PartialDerivative{k,T}(domain) where {k,T} = PartialDerivative{k,T}(Inclusion(domain))
PartialDerivative{k}(axis) where k = PartialDerivative{k,eltype(eltype(axis))}(axis)

axes(D::PartialDerivative) = (D.axis, D.axis)
==(a::PartialDerivative{k}, b::PartialDerivative{k}) where k = a.axis == b.axis
copy(D::PartialDerivative{k}) where k = PartialDerivative{k}(copy(D.axis))

^(D::PartialDerivative, k::Integer) = ApplyQuasiArray(^, D, k)

abstract type MultivariateOrthogonalPolynomial{d,T} <: Basis{T} end
const BivariateOrthogonalPolynomial{T} = MultivariateOrthogonalPolynomial{2,T}

Expand Down

0 comments on commit a8eee56

Please sign in to comment.