Skip to content

Commit e88d432

Browse files
refactor(tubular): update TubularLayer struct and constructor logic
1 parent 2564d09 commit e88d432

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/cablebuilder/tubular.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# ==========================================
22
# 1. THE VAULT
33
# ==========================================
4-
struct TubularLayer{L, T <: Real} <: AbstractShape{L, T}
4+
struct TubularLayer{T <: Real} <: AbstractShape{T}
55
r_in::T
66
r_ex::T
77
end
88

9-
function TubularLayer{L}(r_in, r_ex) where {L}
9+
function TubularLayer(r_in, r_ex)
1010
T = promote_type(typeof(r_in), typeof(r_ex))
11-
return TubularLayer{L, T}(convert(T, r_in), convert(T, r_ex))
11+
return TubularLayer{T}(convert(T, r_in), convert(T, r_ex))
1212
end
1313

1414
function Base.convert(
15-
::Type{<:AbstractShape{L, T}},
16-
s::TubularLayer{L},
17-
) where {L, T <: Real}
18-
return TubularLayer{L, T}(convert(T, s.r_in), convert(T, s.r_ex))
15+
::Type{<:AbstractShape{T}},
16+
s::TubularLayer,
17+
) where {T <: Real}
18+
return TubularLayer{T}(convert(T, s.r_in), convert(T, s.r_ex))
1919
end
2020

2121
# ==========================================
@@ -39,7 +39,7 @@ end
3939
@inline function (b::TubularLayerBuilder{P})(current_r::T) where {P, T <: Real}
4040
# Physics reminder: r_ex = r_in + thickness.
4141
r_ex = current_r + b.t
42-
shape = TubularLayer{Concentric}(current_r, r_ex)
42+
shape = TubularLayer(current_r, r_ex)
4343
return P(b.grp, shape, b.mat)
4444
end
4545

0 commit comments

Comments
 (0)