Modules¶
Command-line interface (CLI) for Fleetmaster.
This module provides the main entrypoint for the Fleetmaster CLI, a tool for
running hydrodynamic simulations with Capytaine. It uses the click library
to define the main command group and handles global options like version and
verbosity.
Functions:
| Name | Description |
|---|---|
cli |
The main CLI entrypoint that registers subcommands and sets up logging. |
Commands
run: Runs a batch of Capytaine simulations based on a settings file or CLI options. gui: Launches the Fleetmaster graphical user interface (GUI).
cli(verbose)
¶
The main entrypoint for the Fleetmaster CLI.
This function configures the application's logging level based on the --verbose flag and registers all available subcommands.
Source code in src/fleetmaster/cli.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
EngineMesh
dataclass
¶
Represents a mesh object with its configuration.
Source code in src/fleetmaster/core/engine.py
23 24 25 26 27 28 29 | |
add_mesh_to_database(output_file, mesh_to_add, mesh_name, overwrite=False, mesh_config=None)
¶
Adds a mesh and its geometric properties to the HDF5 database under the MESH_GROUP_NAME.
Checks if the mesh already exists by comparing SHA256 hashes.
If the data is different, it will either raise a warning or overwrite if overwrite is True.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mesh_to_add
|
Trimesh
|
The trimesh object of the mesh to be added. |
required |
Source code in src/fleetmaster/core/engine.py
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | |
make_database(body, omegas, wave_directions, water_depth, water_level, forward_speed)
¶
Create a dataset of BEM results for a given body and conditions.
Source code in src/fleetmaster/core/engine.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
run_simulation_batch(settings)
¶
Runs a batch of Capytaine simulations and saves all results to a single HDF5 file.
If settings.drafts is provided, it generates new meshes by translating a single
base STL file for each draft. Otherwise, it processes the provided list of STL files.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
SimulationSettings
|
A SimulationSettings object with all necessary parameters. |
required |
Source code in src/fleetmaster/core/engine.py
715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 | |
Main window of the Fleetmaster GUI.
MainWindow
¶
Bases: QMainWindow
Main window of the Fleetmaster GUI.
Source code in src/fleetmaster/gui/main_window.py
8 9 10 11 12 13 14 15 | |
__init__()
¶
Initialize the main window.
Source code in src/fleetmaster/gui/main_window.py
11 12 13 14 15 | |
main()
¶
Create and show the main window.
Source code in src/fleetmaster/gui/main_window.py
18 19 20 21 22 23 | |