mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-08-29 07:32:54 +00:00
refactor(mesh): Remove duplicate Mesh constructor
Remove positional argument constructor that duplicated keyword constructor functionality. This eliminates method overwrite warning.
Kept only the keyword constructor which provides clearer API:
- mesh = Mesh{Hex8}(nodes, conn; element_sets=..., node_sets=...)
The keyword version is more explicit and prevents accidental parameter ordering mistakes.
This commit is contained in:
@@ -153,16 +153,6 @@ struct Mesh{N,T<:AbstractTopology{N}} <: AbstractMesh
|
||||
end
|
||||
|
||||
# Positional constructor for convenience (backward compatibility)
|
||||
function Mesh{T}(
|
||||
nodes::Vector{Vec{3,Float64}},
|
||||
connectivity::Vector{NTuple{N,UInt32}},
|
||||
element_sets::Dict{Symbol,Set{UInt32}}=Dict{Symbol,Set{UInt32}}(),
|
||||
node_sets::Dict{Symbol,Set{UInt32}}=Dict{Symbol,Set{UInt32}}()
|
||||
) where {N,T<:AbstractTopology{N}}
|
||||
Mesh{N,T}(nodes, connectivity, element_sets, node_sets)
|
||||
end
|
||||
|
||||
# Keyword constructor for convenience
|
||||
function Mesh{T}(
|
||||
nodes::Vector{Vec{3,Float64}},
|
||||
connectivity::Vector{NTuple{N,UInt32}};
|
||||
|
||||
Reference in New Issue
Block a user