From 9ea92eacc4a24d3cad55ebfc07271441f0c175d3 Mon Sep 17 00:00:00 2001 From: mortner Date: Mon, 6 May 2024 16:16:02 +0200 Subject: [PATCH] comment out tests --- tests/test_demag.py | 64 ++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/tests/test_demag.py b/tests/test_demag.py index 692bf09..13e7edf 100644 --- a/tests/test_demag.py +++ b/tests/test_demag.py @@ -1,45 +1,45 @@ -import magpylib as magpy +# import magpylib as magpy -import magpylib_material_response +# import magpylib_material_response -print(magpylib_material_response.__version__) -import matplotlib.pyplot as plt -import numpy as np +# print(magpylib_material_response.__version__) +# import matplotlib.pyplot as plt +# import numpy as np -from magpylib_material_response.demag import apply_demag -from magpylib_material_response.meshing import mesh_Cuboid +# from magpylib_material_response.demag import apply_demag +# from magpylib_material_response.meshing import mesh_Cuboid -elements = 4 +# elements = 4 -# hollow cylinder magnet -cuboid = magpy.magnet.Cuboid(polarization=(1, 2, 3), dimension=(2, 2, 2)) -coll = mesh_Cuboid(cuboid, elements) -# coll.susceptibility = (1,2,3,4) -for i in range(len(coll)): - coll[i].susceptibility = (i, i, i * 10) - # coll[i].susceptibility = i -# coll.H_ext = (-10,-10,-10) -coll = apply_demag(coll) +# # hollow cylinder magnet +# cuboid = magpy.magnet.Cuboid(polarization=(1, 2, 3), dimension=(2, 2, 2)) +# coll = mesh_Cuboid(cuboid, elements) +# # coll.susceptibility = (1,2,3,4) +# for i in range(len(coll)): +# coll[i].susceptibility = (i, i, i * 10) +# # coll[i].susceptibility = i +# # coll.H_ext = (-10,-10,-10) +# coll = apply_demag(coll) -fig, ax = plt.subplots() +# fig, ax = plt.subplots() -ts = np.linspace(0, 1, 9) -grid = np.array([[(x, 0.1, z) for x in ts] for z in ts]) +# ts = np.linspace(0, 1, 9) +# grid = np.array([[(x, 0.1, z) for x in ts] for z in ts]) -B = coll.getM(grid) +# B = coll.getM(grid) -# Display the B-field with streamplot using log10-scaled -# color function and linewidth -splt = ax.quiver(grid[:, :, 0], grid[:, :, 2], B[:, :, 0], B[:, :, 2]) +# # Display the B-field with streamplot using log10-scaled +# # color function and linewidth +# splt = ax.quiver(grid[:, :, 0], grid[:, :, 2], B[:, :, 0], B[:, :, 2]) -print(B) +# print(B) -# Figure styling -ax.set( - xlabel="x-position (mm)", - ylabel="z-position (mm)", -) +# # Figure styling +# ax.set( +# xlabel="x-position (mm)", +# ylabel="z-position (mm)", +# ) -plt.tight_layout() -plt.show() +# plt.tight_layout() +# plt.show()