@@ -67,9 +67,9 @@ def test_hexagonal_demags_1Dchain():
6767 # Brute force demag calculation
6868 sim .add (DemagFull ())
6969
70- sim .get_interaction ('demag_full ' ).compute_field ()
71- sim .get_interaction ('demag_full ' ).field
72- demag_full_energy = sim .compute_energy () / const .meV
70+ sim .get_interaction ('DemagFull ' ).compute_field ()
71+ sim .get_interaction ('DemagFull ' ).field
72+ DemagFull_energy = sim .compute_energy () / const .meV
7373
7474 # Demag using the FFT approach and a larger mesh
7575 sim2 = Sim (mesh )
@@ -78,13 +78,13 @@ def test_hexagonal_demags_1Dchain():
7878 sim2 .set_m (lambda pos : m_init_dw (pos , N , a ))
7979
8080 sim2 .add (DemagHexagonal ())
81- sim2 .get_interaction ('demag_hex ' ).compute_field ()
81+ sim2 .get_interaction ('DemagHexagonal ' ).compute_field ()
8282 sim2 .compute_energy ()
8383
8484 demag_2fft_energy = sim2 .compute_energy () / const .meV
8585
8686 # We compare both energies scaled in meV
87- assert (demag_full_energy - demag_2fft_energy ) < 1e-10
87+ assert (DemagFull_energy - demag_2fft_energy ) < 1e-10
8888
8989
9090def test_cuboid_demags_1Dchain ():
@@ -108,9 +108,9 @@ def test_cuboid_demags_1Dchain():
108108 # Brute force demag calculation
109109 sim .add (DemagFull ())
110110
111- sim .get_interaction ('demag_full ' ).compute_field ()
112- # print sim.get_interaction('demag_full ').field
113- demag_full_energy = sim .compute_energy () / const .meV
111+ sim .get_interaction ('DemagFull ' ).compute_field ()
112+ # print sim.get_interaction('DemagFull ').field
113+ DemagFull_energy = sim .compute_energy () / const .meV
114114
115115 # Demag using the FFT approach
116116 sim2 = Sim (mesh )
@@ -119,13 +119,13 @@ def test_cuboid_demags_1Dchain():
119119 sim2 .set_m (lambda pos : m_init_dw (pos , N , a ))
120120
121121 sim2 .add (Demag ())
122- sim2 .get_interaction ('demag ' ).compute_field ()
122+ sim2 .get_interaction ('Demag ' ).compute_field ()
123123 sim2 .compute_energy ()
124124
125125 demag_fft_energy = sim2 .compute_energy () / const .meV
126126
127127 # We compare both energies scaled in meV
128- assert (demag_full_energy - demag_fft_energy ) < 1e-10
128+ assert (DemagFull_energy - demag_fft_energy ) < 1e-10
129129
130130
131131def test_cuboid_demags_2D ():
@@ -154,9 +154,9 @@ def test_cuboid_demags_2D():
154154 # Brute force demag calculation
155155 sim .add (DemagFull ())
156156
157- sim .get_interaction ('demag_full ' ).compute_field ()
158- # print sim.get_interaction('demag_full ').field
159- demag_full_energy = sim .compute_energy () / const .meV
157+ sim .get_interaction ('DemagFull ' ).compute_field ()
158+ # print sim.get_interaction('DemagFull ').field
159+ DemagFull_energy = sim .compute_energy () / const .meV
160160
161161 # Demag using the FFT approach
162162 sim2 = Sim (mesh )
@@ -165,13 +165,13 @@ def test_cuboid_demags_2D():
165165 sim2 .set_m (lambda pos : m_init_2Dvortex (pos , (xc , yc )))
166166
167167 sim2 .add (Demag ())
168- sim2 .get_interaction ('demag ' ).compute_field ()
168+ sim2 .get_interaction ('Demag ' ).compute_field ()
169169 sim2 .compute_energy ()
170170
171171 demag_fft_energy = sim2 .compute_energy () / const .meV
172172
173173 # We compare both energies scaled in meV
174- assert (demag_full_energy - demag_fft_energy ) < 1e-10
174+ assert (DemagFull_energy - demag_fft_energy ) < 1e-10
175175
176176
177177def test_hexagonal_demags_2D ():
@@ -202,9 +202,9 @@ def test_hexagonal_demags_2D():
202202 # Brute force demag calculation
203203 sim .add (DemagFull ())
204204
205- sim .get_interaction ('demag_full ' ).compute_field ()
206- sim .get_interaction ('demag_full ' ).field
207- demag_full_energy = sim .compute_energy () / const .meV
205+ sim .get_interaction ('DemagFull ' ).compute_field ()
206+ sim .get_interaction ('DemagFull ' ).field
207+ DemagFull_energy = sim .compute_energy () / const .meV
208208
209209 # Demag using the FFT approach and a larger mesh
210210 sim2 = Sim (mesh )
@@ -213,13 +213,13 @@ def test_hexagonal_demags_2D():
213213 sim2 .set_m (lambda pos : m_init_2Dvortex (pos , (xc , yc )))
214214
215215 sim2 .add (DemagHexagonal ())
216- sim2 .get_interaction ('demag_hex ' ).compute_field ()
216+ sim2 .get_interaction ('DemagHexagonal ' ).compute_field ()
217217 sim2 .compute_energy ()
218218
219219 demag_2fft_energy = sim2 .compute_energy () / const .meV
220220
221221 # We compare both energies scaled in meV
222- assert (demag_full_energy - demag_2fft_energy ) < 1e-10
222+ assert (DemagFull_energy - demag_2fft_energy ) < 1e-10
223223
224224
225225if __name__ == '__main__' :
0 commit comments