Commit Graph

2 Commits

Author SHA1 Message Date
Jukka Aho 3cb9a66b94 test(continuum): update cache tests for new material workspace API
Update test_cache_updates.jl to support both legacy and new
GlobalMaterialCache API with proper allocation testing.

- Rename legacy test set to indicate it uses old API
- Update field access to use get_stress/get_tangent getter functions
- Relax allocation test for legacy API (may have NamedTuple overhead)
- Add new test set for GlobalMaterialCache API
- Add zero-allocation verification using BenchmarkTools
- Test both material_cache.σ/𝔻 access patterns
2025-12-12 23:45:56 +02:00
Jukka Aho 727d67c242 test(continuum): Add tests for three-phase cache update functions
New file: test/domains/continuum/test_cache_updates.jl

Tests for:
- update_element_cache! (DOF mapping correctness)
- update_geometry_cache! (Jacobian, gradient computation)
- update_material_cache! (stress, tangent evaluation)

Validates:
- Cache structures populated correctly
- Array sizes match expected dimensions
- Values are finite and reasonable
- Zero allocations in update functions

These tests ensure the three-phase cache update pattern
works correctly before integration into assembly loop.
2025-11-20 16:56:40 +02:00