From f2492640e5f5b666ead261c87acd49a72381dff3 Mon Sep 17 00:00:00 2001 From: Jukka Aho Date: Sun, 9 Nov 2025 08:27:42 +0200 Subject: [PATCH] refactor(basis): Consolidate Lagrange basis includes - Removed 7 individual lagrange_*.jl includes (segments, quadrangles, triangles, tetrahedrons, hexahedrons, wedges, pyramids) - Added lagrange_generator.jl (generation infrastructure) - Added lagrange_generated.jl (auto-generated basis functions for all 15 types) - Updated comment explaining Basis suffix convention (Tri3Basis vs Tri3 topology) - Removed TODO about name conflicts (resolved by Basis suffix pattern) - Comment notes generator script location: scripts/generate_lagrange_basis.jl --- src/JuliaFEM.jl | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/JuliaFEM.jl b/src/JuliaFEM.jl index 6be0bb6..172574d 100644 --- a/src/JuliaFEM.jl +++ b/src/JuliaFEM.jl @@ -191,20 +191,11 @@ include("basis/abstract.jl") include("basis/subs.jl") # Symbolic substitution (includes minimal simplify from SymDiff.jl) include("basis/vandermonde.jl") -# NOTE: Lagrange basis files create types like "Tri3 <: AbstractBasis" -# These conflict with new "Tri3 <: AbstractTopology" types! -# TODO (Phase 2): Rename basis types to avoid conflicts (Tri3Basis, Quad4Basis, etc.) -# For now, we comment out to allow topology/integration to load properly. -# Old code that uses these basis types will need updating. -# -# include("basis/lagrange_generator.jl") -# include("basis/lagrange_segments.jl") -# include("basis/lagrange_quadrangles.jl") -# include("basis/lagrange_triangles.jl") -# include("basis/lagrange_tetrahedrons.jl") -# include("basis/lagrange_hexahedrons.jl") -# include("basis/lagrange_wedges.jl") -# include("basis/lagrange_pyramids.jl") +# Lagrange basis functions - auto-generated file contains all basis types +# Types have "Basis" suffix to avoid conflicts with topology types +# E.g., Tri3Basis, Quad4Basis, etc. (not Tri3, Quad4 which are topology types) +include("basis/lagrange_generator.jl") +include("basis/lagrange_generated.jl") # Auto-generated by scripts/generate_lagrange_basis.jl include("basis/nurbs.jl") include("basis/nurbs_segment.jl")