Commit Graph

12 Commits

Author SHA1 Message Date
Jukka Aho 30b85ba7d6 test(elements): add interpolate_field_value regression 2026-05-09 18:38:50 +03:00
Jukka Aho b7c2fb4da7 test(elements): add elements topic runner 2026-05-09 18:38:49 +03:00
Jukka Aho 07b5ffeedc chore(test): delete single-element smoke tests
Remove minimal element harness superseded by structured mesh tests.

- Drop `test/elements/test_single_element.jl`.
2026-05-09 18:26:48 +03:00
Jukka Aho 499cf4b149 chore(test): remove old interpolation entry tests
Delete redundant interpolation coverage replaced by `test_interpolate_field_value.jl`.

- Drop `test/elements/test_interpolate.jl`.
2026-05-09 18:26:48 +03:00
Jukka Aho 84614fe44e chore(test): delete legacy element construction suite
Remove constructor tests superseded by `Element{K,P,S,N}` templates.

- Drop `test/elements/test_element_construction.jl`.
2026-05-09 18:26:48 +03:00
Jukka Aho 3153ba5771 chore(test): drop CElement real-basis regression
Remove outdated basis coupling tests for removed element APIs.

- Delete `test/elements/test_celement_real_basis.jl`.
2026-05-09 18:26:47 +03:00
Jukka Aho acf2b75b51 test(elements): add single element patch test
New 312-line test file for single-element patch test:
- Tests core assembly infrastructure with single Tet10 element
- Validates material model (LinearElastic) stress computation
- Tests strain computation from displacement gradients
- Validates zero-allocation in assembly helpers
- Tests type stability with @inferred checks
- Validates stiffness matrix symmetry and positive definiteness
- Tests uniaxial tension case with known analytical solution

Fundamental validation test isolating assembly implementation
from mesh complexities and solver issues.
2025-12-15 08:10:55 +02:00
Jukka Aho fd0241e6e9 test(elements): add interpolation test
New 234-line test file for interpolate_fields functions:
- Tests single-field scalar interpolation (Temperature)
- Tests single-field vector interpolation (Displacement 2D/3D)
- Tests multi-field interpolation (Temperature + Displacement)
- Tests field value and gradient extraction
- Tests individual field extraction (interpolate_field)
- Tests value-only extraction (interpolate_field_value)
- Validates zero-allocation for all interpolation functions
- Tests NamedTuple return types with proper field structure

Comprehensive test ensuring field interpolation works correctly
for all field types and maintains zero-allocation performance.
2025-12-15 08:10:15 +02:00
Jukka Aho fd63377af3 test(elements): add DOF extraction test
New 218-line test file for extract_element_dofs functions:
- Tests single-field scalar extraction (Temperature)
- Tests single-field vector extraction (Displacement 2D/3D)
- Tests multi-field extraction (Temperature + Displacement)
- Tests non-contiguous DOF indices
- Tests both flat and structured extraction variants
- Validates zero-allocation for all extraction functions
- Tests NamedTuple return types with proper field names

Comprehensive test ensuring DOF extraction works correctly for
all field types and maintains zero-allocation performance.
2025-12-15 08:09:22 +02:00
Jukka Aho 728bfe1a42 test(elements): add element construction test
New 425-line test file for Element construction API:
- Tests separation of concerns: Topology + Basis + Integration + Fields
- Tests 2D/3D elements: Triangles, Tetrahedra, Quadrilaterals, Hexahedra
- Tests P1 and P2 variants with correct node counts
- Validates backward compatibility aliases (Tet4, Tri3, Quad4, Hex8)
- Tests topology properties independent of basis degree
- Tests type-stable NamedTuple fields (100× faster than Dict)
- Tests integration point storage in elements
- Validates zero-allocation element access

Comprehensive test demonstrating new Element API architecture with
proper separation of concerns and type stability.
2025-12-15 08:06:33 +02:00
Jukka Aho d3a8239642 test(elements): add CElement real basis functions test
New 285-line test file verifying CElement uses real Lagrange basis:
- Tests Tri3 and Tet4 linear interpolation (exact at nodes)
- Tests gradient computation for scalar and vector DOFs
- Validates partition of unity property (sum of basis = 1)
- Tests linear reproduction (linear functions reproduced exactly)
- Tests deformation gradient for VectorDOF{2}
- Verifies basis functions from basis_generated.jl, not stubs

Ensures CElement correctly uses actual Lagrange basis functions
with proper mathematical properties.
2025-12-15 08:02:16 +02:00
Jukka Aho b0897a40e3 test(elements): add local field interpolation test
Test file included in main test/runtests.jl
Tests interpolate_local_fields() function for LocalField creation
2025-12-15 06:32:50 +02:00