FloatingArrayDesign / MoorDyn

a lumped-mass mooring line model intended for coupling with floating structure codes
https://moordyn.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
71 stars 40 forks source link

Checking function for inputs #165

Open RyanDavies19 opened 11 months ago

RyanDavies19 commented 11 months ago

In some cases, invalid values in the input files cause MoorDyn to crash with a segmentation fault. It would be good to implement a function that checks values to ensure they are valid and report an error if not. I believe this mainly applies to invalid output flags and invalid object numbers. There may be more that cause this.

RyanDavies19 commented 3 months ago

If a user gives an output channel that has an incorrect object number, MD will seg fault. Example: requesting FairTen4 from a system with 3 lines.

Corresponds with: https://github.com/FloatingArrayDesign/MoorDyn/blob/0a9a8aac08b67f37cba4a0073c0d5250b9cc9a76/source/MoorDyn2.cpp#L1260