Skip to content

Commit

Permalink
Merge pull request #2394 from core-marine-dev/dev
Browse files Browse the repository at this point in the history
Fixes to Map++ C API
  • Loading branch information
deslaughter committed Aug 28, 2024
2 parents e204587 + 93e2d27 commit 29b60df
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 72 deletions.
2 changes: 2 additions & 0 deletions modules/map/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ target_sources(
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/MAP_Types.h>
$<INSTALL_INTERFACE:mapsys.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/mapsys.h>
$<INSTALL_INTERFACE:maperror.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/maperror.h>
$<INSTALL_INTERFACE:mapapi.h>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/mapapi.h>
)
Expand Down
10 changes: 8 additions & 2 deletions modules/map/src/mapapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
****************************************************************/


#include "mapapi.h"
#include "map.h"
#include "maperror.h"
#include "MAP_Types.h"
#include "mapapi.h"
#include "lineroutines.h"
#include "freedata.h"
#include "mapinit.h"
#include "outputstream.h"
#include "numeric.h"
#include "jacobian.h"
#include "residual.h"
#include <string.h>


MAP_EXTERNCALL void map_initialize_msqs_base(MAP_InputType_t* u_type,
Expand Down Expand Up @@ -1162,6 +1162,12 @@ MAP_EXTERNCALL void map_set_gravity(MAP_ParameterType_t* p_type, const double gr
p_type->g = gravity;
};

MAP_EXTERNCALL void map_set_input_text(MAP_InitInputType_t* init_type, const char* input_txt_line)
{
strncpy(init_type->library_input_str, input_txt_line, 254);
init_type->library_input_str[254] = '\0';
}


MAP_EXTERNCALL void map_add_cable_library_input_text(MAP_InitInputType_t* init_type)
{
Expand Down
Loading

0 comments on commit 29b60df

Please sign in to comment.