mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-11 06:08:07 +00:00
aab8b7d6ce
Rewrote test_elasticity_1d.jl to follow immutable element pattern. This is the first fully working test with the new architecture! Changes: 1. test/test_elasticity_1d.jl: - Convert Dict node data to element-local tuple format - Wrap data in DVTI field objects (Discrete, Variable, Time-Invariant) - Create element with fields at construction: Element(Seg2, conn; fields=(...)) - Fix Jacobian shape expectation (3×1 not 1×3 for 1D in 3D) 2. src/JuliaFEM.jl: - Add minimal jacobian() function for AbstractBasis (non-parametric) - Handles embedding (1D element in 3D space) correctly - Returns Matrix instead of Tensor for flexibility 3. src/elements/elements.jl: - Fix Jacobian computation to handle both Tuple and IntegrationPoint - Fix detJ calculation logic for embedded elements (check m not size(JT,2)) - Correctly handle 1D elements: detJ = ||∂X/∂ξ|| Result: test_elasticity_1d.jl passes! ✓ This validates the immutable architecture: - Element created with fields at construction - No mutation needed during test - Field system integration working (DVTI fields) - Jacobian computation working for embedded elements