mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-17 01:02:13 +00:00
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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user