capytaine.io.legacy module¶
Import or export Nemoh data files for backward compatibility with Nemoh 2.
- capytaine.io.legacy.export_hydrostatics(hydrostatics_directory: str, bodies: FloatingBody | Multibody | List[FloatingBody]) None[source]¶
Export rigid body hydrostatics in Nemoh’s format (KH.dat and Hydrostatics.dat). If the bodies have hydrostatics matrices already defined, uses them. Otherwise, tires to compute the hydrostatics stiffness.
- Parameters:
hydrostatics_directory (string) – Path to the directory in which the data will be written (two files per body)
bodies (FloatingBody or Multibody) – The body or bodies, which are all expected to be rigid bodies with 6 dofs. A list of FloatingBody is also accepted for backward compatibility.
- Return type:
None
- capytaine.io.legacy.export_hydrostatics_from_dataset(hydrostatics_directory: str | Path, dataset)[source]¶