refactor(deprecated): Remove old getproperty redirection for new Element API

- Comment out Base.getproperty(element::Element, :fields) redirection
- Old code redirected element.fields → element.dfields (Dict-based fields)
- New Element has fields::F directly (type-stable NamedTuple or struct)
- No redirection needed with new architecture
- Rationale: New Element{N,NIP,F,B} has fields as direct struct member
This commit is contained in:
Jukka Aho
2025-11-09 17:09:27 +02:00
parent 782e559d4b
commit f89d48a112
+9 -8
View File
@@ -119,14 +119,15 @@ function interpolate(element::AbstractElement, field_name::String, ip, time)
interpolate(element, Symbol(field_name), ip, time)
end
# fields is now dfields
function Base.getproperty(element::Element, sym::Symbol)
if sym === :fields # Use === instead of == (which is overridden by fields.jl)
return getfield(element, :dfields)
else
return getfield(element, sym)
end
end
# OLD: fields is now dfields - DEPRECATED with new Element{N,NIP,F,B} architecture
# New Element struct has `fields::F` directly, no need for redirection
# function Base.getproperty(element::Element, sym::Symbol)
# if sym === :fields # Use === instead of == (which is overridden by fields.jl)
# return getfield(element, :dfields)
# else
# return getfield(element, sym)
# end
# end
# getindex, when someone asks key element.fields["f"] => element.fields[:f]
function Base.getindex(fieldset::Dict{Symbol,AbstractField}, field_name::String)