From 0313a7ec1a9e32c544ea5ede8da1929a0551b3fe Mon Sep 17 00:00:00 2001 From: Michael Kraus Date: Wed, 10 May 2023 08:38:10 +0200 Subject: [PATCH] Fix imports and exports. --- src/PartitionedTableaus.jl | 8 +++++-- src/RungeKutta.jl | 5 +++-- src/Tableaus.jl | 8 +++++-- src/tableaus/dirk.jl | 8 +++---- src/tableaus/erk.jl | 46 +++++++++++++++++++------------------- src/tableaus/firk.jl | 8 +++---- src/tableaus/gauss.jl | 2 +- src/tableaus/lobatto.jl | 14 ++++++------ src/tableaus/radau.jl | 8 +++---- 9 files changed, 58 insertions(+), 49 deletions(-) diff --git a/src/PartitionedTableaus.jl b/src/PartitionedTableaus.jl index ca8828c..55882c8 100644 --- a/src/PartitionedTableaus.jl +++ b/src/PartitionedTableaus.jl @@ -1,12 +1,16 @@ module PartitionedTableaus - using GeometricBase - + import GeometricBase + import GeometricBase: description, reference + using ..RungeKutta using .Tableaus + export description, reference + + include("tableaus/prk.jl") export TableauLobattoIIIAIIIB, diff --git a/src/RungeKutta.jl b/src/RungeKutta.jl index 9e75068..f8f6e2c 100644 --- a/src/RungeKutta.jl +++ b/src/RungeKutta.jl @@ -1,13 +1,14 @@ module RungeKutta using DelimitedFiles - using GeometricBase using Markdown using PrettyTables using Reexport using StaticArrays import GenericLinearAlgebra + import GeometricBase + import GeometricBase: name, order, description, reference import GeometricBase.Utils: @big, @define import LinearAlgebra: istril import Polynomials @@ -27,7 +28,7 @@ module RungeKutta isdiagonallyimplicit, isfullyimplicit - export description, reference + export name, order, description, reference include("order_conditions.jl") diff --git a/src/Tableaus.jl b/src/Tableaus.jl index e3a9a38..4e1b6f4 100644 --- a/src/Tableaus.jl +++ b/src/Tableaus.jl @@ -1,12 +1,16 @@ module Tableaus - using GeometricBase - + import GeometricBase + import GeometricBase: description, reference + import Polynomials import Polynomials: Polynomial using ..RungeKutta using ..RungeKutta: big, @big, _legendre, _shifted_legendre + + + export description, reference include("tableaus/dirk.jl") diff --git a/src/tableaus/dirk.jl b/src/tableaus/dirk.jl index c150143..526a404 100644 --- a/src/tableaus/dirk.jl +++ b/src/tableaus/dirk.jl @@ -1,5 +1,5 @@ -GeometricBase.reference(::Val{:CrankNicolson}) = """ +reference(::Val{:CrankNicolson}) = """ Reference: J. Crank and P. Nicolson. @@ -29,7 +29,7 @@ function TableauCrankNicolson(::Type{T}=Float64) where {T} end -GeometricBase.reference(::Val{:KraaijevangerSpijker}) = """ +reference(::Val{:KraaijevangerSpijker}) = """ Reference: J. F. B. M. Kraaijevanger and M. N. Spijker. @@ -59,7 +59,7 @@ function TableauKraaijevangerSpijker(::Type{T}=Float64) where {T} end -GeometricBase.reference(::Val{:QinZhang}) = """ +reference(::Val{:QinZhang}) = """ Reference: M.-Z. Qin and M.-Q. Zhang. @@ -88,7 +88,7 @@ function TableauQinZhang(::Type{T}=Float64) where {T} end -GeometricBase.reference(::Val{:Crouzeix}) = """ +reference(::Val{:Crouzeix}) = """ Reference: M.Crouzeix. diff --git a/src/tableaus/erk.jl b/src/tableaus/erk.jl index 6edcf06..0460d13 100644 --- a/src/tableaus/erk.jl +++ b/src/tableaus/erk.jl @@ -1,5 +1,5 @@ -GeometricBase.reference(::Val{:ExplicitEuler}) = """ +reference(::Val{:ExplicitEuler}) = """ Reference: Leonhard Euler. @@ -30,10 +30,10 @@ end "Alias for [`TableauExplicitEuler`](@ref)" const TableauForwardEuler = TableauExplicitEuler -GeometricBase.reference(::Val{:ForwardEuler}) = reference(Val(:ExplicitEuler)) +reference(::Val{:ForwardEuler}) = reference(Val(:ExplicitEuler)) -GeometricBase.reference(::Val{:ExplicitMidpoint}) = """ +reference(::Val{:ExplicitMidpoint}) = """ Reference: Carl Runge. @@ -64,7 +64,7 @@ function TableauExplicitMidpoint(::Type{T}=Float64) where {T} end -GeometricBase.reference(::Val{:Heun2}) = """ +reference(::Val{:Heun2}) = """ Reference: Karl Heun. @@ -102,10 +102,10 @@ Alias for [`TableauHeun2`](@ref) Page 99 """ const TableauRK21 = TableauHeun2 -GeometricBase.reference(::Val{:RK21}) = reference(Val(:Heun2)) +reference(::Val{:RK21}) = reference(Val(:Heun2)) -GeometricBase.reference(::Val{:Heun3}) = """ +reference(::Val{:Heun3}) = """ Reference: Karl Heun. @@ -136,7 +136,7 @@ function TableauHeun3(::Type{T}=Float64) where {T} end -GeometricBase.reference(::Val{:Ralston2}) = """ +reference(::Val{:Ralston2}) = """ Reference: Anthony Ralston. @@ -167,7 +167,7 @@ function TableauRalston2(::Type{T}=Float64) where {T} end -GeometricBase.reference(::Val{:Ralston3}) = """ +reference(::Val{:Ralston3}) = """ Reference: Anthony Ralston. @@ -199,7 +199,7 @@ function TableauRalston3(::Type{T}=Float64) where {T} end -GeometricBase.reference(::Val{:Runge}) = """ +reference(::Val{:Runge}) = """ Reference: Carl Runge @@ -231,7 +231,7 @@ end "Alias for [`TableauRunge`](@ref)" const TableauRunge2 = TableauRunge -GeometricBase.reference(::Val{:Runge2}) = reference(Val(:Runge)) +reference(::Val{:Runge2}) = reference(Val(:Runge)) """ Alias for [`TableauRunge`](@ref) @@ -242,10 +242,10 @@ Alias for [`TableauRunge`](@ref) Page 99 """ const TableauRK22 = TableauRunge -GeometricBase.reference(::Val{:RK22}) = reference(Val(:Runge)) +reference(::Val{:RK22}) = reference(Val(:Runge)) -GeometricBase.reference(::Val{:Kutta}) = """ +reference(::Val{:Kutta}) = """ Reference: Wilhelm Kutta @@ -277,7 +277,7 @@ end "Alias for [`TableauKutta`](@ref)" const TableauKutta3 = TableauKutta -GeometricBase.reference(::Val{:Kutta3}) = reference(Val(:Kutta)) +reference(::Val{:Kutta3}) = reference(Val(:Kutta)) """ Alias for [`TableauKutta`](@ref) according to @@ -287,10 +287,10 @@ Alias for [`TableauKutta`](@ref) according to Page 99 """ const TableauRK32 = TableauKutta -GeometricBase.reference(::Val{:RK32}) = reference(Val(:Kutta)) +reference(::Val{:RK32}) = reference(Val(:Kutta)) -GeometricBase.reference(::Val{:RK31}) = """ +reference(::Val{:RK31}) = """ Reference: John C. Butcher @@ -320,7 +320,7 @@ function TableauRK31(::Type{T}=Float64) where {T} end -GeometricBase.reference(::Val{:RK416}) = """ +reference(::Val{:RK416}) = """ Reference: Wilhelm Kutta @@ -359,14 +359,14 @@ Alias for [`TableauRK416`](@ref) according to Page 102 """ const TableauRK41 = TableauRK416 -GeometricBase.reference(::Val{:RK41}) = reference(Val(:RK416)) +reference(::Val{:RK41}) = reference(Val(:RK416)) "Alias for [`TableauRK416`](@ref)" const TableauRK4 = TableauRK416 -GeometricBase.reference(::Val{:RK4}) = reference(Val(:RK416)) +reference(::Val{:RK4}) = reference(Val(:RK416)) -GeometricBase.reference(::Val{:RK42}) = """ +reference(::Val{:RK42}) = """ Reference: John C. Butcher @@ -397,7 +397,7 @@ function TableauRK42(::Type{T}=Float64) where {T} end -GeometricBase.reference(::Val{:RK438}) = """ +reference(::Val{:RK438}) = """ Reference: Wilhelm Kutta @@ -429,7 +429,7 @@ function TableauRK438(::Type{T}=Float64) where {T} end -GeometricBase.reference(::Val{:RK5}) = """ +reference(::Val{:RK5}) = """ Reference: John C. Butcher @@ -462,7 +462,7 @@ function TableauRK5(::Type{T}=Float64) where {T} end -GeometricBase.reference(::Val{:SSPRK2}) = """ +reference(::Val{:SSPRK2}) = """ Reference: Chi-Wang Shu, Stanley Osher. @@ -490,7 +490,7 @@ function TableauSSPRK2(args...) end -GeometricBase.reference(::Val{:SSPRK3}) = """ +reference(::Val{:SSPRK3}) = """ Reference: Chi-Wang Shu, Stanley Osher. diff --git a/src/tableaus/firk.jl b/src/tableaus/firk.jl index 7b988c0..7c905e6 100644 --- a/src/tableaus/firk.jl +++ b/src/tableaus/firk.jl @@ -1,5 +1,5 @@ -GeometricBase.reference(::Val{:ImplicitEuler}) = """ +reference(::Val{:ImplicitEuler}) = """ Reference: Augustin-Louis Cauchy. @@ -29,10 +29,10 @@ end "Alias for [`TableauImplicitEuler`](@ref)" const TableauBackwardEuler = TableauImplicitEuler -GeometricBase.reference(::Val{:BackwardEuler}) = reference(Val(:ImplicitEuler)) +reference(::Val{:BackwardEuler}) = reference(Val(:ImplicitEuler)) -GeometricBase.reference(::Val{:ImplicitMidpoint}) = """ +reference(::Val{:ImplicitMidpoint}) = """ Reference: Augustin-Louis Cauchy. @@ -61,7 +61,7 @@ function TableauImplicitMidpoint(::Type{T}=Float64) where {T} end -GeometricBase.reference(::Val{:SRK3}) = """ +reference(::Val{:SRK3}) = """ Reference: Shan Zhao and Guo-Wei Wei. diff --git a/src/tableaus/gauss.jl b/src/tableaus/gauss.jl index ed3785c..a1e9d6a 100644 --- a/src/tableaus/gauss.jl +++ b/src/tableaus/gauss.jl @@ -47,7 +47,7 @@ end get_gauss_coefficients(s) = get_gauss_coefficients(BigFloat, s) -GeometricBase.reference(::Val{:Gauss}) = """ +reference(::Val{:Gauss}) = """ References: John C. Butcher. diff --git a/src/tableaus/lobatto.jl b/src/tableaus/lobatto.jl index f3e3145..3415a39 100644 --- a/src/tableaus/lobatto.jl +++ b/src/tableaus/lobatto.jl @@ -186,7 +186,7 @@ get_lobatto_f_coefficients(s) = get_lobatto_f_coefficients(BigFloat, s) get_lobatto_g_coefficients(s) = get_lobatto_g_coefficients(BigFloat, s) -GeometricBase.reference(::Val{:LobattoIII}) = """ +reference(::Val{:LobattoIII}) = """ References: John C. Butcher. @@ -218,7 +218,7 @@ function TableauLobattoIII(::Type{T}, s) where {T} end -GeometricBase.reference(::Val{:LobattoIIIA}) = """ +reference(::Val{:LobattoIIIA}) = """ References: Byron Leonard Ehle @@ -269,7 +269,7 @@ function TableauLobattoIIIĀ(::Type{T}, s) where {T} end -GeometricBase.reference(::Val{:LobattoIIIB}) = """ +reference(::Val{:LobattoIIIB}) = """ References: Byron Leonard Ehle. @@ -320,7 +320,7 @@ function TableauLobattoIIIB̄(::Type{T}, s) where {T} end -GeometricBase.reference(::Val{:LobattoIIIC}) = """ +reference(::Val{:LobattoIIIC}) = """ References: F. H. Chipman. @@ -372,7 +372,7 @@ function TableauLobattoIIIC̄(::Type{T}, s) where {T} end -GeometricBase.reference(::Val{:LobattoIIID}) = """ +reference(::Val{:LobattoIIID}) = """ References: R.P.K. Chan. @@ -424,7 +424,7 @@ function TableauLobattoIIID̄(::Type{T}, s) where {T} end -GeometricBase.reference(::Val{:LobattoIIIE}) = """ +reference(::Val{:LobattoIIIE}) = """ References: R.P.K. Chan. @@ -477,7 +477,7 @@ function TableauLobattoIIIĒ(::Type{T}, s) where {T} end -GeometricBase.reference(::Val{:LobattoIIIF}) = """ +reference(::Val{:LobattoIIIF}) = """ References: Wang Fangzong and Liao Xiaobing. diff --git a/src/tableaus/radau.jl b/src/tableaus/radau.jl index ef2792d..52f664a 100644 --- a/src/tableaus/radau.jl +++ b/src/tableaus/radau.jl @@ -101,7 +101,7 @@ end get_radau_2_coefficients(s) = get_radau_2_coefficients(BigFloat, s) -GeometricBase.reference(::Val{:RadauIA}) = """ +reference(::Val{:RadauIA}) = """ References: Byron Leonard Ehle @@ -127,7 +127,7 @@ end TableauRadauIA(s) = TableauRadauIA(Float64, s) -GeometricBase.reference(::Val{:RadauIB}) = """ +reference(::Val{:RadauIB}) = """ Reference: Sun Geng @@ -162,7 +162,7 @@ end TableauRadauIB(s) = TableauRadauIB(Float64, s) -GeometricBase.reference(::Val{:RadauIIA}) = """ +reference(::Val{:RadauIIA}) = """ References: Byron Leonard Ehle @@ -198,7 +198,7 @@ end TableauRadauIIA(s) = TableauRadauIIA(Float64, s) -GeometricBase.reference(::Val{:RadauIIB}) = """ +reference(::Val{:RadauIIB}) = """ Reference: Sun Geng