capytaine.io.legacy module

Import or export Nemoh.cal files for backward compatibility with Nemoh 2.

capytaine.io.legacy.export_as_Nemoh_directory(problem, directory_name, omega_range=None)[source]

Export radiation problems as Nemoh 2.0 directory (experimental).

TODO: Diffraction problem.

Parameters:
  • problem (RadiationProblem) – the problem that should be exported

  • directory_name (string) – path to the directory

  • omega_range (list of float or array of float, optional) – the exported problem will be set up with the following linear range: linspace(min(omega_range), max(omega_range), len(omega_range))

capytaine.io.legacy.export_hydrostatics(hydrostatics_directory, bodies)[source]

Determine filenames (following Nemoh convention) and call the .dat file writer

capytaine.io.legacy.import_cal_file(filepath)[source]

Read a Nemoh.cal file and return a list of problems.

capytaine.io.legacy.write_dataset_as_tecplot_files(results_directory, data)[source]

Write some of the data from a xarray dataset into legacy tecplot file outputs.