From 7ffecf73e7609254e7ba584dec8023e24ccdb56d Mon Sep 17 00:00:00 2001 From: Jukka Aho Date: Mon, 10 Nov 2025 22:25:41 +0200 Subject: [PATCH] refactor(core): Update JuliaFEM.jl exports for new APIs - Add new basis API exports: get_basis_functions, get_basis_derivatives - Export both update() (immutable) and update!() (legacy) - Re-enable assemble! and postprocess! exports - Document new basis API with ADR-003 reference - Include basis_api.jl for dual-API support (modern + legacy) --- src/JuliaFEM.jl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/JuliaFEM.jl b/src/JuliaFEM.jl index 05330f8..756ee1d 100644 --- a/src/JuliaFEM.jl +++ b/src/JuliaFEM.jl @@ -204,15 +204,22 @@ include("basis/abstract.jl") include("basis/subs.jl") # Symbolic substitution (includes minimal simplify from SymDiff.jl) include("basis/vandermonde.jl") +# NEW BASIS API (November 2025 - see docs/book/adr-003-basis-function-api.md) +include("basis/basis_api.jl") # New API: get_basis_functions, get_basis_derivatives + # Lagrange basis functions - auto-generated file contains all basis types -# Now generates methods for parametric Lagrange{T,P} type instead of separate types +# Now generates methods for parametric Lagrange{T,P} type with BOTH old and new APIs include("basis/lagrange_generator.jl") include("basis/lagrange_generated.jl") # Auto-generated by: julia --project=. src/basis/lagrange_generator.jl -# Export basis types and functions +# Export basis types and functions (OLD API) export AbstractBasis, Lagrange, Serendipity export nnodes, get_reference_element_coordinates, eval_basis!, eval_dbasis! +# Export new API functions (NEW API - November 2025) +export get_basis_functions, get_basis_derivatives +export get_basis_function, get_basis_derivative + include("basis/nurbs.jl") # OLD NURBS basis files - commented out during AbstractBasis refactoring # These use AbstractBasis{dim} syntax which conflicts with new non-parametric AbstractBasis @@ -288,7 +295,7 @@ include("graph/graph_ordering.jl") include("problems_dirichlet.jl") export Dirichlet -# export assemble!, postprocess! +export assemble!, postprocess! # TODO: Consolidate vendor packages (FEMBeam, Mortar) later # Structural elements: beams @@ -356,7 +363,7 @@ export DCTI, DVTI, DCTV, DVTV, CCTI, CVTI, CCTV, CVTV, Increment export FieldProblem, BoundaryProblem, Problem, Node, Element, Assembly export Poi1, Seg2, Seg3, Tri3, Tri6, Tri7, Quad4, Quad8, Quad9, Tet4, Tet10, Pyr5, Wedge6, Wedge15, Hex8, Hex20, Hex27 -export update!, add_element!, add_elements!, get_unknown_field_name, add!, +export update!, update, add_element!, add_elements!, get_unknown_field_name, add!, is_field_problem, is_boundary_problem, get_gdofs, initialize!, get_integration_points, group_by_element_type, get_unknown_field_dimension, get_connectivity