MoorDyn
Typedefs | Functions
MoorDyn2.h File Reference
#include "MoorDynAPI.h"
#include "Waves.h"
#include "Seafloor.h"
#include "Point.h"
#include "Rod.h"
#include "Line.h"
#include "Body.h"
#include <stdlib.h>
#include <stdint.h>
Include dependency graph for MoorDyn2.h:

Go to the source code of this file.

Typedefs

typedef struct __MoorDyn * MoorDyn
 A mooring system instance.
 

Functions

MoorDyn DECLDIR MoorDyn_Create (const char *infilename)
 Creates a MoorDyn instance. More...
 
int DECLDIR MoorDyn_NCoupledDOF (MoorDyn system, unsigned int *n)
 Get the number of coupled Degrees Of Freedom (DOFs) More...
 
int DECLDIR MoorDyn_SetVerbosity (MoorDyn system, int verbosity)
 Set the instance verbosity level. More...
 
int DECLDIR MoorDyn_SetLogFile (MoorDyn system, const char *log_path)
 Set the instance log file. More...
 
int DECLDIR MoorDyn_SetLogLevel (MoorDyn system, int verbosity)
 Set the instance log file printing level. More...
 
int DECLDIR MoorDyn_Log (MoorDyn system, int level, const char *msg)
 Log a message. More...
 
int DECLDIR MoorDyn_Init (MoorDyn system, const double *x, const double *xd)
 Compute the initial condition of a MoorDyn system. More...
 
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. More...
 
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. More...
 
int DECLDIR MoorDyn_Close (MoorDyn system)
 Releases MoorDyn allocated resources. More...
 
MoorDynWaves DECLDIR MoorDyn_GetWaves (MoorDyn system)
 Get the wave kinematics instance. More...
 
MoorDynSeafloor DECLDIR MoorDyn_GetSeafloor (MoorDyn system)
 Get the 3D seafloor instance. More...
 
int DECLDIR MoorDyn_GetNumberBodies (MoorDyn system, unsigned int *n)
 Get the number of bodies. More...
 
MoorDynBody DECLDIR MoorDyn_GetBody (MoorDyn system, unsigned int b)
 Get a rigid body. More...
 
int DECLDIR MoorDyn_GetNumberRods (MoorDyn system, unsigned int *n)
 Get the number of rods. More...
 
MoorDynRod DECLDIR MoorDyn_GetRod (MoorDyn system, unsigned int r)
 Get a rod. More...
 
int DECLDIR MoorDyn_GetNumberPoints (MoorDyn system, unsigned int *n)
 Get the number of points. More...
 
MoorDynPoint DECLDIR MoorDyn_GetPoint (MoorDyn system, unsigned int c)
 Get a point. More...
 
int DECLDIR MoorDyn_GetNumberLines (MoorDyn system, unsigned int *n)
 Get the number of lines. More...
 
MoorDynLine DECLDIR MoorDyn_GetLine (MoorDyn system, unsigned int l)
 Get a line instance. More...
 
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. More...
 
int DECLDIR MoorDyn_GetDt (MoorDyn system, double *dt)
 Get the current model time step. More...
 
int DECLDIR MoorDyn_SetDt (MoorDyn system, double dt)
 Set the model time step. More...
 
int DECLDIR MoorDyn_GetCFL (MoorDyn system, double *cfl)
 Get the current model Courant–Friedrichs–Lewy factor. More...
 
int DECLDIR MoorDyn_SetCFL (MoorDyn system, double cfl)
 Set the model Courant–Friedrichs–Lewy factor. More...
 
int DECLDIR MoorDyn_GetTimeScheme (MoorDyn system, char *name, size_t *name_len)
 Get the current time scheme name. More...
 
int DECLDIR MoorDyn_SetTimeScheme (MoorDyn system, const char *name)
 Set the time scheme by its name. More...
 
int DECLDIR MoorDyn_SaveState (MoorDyn system, const char *filepath)
 Save the system state, so it can be loaded afterwards. More...
 
int DECLDIR MoorDyn_LoadState (MoorDyn system, const char *filepath)
 Load and set a system state. More...
 
int DECLDIR MoorDyn_Serialize (MoorDyn system, size_t *size, uint64_t *data)
 Serialize the system to bytes. More...
 
int DECLDIR MoorDyn_Deserialize (MoorDyn system, const uint64_t *data)
 Load the system from the serialized data before. More...
 
int DECLDIR MoorDyn_Save (MoorDyn system, const char *filepath)
 Save the system so it can be loaded afterwards. More...
 
int DECLDIR MoorDyn_Load (MoorDyn system, const char *filepath)
 Load the system saved before. More...
 
int DECLDIR MoorDyn_SaveVTK (MoorDyn system, const char *filename)
 Save the whole system to a VTK (.vtm) file. More...
 
External Wave Kinematics

The functions for setting external wave kinematics.

int DECLDIR MoorDyn_ExternalWaveKinInit (MoorDyn system, unsigned int *n)
 Initializes the external Wave kinematics. More...
 
int DECLDIR MoorDyn_ExternalWaveKinGetN (MoorDyn system, unsigned int *n)
 Get the number of points where the waves kinematics shall be provided. More...
 
int DECLDIR MoorDyn_ExternalWaveKinGetCoordinates (MoorDyn system, double *r)
 Get the points where the waves kinematics shall be provided. More...
 
int DECLDIR DEPRECATED MoorDyn_GetWaveKinCoordinates (MoorDyn system, double *r)
 Get the points where the waves kinematics shall be provided. More...
 
int DECLDIR MoorDyn_ExternalWaveKinSet (MoorDyn system, const double *U, const double *Ud, double t)
 Set the kinematics of the waves. More...
 
int DECLDIR DEPRECATED MoorDyn_SetWaveKin (MoorDyn system, const double *U, const double *Ud, double t)
 Set the kinematics of the waves. More...
 

Detailed Description

C API for the moordyn::MoorDyn object, which is the main simulation handler