Skip to content

Commit 9ea92ea

Browse files
committed
comment out tests
1 parent 6840233 commit 9ea92ea

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

tests/test_demag.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
import magpylib as magpy
1+
# import magpylib as magpy
22

3-
import magpylib_material_response
3+
# import magpylib_material_response
44

5-
print(magpylib_material_response.__version__)
6-
import matplotlib.pyplot as plt
7-
import numpy as np
5+
# print(magpylib_material_response.__version__)
6+
# import matplotlib.pyplot as plt
7+
# import numpy as np
88

9-
from magpylib_material_response.demag import apply_demag
10-
from magpylib_material_response.meshing import mesh_Cuboid
9+
# from magpylib_material_response.demag import apply_demag
10+
# from magpylib_material_response.meshing import mesh_Cuboid
1111

12-
elements = 4
12+
# elements = 4
1313

14-
# hollow cylinder magnet
15-
cuboid = magpy.magnet.Cuboid(polarization=(1, 2, 3), dimension=(2, 2, 2))
16-
coll = mesh_Cuboid(cuboid, elements)
17-
# coll.susceptibility = (1,2,3,4)
18-
for i in range(len(coll)):
19-
coll[i].susceptibility = (i, i, i * 10)
20-
# coll[i].susceptibility = i
21-
# coll.H_ext = (-10,-10,-10)
22-
coll = apply_demag(coll)
14+
# # hollow cylinder magnet
15+
# cuboid = magpy.magnet.Cuboid(polarization=(1, 2, 3), dimension=(2, 2, 2))
16+
# coll = mesh_Cuboid(cuboid, elements)
17+
# # coll.susceptibility = (1,2,3,4)
18+
# for i in range(len(coll)):
19+
# coll[i].susceptibility = (i, i, i * 10)
20+
# # coll[i].susceptibility = i
21+
# # coll.H_ext = (-10,-10,-10)
22+
# coll = apply_demag(coll)
2323

24-
fig, ax = plt.subplots()
24+
# fig, ax = plt.subplots()
2525

26-
ts = np.linspace(0, 1, 9)
27-
grid = np.array([[(x, 0.1, z) for x in ts] for z in ts])
26+
# ts = np.linspace(0, 1, 9)
27+
# grid = np.array([[(x, 0.1, z) for x in ts] for z in ts])
2828

29-
B = coll.getM(grid)
29+
# B = coll.getM(grid)
3030

31-
# Display the B-field with streamplot using log10-scaled
32-
# color function and linewidth
33-
splt = ax.quiver(grid[:, :, 0], grid[:, :, 2], B[:, :, 0], B[:, :, 2])
31+
# # Display the B-field with streamplot using log10-scaled
32+
# # color function and linewidth
33+
# splt = ax.quiver(grid[:, :, 0], grid[:, :, 2], B[:, :, 0], B[:, :, 2])
3434

35-
print(B)
35+
# print(B)
3636

3737

38-
# Figure styling
39-
ax.set(
40-
xlabel="x-position (mm)",
41-
ylabel="z-position (mm)",
42-
)
38+
# # Figure styling
39+
# ax.set(
40+
# xlabel="x-position (mm)",
41+
# ylabel="z-position (mm)",
42+
# )
4343

44-
plt.tight_layout()
45-
plt.show()
44+
# plt.tight_layout()
45+
# plt.show()

0 commit comments

Comments
 (0)