refactor(topology): dedupe Segment nnodes and exports

Use the generic `AbstractTopology{N}` node count, fix LICENSE URL, and remove
duplicate `Seg*` exports.

- Drop redundant `nnodes`/`export` lines from `segments.jl`.
This commit is contained in:
Jukka Aho
2026-05-09 18:22:28 +03:00
parent ca78e6a645
commit 30e405ecba
+1 -3
View File
@@ -1,5 +1,5 @@
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
"""
Segment{N} <: AbstractTopology{N}
@@ -15,7 +15,6 @@ struct Segment{N} <: AbstractTopology{N} end
const Seg2 = Segment{2}
const Seg3 = Segment{3}
nnodes(::Segment{N}) where {N} = N
dim(::Segment{N}) where {N} = 1
function reference_coordinates(::Segment{2})
@@ -53,4 +52,3 @@ nvertices(::Segment) = 2
nedges(::Segment) = 1
nfaces(::Segment) = 2 # Two endpoints
export Seg2, Seg3