refactor(topology): Update Segment reference_coordinates to SVector of Vec

- Changed Segment{2}: tuple of tuples → SVector of Vec{1,Float64}
- Changed Segment{3}: tuple of tuples → SVector of Vec{1,Float64}
- Both now return SVector(Vec{1}(...), Vec{1}(...), ...) format
This commit is contained in:
Jukka Aho
2025-11-21 00:30:39 +02:00
parent 4bf7d2ef22
commit a1d97bb1ef
+9 -2
View File
@@ -19,11 +19,18 @@ nnodes(::Segment{N}) where {N} = N
dim(::Segment{N}) where {N} = 1
function reference_coordinates(::Segment{2})
return ((-1.0,), (1.0,))
return SVector(
Vec{1,Float64}((-1.0,)),
Vec{1,Float64}((1.0,))
)
end
function reference_coordinates(::Segment{3})
return ((-1.0,), (1.0,), (0.0,))
return SVector(
Vec{1,Float64}((-1.0,)),
Vec{1,Float64}((1.0,)),
Vec{1,Float64}((0.0,))
)
end
function edges(::Segment{N}) where {N}