Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit e8a2d96

Browse files
author
AndiMD
committed
Restrict types to avoid ambiguity
1 parent 0f63558 commit e8a2d96

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/derivative_operators/BC_operators.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct RobinBC{T, V<:AbstractVector{T}} <: AffineBC{T}
2222
b_l::T
2323
a_r::V
2424
b_r::T
25-
function RobinBC(l::NTuple{3,T}, r::NTuple{3,T}, dx::U, order = 1) where {T,U}
25+
function RobinBC(l::NTuple{3,T}, r::NTuple{3,T}, dx::U, order = 1) where {T<:Number,U<:Real}
2626
αl, βl, γl = l
2727
αr, βr, γr = r
2828

@@ -36,7 +36,7 @@ struct RobinBC{T, V<:AbstractVector{T}} <: AffineBC{T}
3636

3737
return new{T, typeof(a_l)}(a_l, b_l, a_r, b_r)
3838
end
39-
function RobinBC(l::Union{NTuple{3,T},AbstractVector{T}}, r::Union{NTuple{3,T},AbstractVector{T}}, dx::AbstractVector{U}, order = 1) where {T,U}
39+
function RobinBC(l::Union{NTuple{3,T},AbstractVector{T}}, r::Union{NTuple{3,T},AbstractVector{T}}, dx::AbstractVector{U}, order = 1) where {T<:Number,U<:Real}
4040
αl, βl, γl = l
4141
αr, βr, γr = r
4242

@@ -76,7 +76,7 @@ struct GeneralBC{T, L<:AbstractVector{T}, R<:AbstractVector{T}} <:AffineBC{T}
7676
b_l::T
7777
a_r::R
7878
b_r::T
79-
function GeneralBC(αl::AbstractVector{T}, αr::AbstractVector{T}, dx::U, order = 1) where {T,U}
79+
function GeneralBC(αl::AbstractVector{T}, αr::AbstractVector{T}, dx::U, order = 1) where {T<:Number,U<:Real}
8080
nl = length(αl)
8181
nr = length(αr)
8282
S_l = zeros(T, (nl-2, order+nl-2))
@@ -103,7 +103,7 @@ struct GeneralBC{T, L<:AbstractVector{T}, R<:AbstractVector{T}} <:AffineBC{T}
103103
new{T, typeof(a_l), typeof(a_r)}(a_l,b_l,a_r,b_r)
104104
end
105105

106-
function GeneralBC(αl::AbstractVector{T}, αr::AbstractVector{T}, dx::AbstractVector{U}, order = 1) where {T,U}
106+
function GeneralBC(αl::AbstractVector{T}, αr::AbstractVector{T}, dx::AbstractVector{U}, order = 1) where {T<:Number,U<:Real}
107107

108108
nl = length(αl)
109109
nr = length(αr)

0 commit comments

Comments
 (0)