Skip to content

Commit 04c866d

Browse files
committed
Bug fix: all points of the chunk, also halo points need perturbation
1 parent ccba451 commit 04c866d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/discretization/bond_system_corrections.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ function calc_mfactor!(chunk::AbstractBodyChunk{BondSystem{EnergySurfaceCorrecti
8282
# reset to undeformed positions
8383
storage.position .= system.position
8484
# apply uniform deformation only in dimension d
85-
for i in each_point_idx(system)
86-
@inbounds storage.position[d, i] = λ * system.position[d, i]
87-
end
85+
@views storage.position[d, :] .= λ .* system.position[d, :]
8886
# needed to calculate initial bond lengths
8987
calc_force_density!(storage, system, mat, paramsetup, 0.0, 0.0) # dummy t, Δt
9088
# calculate the mfactor for dimension d

0 commit comments

Comments
 (0)