mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-10-03 22:57:57 +00:00
fix(integration): Resolve IntegrationPoint name conflict
Add alias IntegrationPointNEW to capture NEW API type before it's
shadowed by legacy core_types.jl definitions.
Update integration_points() to explicitly use IntegrationPointNEW{D}
with dimension parameter, avoiding ambiguity between old and new API
types.
This is a temporary workaround during the old→new API migration phase.
Once legacy code is removed, IntegrationPoint will be the canonical type.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
# This file is a part of JuliaFEM.
|
||||
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
|
||||
|
||||
# NOTE: Must create alias before core_types.jl shadows IntegrationPoint!
|
||||
# This is defined in integration/integration.jl as IntegrationPoint{D}
|
||||
const IntegrationPointNEW = IntegrationPoint # Capture NEW API type before it's shadowed
|
||||
|
||||
"""
|
||||
Gauss{N} <: AbstractIntegration
|
||||
|
||||
@@ -235,7 +239,8 @@ function integration_points(scheme::Gauss{N}, topology::T) where {N,T<:AbstractT
|
||||
data_vec = collect(quad_data)
|
||||
result = ntuple(length(data_vec)) do i
|
||||
weight, point = data_vec[i]
|
||||
IntegrationPoint(point, weight) # Type inference from arguments
|
||||
# Use NEW API IntegrationPoint{D} (aliased as IntegrationPointNEW to avoid shadowing)
|
||||
IntegrationPointNEW{D}(point, weight)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user