From 3d3a2bd3386dc3baa4d656d472abe0f13740f944 Mon Sep 17 00:00:00 2001 From: Jukka Aho Date: Thu, 20 Nov 2025 18:24:13 +0200 Subject: [PATCH] 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. --- src/mesh/mesh.jl | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/mesh/mesh.jl b/src/mesh/mesh.jl index 8821ad8..9642a8e 100644 --- a/src/mesh/mesh.jl +++ b/src/mesh/mesh.jl @@ -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}};