New 23-line test file for postprocessing functionality:
- Tests field interpolation from elements
- Tests temperature field interpolation on 1D segment elements
- Tests interpolation at various points including boundaries
- Tests NaN handling for points outside domain
Simple test validating postprocessing interpolation works correctly.
New 255-line test file for zero-allocation integration points API:
- Tests get_gauss_points! function for all topologies
- Validates zero-allocation performance requirement
- Tests return types (NTuple of (weight, ξ) pairs)
- Tests integration point counts for different Gauss orders
- Validates weight sums equal reference element volumes
- Tests usage in assembly loop pattern
- Includes performance benchmarking
Comprehensive test ensuring integration points API provides
zero-allocation compile-time resolved quadrature points.
New 263-line test file for strain tensor computation:
- Tests ε = ½(∇u + ∇u^T) from displacement gradients
- Tests uniaxial extension case
- Tests pure shear deformation
- Tests rigid body translation (should produce zero strain)
- Validates symmetry property (ε = ε^T)
- Tests type stability and zero-allocation performance
- Includes performance benchmark (< 200 ns target)
Comprehensive test for strain computation essential for solid
mechanics and material model evaluation.
New 384-line test file for Jacobian matrix computation:
- Tests J = ∂x/∂ξ mapping between parametric and physical coordinates
- Tests identity, scaled, and rotated element transformations
- Tests 2D triangles and 3D tetrahedra
- Tests physical derivatives: dN/dx = J⁻¹ · dN/dξ
- Validates element quality detection (det(J) > 0)
- Tests consistency with manual calculations
- Validates type stability and zero-allocation performance
- Tests both NTuple and Vector interfaces
Comprehensive test for Jacobian computation essential for coordinate
transformation and integration in FEM assembly.
New 561-line test file for deformation gradient computation:
- Tests F = ∂x/∂X = I + ∂u/∂X for finite strain mechanics
- Tests identity case (u = 0 → F = I)
- Tests pure translation (rigid body motion)
- Tests pure stretch and simple shear cases
- Tests small vs finite strain difference
- Validates physical constraints (det(F) > 0)
- Tests Hex8 and Tet10 elements
- Validates zero-allocation performance
Comprehensive test for deformation gradient computation essential
for finite strain analysis and hyperelastic materials.
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.
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.
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.
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.
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.
New 118-line minimal test demonstrating complex multi-physics:
- Tests 4-field THME system (Temperature, Displacement, Pressure,
Electric potential) in under 100 lines of code
- Demonstrates all 6 bidirectional couplings (12 coupling blocks)
- Shows that complex physics does not require complex code
- Validates thermal expansion, Biot poroelasticity, thermal pressurization,
electro-osmotic, Seebeck/Peltier, and piezoelectric coupling
- Tests simultaneous assembly of all physics in one element loop
- Demonstrates type-safe field access and local-to-global mapping
Minimal but complete demonstration of multi-field Element API for
geothermal, nuclear waste, CO2 sequestration, and smart materials.
New 399-line test file demonstrating ultimate multi-physics coupling:
- Tests 4-field system: Temperature (vertices), Displacement (vertices),
Pore pressure (cells), Electric potential (edges)
- Implements fully coupled THM-E system with off-diagonal blocks
- Demonstrates thermal-mechanical coupling (K_uT)
- Demonstrates poroelastic coupling (K_up, K_pu)
- Tests simultaneous assembly in one pass for all fields
- Validates global DOF numbering across different entity types
- Shows type-safe field access: elem.dof_indices.T, .u, .p, .φ
Ultimate demonstration of multi-field Element API for complex
coupled physics: geomechanics, CO2 sequestration, nuclear waste,
electrokinetic remediation, geothermal energy.
New 166-line test file for variadic MixedDOF type system:
- Tests type-level multi-field composition with @MixedDOF macro
- Validates DOF indices structure (tuple of tuples, not NamedTuple)
- Tests DOF sharing between elements for different entity types
- Compares MixedDOF (vararg) vs NamedTuple approaches
- Demonstrates 4-field mixed system: Temperature, Displacement,
Pressure, Electric potential on different entities
Validates variadic approach to multi-field elements where DOF types
are mixed as type parameters rather than named fields.
Test suite organizer for basis module.
Includes all basis function tests: partition of unity, derivatives,
interpolation, type stability, numerical accuracy, etc.