Skip to main content

SoS C API of FMOPSolver library 2023 R2

sos_capi_script

Last update: 16.07.2025
Go to the documentation of this file.
1 
2 #ifndef DYNARDO_SOS_SCRIPT_H
3  #define DYNARDO_SOS_SCRIPT_H
4 
5 #include "sos_capi_common.h"
6 
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /*********************************************/
32 
41 #ifdef DYNARDO_FMOP_DLL_EXPORTS
42  typedef class FMOP_ScriptInterpreter* fmop_script_handle_t;
43 #else
44  typedef void* fmop_script_handle_t;
45 #endif
46 
47 
48 /*********************************************/
54 
55 
56 /*
57  *
58 #ifndef DOXYGEN_IGNORE
78 DYNARDO_FMOP_API fmop_error_t FMOP_loadDbBuf
79  ( fmop_db_handle_t * database, const char* buffer, const size_t * length );
80 
81 // FMOP_saveDbBuf
82 
83 #endif
84 
85 
86 */
87 
88 
89 
99 
114  const char * const script);
115 
131  const char * const ident,
132  int rows, int cols, const double * const data);
133 
151  const char * const ident,
152  int * rows, int *cols, const double **data);
153 
166  const char * const ident,
167  double data);
168 
169 
183  const char * const ident,
184  double * const data);
185 
197  const char * const ident,
198  const char * const data);
199 
212  const char * const ident,
213  const char **data);
214 
223 DYNARDO_FMOP_API bool FMOP_script_identExists(fmop_script_handle_t context, const char * const ident);
224 
226 
227 #ifdef __cplusplus
228 }
229 #endif
230 
231 #endif // DYNARDO_SOS_SCRIPT_H
232 
233 // (c) 2018, DYNARDO Austria GmbH (proprietary license)
C-API for utility functions (load/unload library, license management, error handling)
fmop_error_t
Error code definitions.
Definition: sos_capi_common.h:80
DYNARDO_FMOP_API fmop_error_t FMOP_script_createString(fmop_script_handle_t context, const char *const ident, const char *const data)
Create a string variable in the Lua script context.
DYNARDO_FMOP_API fmop_error_t FMOP_script_execute(fmop_script_handle_t context, const char *const script)
Execute Lua script code. The script engine has the ability to parse and execute:
DYNARDO_FMOP_API fmop_error_t FMOP_script_getNumber(fmop_script_handle_t context, const char *const ident, double *const data)
Retrieve the pointer to a number variable in the Lua script context. The number is is stored in doubl...
DYNARDO_FMOP_API fmop_error_t FMOP_script_createMatrix(fmop_script_handle_t context, const char *const ident, int rows, int cols, const double *const data)
Creates a tmath.Matrix in Lua script context. This version may be more efficient than creating a matr...
void * fmop_script_handle_t
Contains the data required to post-process any Field-MOP.
Definition: sos_capi_script.h:44
DYNARDO_FMOP_API fmop_error_t FMOP_script_getString(fmop_script_handle_t context, const char *const ident, const char **data)
Retrieve the char array pointer to a string variable in the Lua script context. The data can be retri...
DYNARDO_FMOP_API fmop_error_t FMOP_script_createNumber(fmop_script_handle_t context, const char *const ident, double data)
Creates a double precision floating point number variable in the Lua script context.
DYNARDO_FMOP_API fmop_script_handle_t FMOP_globalScriptEngine()
Get the handle to the global script engine from the initialized library. The routine checks if the Lu...
DYNARDO_FMOP_API bool FMOP_script_identExists(fmop_script_handle_t context, const char *const ident)
Check whether a variable exists in the Lua script context.
DYNARDO_FMOP_API fmop_error_t FMOP_script_getMatrix(fmop_script_handle_t context, const char *const ident, int *rows, int *cols, const double **data)
Retrieves the binary data of a tmath.Matrix existing in the Lua script context The matrix must be sav...

Connect with Ansys