Skip to content

Commit dd176a4

Browse files
author
Weiwei Wang
committed
fix a segmentation fault bug of mc due to mergence
1 parent b3a1c39 commit dd176a4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/mc/skx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def run(mesh):
1414
mc = MonteCarlo(mesh, name='test1')
1515
mc.set_m(random_m)
1616
J = 50*const.k_B
17-
mc.set_options(H=[0,0,0.0], J=J, D=0.27*J, T=4.0)
17+
mc.set_options(H=[0,0,1.0], J=J, D=0.27*J, T=4.0)
1818
mc.run(steps=100000, save_m_steps=None, save_vtk_steps=50000, save_data_steps=50000)
1919

2020
if __name__=='__main__':

fidimag/atomistic/lib/mc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ void run_step_mc(mt19937_state *state, double *spin, double *new_spin,
165165
delta_E += compute_deltaE_exchange_DMI_hexagonal(
166166
&spin[0], &new_spin[0], &ngbs[0], n_ngbs, J, D, i, new_i);
167167
} else {
168-
delta_E += compute_deltaE_exchange_DMI(&spin[0], &new_spin[0], &ngbs[0], n_ngbs,
169-
&nngbs[0], J, J1, D, D1, i, new_i);
168+
delta_E += compute_deltaE_exchange_DMI(&spin[0], &new_spin[0], &ngbs[0],
169+
&nngbs[0], n_ngbs, J, J1, D, D1, i, new_i);
170170
}
171171

172172
update = 0;

0 commit comments

Comments
 (0)