Skip to content

Commit 6cce1ea

Browse files
committed
format examples
1 parent 101031d commit 6cce1ea

File tree

4 files changed

+41
-13
lines changed

4 files changed

+41
-13
lines changed

docs/scripts/generate_example.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ def run_image(folder_example):
4747
data_voxel = pypeec.run_mesher_data(data_geometry)
4848

4949
# run the viewer
50-
pypeec.run_viewer_data(
51-
data_voxel,
52-
data_viewer,
53-
tag_plot=["domain"],
54-
)
50+
pypeec.run_viewer_data(data_voxel, data_viewer, tag_plot=["domain"])
5551

5652

5753
if __name__ == "__main__":

examples/examples_shape/pwm/run_fourier.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,16 @@ def _solve_peec(folder_example, folder_config):
4848
file_solution = os.path.join(folder_example, "solution.pkl")
4949

5050
# run the workflow and load the solution
51-
pypeec.run_mesher_file(file_geometry, file_voxel)
52-
pypeec.run_solver_file(file_voxel, file_problem, file_tolerance, file_solution)
51+
pypeec.run_mesher_file(
52+
file_geometry=file_geometry,
53+
file_voxel=file_voxel,
54+
)
55+
pypeec.run_solver_file(
56+
file_voxel=file_voxel,
57+
file_problem=file_problem,
58+
file_tolerance=file_tolerance,
59+
file_solution=file_solution,
60+
)
5361
data_solution = scisave.load_data(file_solution)
5462

5563
return data_solution

examples/examples_stl/transformer_air/run_matrix.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,16 @@ def _solve_peec(folder_example, folder_config):
4242
file_solution = os.path.join(folder_example, "solution.pkl")
4343

4444
# run the workflow and load the solution
45-
pypeec.run_mesher_file(file_geometry, file_voxel)
46-
pypeec.run_solver_file(file_voxel, file_problem, file_tolerance, file_solution)
45+
pypeec.run_mesher_file(
46+
file_geometry=file_geometry,
47+
file_voxel=file_voxel,
48+
)
49+
pypeec.run_solver_file(
50+
file_voxel=file_voxel,
51+
file_problem=file_problem,
52+
file_tolerance=file_tolerance,
53+
file_solution=file_solution,
54+
)
4755
data_solution = scisave.load_data(file_solution)
4856

4957
return data_solution

tests/code/test_pypeec.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,26 @@ def run_workflow(name, use_script):
140140
_run_script(argv_so)
141141
_run_script(argv_pl)
142142
else:
143-
pypeec.run_mesher_file(file_geometry, file_voxel)
144-
pypeec.run_viewer_file(file_voxel, file_viewer, plot_mode="debug")
145-
pypeec.run_solver_file(file_voxel, file_problem, file_tolerance, file_solution)
146-
pypeec.run_plotter_file(file_solution, file_plotter, plot_mode="debug")
143+
pypeec.run_mesher_file(
144+
file_geometry=file_geometry,
145+
file_voxel=file_voxel,
146+
)
147+
pypeec.run_solver_file(
148+
file_voxel=file_voxel,
149+
file_problem=file_problem,
150+
file_tolerance=file_tolerance,
151+
file_solution=file_solution,
152+
)
153+
pypeec.run_viewer_file(
154+
file_voxel=file_voxel,
155+
file_viewer=file_viewer,
156+
plot_mode="debug",
157+
)
158+
pypeec.run_plotter_file(
159+
file_solution=file_solution,
160+
file_plotter=file_plotter,
161+
plot_mode="debug",
162+
)
147163

148164
# load the files
149165
data_voxel = scisave.load_data(file_voxel)

0 commit comments

Comments
 (0)