pypeec.main
- Module containing the program entry points.
Used for calling the mesher, solver, viewer, and plotter.
Files can be used for the input and output data.
Data structure can be used for the input and output data.
The import statements for the different modules are located inside the code.
This allows for a minimization of the loaded dependencies.
- pypeec.main.run_display_logo()
Display the logo as a splash screen.
- pypeec.main.run_extract(data_name, is_zip, path_extract)
Extract data (config, examples, or documentation).
- Parameters:
data_name (string) – Name of the file containing the data.
is_zip (boolean) – Indicate if the data is a zip archive.
path_extract (string) – Path where the data will be extracted.
- pypeec.main.run_mesher_data(data_geometry)
- Main script for meshing the geometry and generating a 3D voxel structure.
Get the geometry data as an argument.
Return the created voxel data.
- Parameters:
data_geometry (data) – The dict describes the geometry, meshing and resampling process.
- Returns:
data_voxel – The dict describes the voxel structure.
- Return type:
data
- pypeec.main.run_mesher_file(file_geometry, file_voxel)
- Main script for meshing the geometry and generating a 3D voxel structure.
Load the geometry data from a file.
Write the created voxel data in a file.
- Parameters:
file_geometry (filename) – The file content describes the geometry, meshing and resampling process. This input file is loaded by this function (JSON or YAML format).
file_voxel (filename) – The file content describes the voxel structure. This output file is written by this function (JSON or Pickle format).
- pypeec.main.run_viewer_data(data_voxel, data_viewer, **kwargs)
- Main script for visualizing a 3D voxel structure.
Get the voxel data as an argument.
Get the point data as an argument.
Get the viewer data as an argument.
- Parameters:
data_voxel (data) – The dict describes the voxel structure.
data_viewer (data) – The dict describes the different plots to be created.
tag_plot (list) – The list describes plots to be shown. If None, all the plots are shown (default). This argument is optional.
plot_mode (string) – If “qt”, the Qt framework is used for the rendering (default). If “nb”, the plots are rendered within the Jupyter notebook. If “save”, the plots are not shown but saved as screenshots. If “none”, the plots are not shown (test mode). This argument is optional.
folder (string) – Folder name for saving the screenshots. The current directory is used as the default directory. This argument is optional.
name (string) – Prepended at the beginning of the screenshot filenames. This argument is optional.
- pypeec.main.run_viewer_file(file_voxel, file_viewer, **kwargs)
- Main script for visualizing a 3D voxel structure.
Load the voxel data from a file.
Load the point data from a file.
Load the viewer data from a file.
- Parameters:
file_voxel (filename) – The file content describes the voxel structure. This input file is loaded by this function (JSON or Pickle format).
file_viewer (filename) – The file content describes the different plots to be created. This input file is loaded by this function (JSON or YAML format).
tag_plot (list) – The list describes plots to be shown. If None, all the plots are shown (default). This argument is optional.
plot_mode (string) – If “qt”, the Qt framework is used for the rendering (default). If “nb”, the plots are rendered within the Jupyter notebook. If “save”, the plots are not shown but saved as screenshots. If “none”, the plots are not shown (test mode). This argument is optional.
folder (string) – Folder name for saving the screenshots. The current directory is used as the default directory. This argument is optional.
name (string) – Prepended at the beginning of the screenshot filenames. This argument is optional.
- pypeec.main.run_solver_data(data_voxel, data_problem, data_tolerance)
- Main script for solving a problem with the PEEC solver.
Get the voxel data as an argument.
Get the problem data as an argument.
Get the tolerance data as an argument.
Return the created solution data.
- Parameters:
data_voxel (data) – The dict describes the voxel structure.
data_problem (data) – The dict describes the problem to be solved.
data_tolerance (data) – The dict describes the numerical options.
- Returns:
data_solution – The dict describes the problem solution.
- Return type:
data
- pypeec.main.run_solver_file(file_voxel, file_problem, file_tolerance, file_solution)
- Main script for solving a problem with the PEEC solver.
Load the voxel data from a file.
Load the problem data from a file.
Load the tolerance data from a file.
Write the created solution data in a file.
- Parameters:
file_voxel (filename) – The file content describes the voxel structure. This input file is loaded by this function (JSON or Pickle format).
file_problem (filename) – The file content describes the problem to be solved. This input file is loaded by this function (JSON or YAML format).
file_tolerance (filename) – The file content describes the numerical options. This input file is loaded by this function (JSON or YAML format).
file_solution (filename) – The file content describes the problem solution. This output file is written by this function (JSON or Pickle format).
- pypeec.main.run_plotter_data(data_solution, data_plotter, **kwargs)
- Main script for plotting the solution of a PEEC problem.
Get the solution data as an argument.
Get the point data as an argument.
Get the plotter data as an argument.
- Parameters:
data_solution (data) – The dict describes the problem solution.
data_plotter (data) – The dict describes the different plots to be created.
tag_sweep (list) – The list describes sweeps to be shown. If None, all the sweeps are shown (default). This argument is optional.
tag_plot (list) – The list describes plots to be shown. If None, all the plots are shown (default). This argument is optional.
plot_mode (string) – If “qt”, the Qt framework is used for the rendering (default). If “nb”, the plots are rendered within the Jupyter notebook. If “save”, the plots are not shown but saved as screenshots. If “none”, the plots are not shown (test mode). This argument is optional.
folder (string) – Folder name for saving the screenshots. The current directory is used as the default directory. This argument is optional.
name (string) – Prepended at the beginning of the screenshot filenames. This argument is optional.
- pypeec.main.run_plotter_file(file_solution, file_plotter, **kwargs)
- Main script for plotting the solution of a PEEC problem.
Load the solution data from a file.
Load the point data from a file.
Load the plotter data from a file.
- Parameters:
file_solution (filename) – The dict describes the problem solution. This input file is loaded by this function (JSON or Pickle format).
file_plotter (filename) – The dict describes the different plots to be created. This input file is loaded by this function (JSON or YAML format).
tag_sweep (list) – The list describes sweeps to be shown. If None, all the sweeps are shown (default). This argument is optional.
tag_plot (list) – The list describes plots to be shown. If None, all the plots are shown (default). This argument is optional.
plot_mode (string) – If “qt”, the Qt framework is used for the rendering (default). If “nb”, the plots are rendered within the Jupyter notebook. If “save”, the plots are not shown but saved as screenshots. If “none”, the plots are not shown (test mode). This argument is optional.
folder (string) – Folder name for saving the screenshots. The current directory is used as the default directory. This argument is optional.
name (string) – Prepended at the beginning of the screenshot filenames. This argument is optional.