mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-17 17:22:10 +00:00
refactor(assemblers): Update compute_block! call site in element_based_coo
Updated compute_block! call to pass arrays directly from caches: - geometry_cache.∇N_data - geometry_cache.detJ_w - material_cache.𝔻 Removed commented counter write-back line, added explanatory comment. Maintains symmetric assembly optimization (upper triangle only).
This commit is contained in:
@@ -91,7 +91,13 @@ function assemble_element!(
|
||||
# Assemble only upper triangle (k ≤ l) since stiffness matrix is symmetric
|
||||
# This halves computation and memory usage
|
||||
@inbounds for k in 1:N, l in k:N # Only l ≥ k (upper triangle)
|
||||
compute_block!(element_cache.K_blocks, geometry_cache, material_cache, k, l)
|
||||
compute_block!(
|
||||
element_cache.K_blocks,
|
||||
geometry_cache.∇N_data,
|
||||
geometry_cache.detJ_w,
|
||||
material_cache.𝔻,
|
||||
k, l
|
||||
)
|
||||
end
|
||||
|
||||
return nothing
|
||||
@@ -221,7 +227,8 @@ function assemble!(
|
||||
end
|
||||
|
||||
# Write counter back ONCE after loop
|
||||
# cache.counter[] = counter
|
||||
# NOTE: counter MUST be written back so extract_system() knows how many triplets to extract
|
||||
cache.counter[] = counter
|
||||
|
||||
return nothing
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user