35 #ifndef __MOORDYN2_H__
36 #define __MOORDYN2_H__
#define DECLDIR
Prefix to export C functions on the compiled library.
Definition: MoorDynAPI.h:68
#define DEPRECATED
Prefix for deprecated functions that will be removed on a future version.
Definition: MoorDynAPI.h:85
struct __MoorDynSeafloor * MoorDynSeafloor
A 3D Seafloor instance.
Definition: Seafloor.h:14
int DECLDIR MoorDyn_SetLogFile(MoorDyn system, const char *log_path)
Set the instance log file.
Definition: MoorDyn2.cpp:2878
int DECLDIR DEPRECATED MoorDyn_SetWaveKin(MoorDyn system, const double *U, const double *Ud, double t)
Set the kinematics of the waves.
Definition: MoorDyn2.h:331
int DECLDIR MoorDyn_GetNumberBodies(MoorDyn system, unsigned int *n)
Get the number of bodies.
Definition: MoorDyn2.cpp:3029
int DECLDIR MoorDyn_Save(MoorDyn system, const char *filepath)
Save the system so it can be loaded afterwards.
Definition: MoorDyn2.cpp:3295
struct __MoorDynPoint * MoorDynPoint
A mooring point instance.
Definition: Point.h:50
struct __MoorDynWaves * MoorDynWaves
A mooring point instance.
Definition: Waves.h:53
int DECLDIR MoorDyn_Deserialize(MoorDyn system, const uint64_t *data)
Load the system from the serialized data before.
Definition: MoorDyn2.cpp:3273
int DECLDIR MoorDyn_Init_NoIC(MoorDyn system, const double *x, const double *xd)
The same than MoorDyn_Init(), but the initial condition is not computed at all.
Definition: MoorDyn2.cpp:2917
int DECLDIR MoorDyn_SetTimeScheme(MoorDyn system, const char *name)
Set the time scheme by its name.
Definition: MoorDyn2.cpp:3190
int DECLDIR MoorDyn_ExternalWaveKinInit(MoorDyn system, unsigned int *n)
Initializes the external Wave kinematics.
Definition: MoorDyn2.cpp:2960
int DECLDIR MoorDyn_SaveVTK(MoorDyn system, const char *filename)
Save the whole system to a VTK (.vtm) file.
Definition: MoorDyn2.cpp:3329
int DECLDIR MoorDyn_Log(MoorDyn system, int level, const char *msg)
Log a message.
Definition: MoorDyn2.cpp:2894
struct __MoorDynRod * MoorDynRod
A mooring line instance.
Definition: Rod.h:48
int DECLDIR MoorDyn_SetLogLevel(MoorDyn system, int verbosity)
Set the instance log file printing level.
Definition: MoorDyn2.cpp:2886
int DECLDIR DEPRECATED MoorDyn_GetWaveKinCoordinates(MoorDyn system, double *r)
Get the points where the waves kinematics shall be provided.
Definition: MoorDyn2.h:293
MoorDynRod DECLDIR MoorDyn_GetRod(MoorDyn system, unsigned int r)
Get a rod.
Definition: MoorDyn2.cpp:3059
int DECLDIR MoorDyn_ExternalWaveKinGetN(MoorDyn system, unsigned int *n)
Get the number of points where the waves kinematics shall be provided.
Definition: MoorDyn2.cpp:2978
int DECLDIR MoorDyn_SetCFL(MoorDyn system, double cfl)
Set the model Courant–Friedrichs–Lewy factor.
Definition: MoorDyn2.cpp:3166
int DECLDIR MoorDyn_GetTimeScheme(MoorDyn system, char *name, size_t *name_len)
Get the current time scheme name.
Definition: MoorDyn2.cpp:3175
int DECLDIR MoorDyn_GetNumberPoints(MoorDyn system, unsigned int *n)
Get the number of points.
Definition: MoorDyn2.cpp:3073
int DECLDIR MoorDyn_Step(MoorDyn system, const double *x, const double *xd, double *f, double *t, double *dt)
Runs a time step of the MoorDyn system.
Definition: MoorDyn2.cpp:2924
MoorDynSeafloor DECLDIR MoorDyn_GetSeafloor(MoorDyn system)
Get the 3D seafloor instance.
Definition: MoorDyn2.cpp:2952
int DECLDIR MoorDyn_GetNumberRods(MoorDyn system, unsigned int *n)
Get the number of rods.
Definition: MoorDyn2.cpp:3051
int DECLDIR MoorDyn_GetCFL(MoorDyn system, double *cfl)
Get the current model Courant–Friedrichs–Lewy factor.
Definition: MoorDyn2.cpp:3158
int DECLDIR MoorDyn_ExternalWaveKinGetCoordinates(MoorDyn system, double *r)
Get the points where the waves kinematics shall be provided.
Definition: MoorDyn2.cpp:2986
MoorDynWaves DECLDIR MoorDyn_GetWaves(MoorDyn system)
Get the wave kinematics instance.
Definition: MoorDyn2.cpp:2944
int DECLDIR MoorDyn_Init(MoorDyn system, const double *x, const double *xd)
Compute the initial condition of a MoorDyn system.
Definition: MoorDyn2.cpp:2910
int DECLDIR MoorDyn_SetDt(MoorDyn system, double dt)
Set the model time step.
Definition: MoorDyn2.cpp:3149
MoorDynBody DECLDIR MoorDyn_GetBody(MoorDyn system, unsigned int b)
Get a rigid body.
Definition: MoorDyn2.cpp:3037
int DECLDIR MoorDyn_NCoupledDOF(MoorDyn system, unsigned int *n)
Get the number of coupled Degrees Of Freedom (DOFs)
Definition: MoorDyn2.cpp:2902
int DECLDIR MoorDyn_ExternalWaveKinSet(MoorDyn system, const double *U, const double *Ud, double t)
Set the kinematics of the waves.
Definition: MoorDyn2.cpp:3002
struct __MoorDynBody * MoorDynBody
A mooring line instance.
Definition: Body.h:48
int DECLDIR MoorDyn_Close(MoorDyn system)
Releases MoorDyn allocated resources.
Definition: MoorDyn2.cpp:2936
struct __MoorDynLine * MoorDynLine
A mooring line instance.
Definition: Line.h:48
struct __MoorDyn * MoorDyn
A mooring system instance.
Definition: MoorDyn2.h:62
int DECLDIR MoorDyn_GetDt(MoorDyn system, double *dt)
Get the current model time step.
Definition: MoorDyn2.cpp:3141
int DECLDIR MoorDyn_LoadState(MoorDyn system, const char *filepath)
Load and set a system state.
Definition: MoorDyn2.cpp:3233
int DECLDIR MoorDyn_Serialize(MoorDyn system, size_t *size, uint64_t *data)
Serialize the system to bytes.
Definition: MoorDyn2.cpp:3251
int DECLDIR MoorDyn_Load(MoorDyn system, const char *filepath)
Load the system saved before.
Definition: MoorDyn2.cpp:3312
MoorDynPoint DECLDIR MoorDyn_GetPoint(MoorDyn system, unsigned int c)
Get a point.
Definition: MoorDyn2.cpp:3081
MoorDyn DECLDIR MoorDyn_Create(const char *infilename)
Creates a MoorDyn instance.
Definition: MoorDyn2.cpp:2840
int DECLDIR MoorDyn_GetFASTtens(MoorDyn system, const int *numLines, float FairHTen[], float FairVTen[], float AnchHTen[], float AnchVTen[])
Function for providing FASTv7 customary line tension quantities.
Definition: MoorDyn2.cpp:3117
MoorDynLine DECLDIR MoorDyn_GetLine(MoorDyn system, unsigned int l)
Get a line instance.
Definition: MoorDyn2.cpp:3103
int DECLDIR MoorDyn_SaveState(MoorDyn system, const char *filepath)
Save the system state, so it can be loaded afterwards.
Definition: MoorDyn2.cpp:3215
int DECLDIR MoorDyn_GetNumberLines(MoorDyn system, unsigned int *n)
Get the number of lines.
Definition: MoorDyn2.cpp:3095
int DECLDIR MoorDyn_SetVerbosity(MoorDyn system, int verbosity)
Set the instance verbosity level.
Definition: MoorDyn2.cpp:2870