mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-17 09:12:09 +00:00
refactor(src): remove scatter_to_force.jl
src/assemblers/scatter_to_force.jl | 37 ------------------------------------- 1 file changed, 37 deletions(-)
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
# This file is a part of JuliaFEM.
|
||||
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
|
||||
|
||||
"""
|
||||
scatter_to_force!(f::Vector{Float64}, fe::AbstractVector, dofs::AbstractVector{Int})
|
||||
|
||||
Scatter element force vector to global force vector **in-place** (legacy format).
|
||||
|
||||
Accumulates element contributions: `f[dofs] += fe`
|
||||
|
||||
# Arguments
|
||||
- `f`: Global force vector (modified in-place)
|
||||
- `fe`: Element force vector [ndofs_elem]
|
||||
- `dofs`: Global DOF indices [ndofs_elem]
|
||||
|
||||
# Zero-Allocation Guarantee
|
||||
|
||||
No allocations - modifies `f` in-place.
|
||||
|
||||
# Algorithm
|
||||
|
||||
```julia
|
||||
for (i_local, i_global) in enumerate(dofs)
|
||||
f[i_global] += fe[i_local]
|
||||
end
|
||||
```
|
||||
"""
|
||||
function scatter_to_force!(
|
||||
f::Vector{Float64},
|
||||
fe::Vector{Float64},
|
||||
dofs::Vector{Int}
|
||||
)
|
||||
for (i_local, i_global) in enumerate(dofs)
|
||||
f[i_global] += fe[i_local]
|
||||
end
|
||||
return nothing
|
||||
end
|
||||
Reference in New Issue
Block a user