Skip to content

Commit

Permalink
Merge pull request #16 from ioannisPApapadopoulos/jp/arrowhead
Browse files Browse the repository at this point in the history
utilize arrowhead matrix implementation in piecewiseorthogonalpolynom…
  • Loading branch information
ioannisPApapadopoulos authored Nov 8, 2023
2 parents 1cf8f85 + 7cde1f9 commit a855059
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 188 deletions.
8 changes: 7 additions & 1 deletion Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.9.2"
manifest_format = "2.0"
project_hash = "b0a1614238239a1868646de0ffb2dae02b05d74b"
project_hash = "b10bc9e72c19ed7893ed044675b2cb7bad81080d"

[[deps.AbstractFFTs]]
deps = ["LinearAlgebra"]
Expand Down Expand Up @@ -434,6 +434,12 @@ git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1"
uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
version = "0.5.5+0"

[[deps.PiecewiseOrthogonalPolynomials]]
deps = ["ArrayLayouts", "BandedMatrices", "BlockArrays", "BlockBandedMatrices", "ClassicalOrthogonalPolynomials", "ContinuumArrays", "FillArrays", "InfiniteArrays", "InfiniteLinearAlgebra", "LazyArrays", "LazyBandedMatrices", "LinearAlgebra", "MatrixFactorizations", "QuasiArrays"]
git-tree-sha1 = "cd05b8ad3ca7ae2c98513fdcb8e71f7132b65350"
uuid = "4461d12d-4663-4550-8580-cb764c85e20f"
version = "0.2.4"

[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Expand Down
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Memoization = "6fafb56a-5788-4b4e-91ca-c0cea6611c73"
MultivariateOrthogonalPolynomials = "4f6956fd-4f93-5457-9149-7bfc4b2ce06d"
PiecewiseOrthogonalPolynomials = "4461d12d-4663-4550-8580-cb764c85e20f"
QuasiArrays = "c4ea9172-b204-11e9-377d-29865faadc5c"
SemiclassicalOrthogonalPolynomials = "291c01f3-23f6-4eb6-aeb0-063a639b53f2"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Expand All @@ -37,6 +38,7 @@ HypergeometricFunctions = "0.3"
LazyArrays = "1.5"
Memoization = "0.2"
MultivariateOrthogonalPolynomials = "0.5, 0.6"
PiecewiseOrthogonalPolynomials = "0.2"
QuasiArrays = "0.9, 0.10, 0.11"
SemiclassicalOrthogonalPolynomials = "0.5"
SpecialFunctions = "2"
Expand Down
2 changes: 1 addition & 1 deletion src/RadialPiecewisePolynomials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import LazyArrays: Vcat
import SpecialFunctions: beta
import HypergeometricFunctions: _₂F₁general2
import BlockBandedMatrices: _BandedBlockBandedMatrix, AbstractBandedBlockBandedMatrix, subblockbandwidths, blockbandwidths, AbstractBandedBlockBandedLayout, layout_replace_in_print_matrix
import PiecewiseOrthogonalPolynomials: ArrowheadMatrix

export SVector, Zeros, Ones, Vcat, Derivative, pad, paddeddata, Hcat, RadialCoordinate,
ContinuousZernikeElementMode, ContinuousZernikeAnnulusElementMode, grid, plotvalues, plot_helper,
Expand All @@ -32,7 +33,6 @@ export SVector, Zeros, Ones, Vcat, Derivative, pad, paddeddata, Hcat, RadialCoor
get_rs(x) = x.r
get_θs(x) = x.θ

include("arrowhead.jl")
include("diskelement.jl")
include("annuluselement.jl")
include("finitecontinuousmode.jl")
Expand Down
181 changes: 0 additions & 181 deletions src/arrowhead.jl

This file was deleted.

9 changes: 4 additions & 5 deletions src/finitecontinuousmode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ function _build_second_block(F::FiniteContinuousZernikeMode{T}, Ms, γs::Abstrac
end
end
if p 0
K == 1 && return [BandedMatrix{T}(0=>dv[j]) for j in 1:bs]
return [BandedMatrix{T}(0=>dv[j], 1=>ev[j]) for j in 1:bs]
K == 1 && return Tuple([BandedMatrix{T}(0=>dv[j]) for j in 1:bs])
return Tuple([BandedMatrix{T}(0=>dv[j], 1=>ev[j]) for j in 1:bs])
else
return [BandedMatrix{T}((0=>dv[j], -1=>ev[j]), (K+1, K)) for j in 1:bs]
return Tuple([BandedMatrix{T}((0=>dv[j], -1=>ev[j]), (K+1, K)) for j in 1:bs])
end
end

Expand All @@ -236,9 +236,8 @@ end
function _arrow_head_matrix(F::FiniteContinuousZernikeMode, Ms, γs::AbstractArray{T}, N::Int, bs::Int, p::T) where T
A = _build_top_left_block(F,Ms, γs, p)
B = _build_second_block(F,Ms, γs, bs, p)
C = BandedMatrix{T, Matrix{T}, Base.OneTo{Int64}}[]
D = _build_trailing_bubbles(F,Ms, N, bs, p)
Symmetric(ArrowheadMatrix{T}(A, B, C, D))
Symmetric(ArrowheadMatrix{T}(A, B, (), D))
end

# FIXME: Need to make type-safe
Expand Down

0 comments on commit a855059

Please sign in to comment.