mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-19 09:54:55 +00:00
Merge pull request #225 from JuliaFEM/KristofferC-patch-2
Improve performance in elasticity by moving out the computation of X from the integration point loop. Before: ``` 12.576967 seconds (37.65 M allocations: 1.852 GiB, 11.65% gc time) ``` After: ``` 11.251927 seconds (35.27 M allocations: 1.692 GiB, 11.27% gc time) ``` 2 million allocations less.
This commit is contained in:
@@ -130,13 +130,14 @@ function assemble!(assembly::Assembly,
|
||||
for element in elements
|
||||
|
||||
u = element("displacement", time)
|
||||
X = element("geometry", time)
|
||||
|
||||
fill!(Km, 0.0)
|
||||
fill!(Kg, 0.0)
|
||||
fill!(f_int, 0.0)
|
||||
fill!(f_ext, 0.0)
|
||||
|
||||
for ip in get_integration_points(element)
|
||||
X = element("geometry", time)
|
||||
eval_basis!(bi, X, ip)
|
||||
w = ip.weight*bi.detJ
|
||||
N = bi.N
|
||||
|
||||
Reference in New Issue
Block a user