From 0f6924f62f26a1de7c5ace25769966a5e2c059f9 Mon Sep 17 00:00:00 2001 From: Jukka Aho Date: Sat, 9 May 2026 18:45:48 +0300 Subject: [PATCH] test(continuum): reset tests use GlobalMaterialCache + geometry arity Material-cache reset coverage should populate stresses through the global cache API rather than the removed `create_material_state` helper. - Mirror production signatures for `update_geometry_cache!` / `update_material_cache!`. --- test/domains/continuum/test_reset_functions.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/domains/continuum/test_reset_functions.jl b/test/domains/continuum/test_reset_functions.jl index da0ed97..6a448b9 100644 --- a/test/domains/continuum/test_reset_functions.jl +++ b/test/domains/continuum/test_reset_functions.jl @@ -24,7 +24,7 @@ include("test_helpers.jl") @testset "reset!(GeometryCache)" begin # Populate with data first elem_id = 1 - JuliaFEM.update_geometry_cache!(geometry_cache, element_cache, kernel, elem_id, mesh) + JuliaFEM.update_geometry_cache!(geometry_cache, element_cache, elem_id, mesh) # Verify data exists @test any(x -> norm(x) > 0, geometry_cache.X) @@ -71,13 +71,14 @@ include("test_helpers.jl") # Populate with data first (need geometry cache) elem_id = 1 u_global = nothing - state_old = create_material_state(kernel, mesh) Δt = 0.01 + global_cache = JuliaFEM.create_global_material_cache(kernel.material; + n_ips=NIP, n_elems=1) - JuliaFEM.update_geometry_cache!(geometry_cache, element_cache, kernel, elem_id, mesh) + JuliaFEM.update_geometry_cache!(geometry_cache, element_cache, elem_id, mesh) JuliaFEM.update_element_cache!(element_cache, kernel, elem_id, mesh, u_global) JuliaFEM.update_material_cache!(material_cache, geometry_cache, kernel.material, - element_cache, state_old, elem_id, Δt) + element_cache, global_cache, elem_id, Δt) # Verify data exists (tangent should be non-zero for linear elastic) @test any(q -> norm(JuliaFEM.get_tangent(material_cache, q)) > 0, 1:NIP)