|
1 | 1 | # ========================================== |
2 | 2 | # 1. THE VAULT |
3 | 3 | # ========================================== |
4 | | -struct TubularLayer{L, T <: Real} <: AbstractShape{L, T} |
| 4 | +struct TubularLayer{T <: Real} <: AbstractShape{T} |
5 | 5 | r_in::T |
6 | 6 | r_ex::T |
7 | 7 | end |
8 | 8 |
|
9 | | -function TubularLayer{L}(r_in, r_ex) where {L} |
| 9 | +function TubularLayer(r_in, r_ex) |
10 | 10 | 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)) |
12 | 12 | end |
13 | 13 |
|
14 | 14 | 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)) |
19 | 19 | end |
20 | 20 |
|
21 | 21 | # ========================================== |
|
39 | 39 | @inline function (b::TubularLayerBuilder{P})(current_r::T) where {P, T <: Real} |
40 | 40 | # Physics reminder: r_ex = r_in + thickness. |
41 | 41 | r_ex = current_r + b.t |
42 | | - shape = TubularLayer{Concentric}(current_r, r_ex) |
| 42 | + shape = TubularLayer(current_r, r_ex) |
43 | 43 | return P(b.grp, shape, b.mat) |
44 | 44 | end |
45 | 45 |
|
|
0 commit comments