Skip to content

Commit 9b92c2f

Browse files
committed
[BC] Fixing import
1 parent bcf23fb commit 9b92c2f

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

Tests/Validation/Simulation/Magnetics/test_meshsolution_plots.py

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
from pyleecan.Functions.load import load
2-
from pyleecan.definitions import DATA_DIR
3-
4-
from pyleecan.Classes.Simu1 import Simu1
5-
from pyleecan.Classes.InputCurrent import InputCurrent
6-
from pyleecan.Classes.ImportGenVectLin import ImportGenVectLin
7-
from pyleecan.Classes.ImportMatrixVal import ImportMatrixVal
8-
from pyleecan.Classes.MagFEMM import MagFEMM
9-
from pyleecan.Classes.Output import Output
10-
11-
from Tests import save_plot_path
12-
from Tests import save_load_path
1+
import json
2+
from multiprocessing import cpu_count
133
from os.path import join
14-
from numpy import zeros, ones, pi, array
154

165
import matplotlib.pyplot as plt
17-
import json
186
import numpy as np
197
import pytest
8+
from numpy import array, ones, pi, zeros
9+
from pyleecan.Classes.ImportGenVectLin import ImportGenVectLin
10+
from pyleecan.Classes.ImportMatrixVal import ImportMatrixVal
11+
from pyleecan.Classes.InputCurrent import InputCurrent
12+
from pyleecan.Classes.MagFEMM import MagFEMM
13+
from pyleecan.Classes.Output import Output
14+
from pyleecan.Classes.Simu1 import Simu1
15+
from pyleecan.definitions import DATA_DIR
16+
from pyleecan.Functions.load import load
17+
from Tests import save_load_path, save_plot_path
2018

2119

2220
@pytest.mark.long
@@ -81,37 +79,41 @@ def test_SIPMSM_003():
8179
simu_sym.run()
8280

8381
out.mag.meshsolution.plot_mesh(
84-
save_path=join(save_path, simu.name + "_mesh.png"), is_show_fig=False
82+
save_path=join(save_plot_path, simu.name + "_mesh.png"), is_show_fig=False
8583
)
8684

8785
out.mag.meshsolution.plot_mesh(
8886
group_names="stator core",
89-
save_path=join(save_path, simu.name + "_mesh_stator.png"),
87+
save_path=join(save_plot_path, simu.name + "_mesh_stator.png"),
9088
is_show_fig=False,
9189
)
9290

9391
out.mag.meshsolution.plot_mesh(
9492
group_names=["stator core", "/", "airgap", "stator winding"],
95-
save_path=join(save_path, simu.name + "_mesh_stator_interface.png"),
93+
save_path=join(save_plot_path, simu.name + "_mesh_stator_interface.png"),
9694
is_show_fig=False,
9795
)
9896

9997
out.mag.meshsolution.plot_contour(
10098
label="\mu",
101-
save_path=join(save_path, simu.name + "_mu.png"),
99+
save_path=join(save_plot_path, simu.name + "_mu.png"),
102100
is_show_fig=False,
103101
)
104102
out.mag.meshsolution.plot_contour(
105-
label="B", save_path=join(save_path, simu.name + "_B.png"), is_show_fig=False
103+
label="B",
104+
save_path=join(save_plot_path, simu.name + "_B.png"),
105+
is_show_fig=False,
106106
)
107107
out.mag.meshsolution.plot_contour(
108-
label="H", save_path=join(save_path, simu.name + "_H.png"), is_show_fig=False
108+
label="H",
109+
save_path=join(save_plot_path, simu.name + "_H.png"),
110+
is_show_fig=False,
109111
)
110112

111113
out.mag.meshsolution.plot_contour(
112114
label="H",
113115
group_names="stator core",
114-
save_path=join(save_path, simu.name + "_H_stator.png"),
116+
save_path=join(save_plot_path, simu.name + "_H_stator.png"),
115117
is_show_fig=False,
116118
)
117119

0 commit comments

Comments
 (0)