fmop_solver.h File Reference
Last update: 16.07.2025C-API to evaluate a Field Meta model of Optimal Prognosis (FMOP) More...
#include "sos_capi_common.h"Go to the source code of this file.
Typedefs | |
| typedef void * | fmop_db_handle_t |
| Contains all the data being required to post-process any FMOP. More... | |
| typedef void * | fmop_handle_t |
| Contains one specific single or cross correlated FMOP. More... | |
Functions | |
Create / Initialize Data Objects | |
API handling data object life time | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_loadDbFile (fmop_db_handle_t *database, const char *path) |
| Initializes a fmop_db_handle_t object from a previously saved Statistics on Structures (SoS) database. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_loadDbFileWMesh (fmop_db_handle_t *database, const char *path) |
| Initializes a fmop_db_handle_t object from a previously saved Statistics on Structures (SoS) database This function also builds up all internal data structures needed to represent FEM meshes. Hence it may need more CPU time and RAM. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getModel (fmop_db_handle_t database, fmop_dataobject_types data_type, const char *const fmop_ident, fmop_handle_t *fmop) |
| Loads a fmop_handle_t data object from the database given. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_releaseModel (fmop_handle_t *fmop) |
| Releases a fmop_handle_t object and dedicated memory. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_releaseDb (fmop_db_handle_t *database) |
| Releases a fmop_db_handle_t object and dedicated memory. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_releaseIdents (char ***const idents, const size_t *num_idents) |
| An auxiliary function to releases an array of char arrays and dedicated memory. More... | |
Query properties | |
API to query idents and properties of a "Field Meta Model of Optimal Prognosis" (FMOP) | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getModelIdents (const fmop_db_handle_t database, fmop_dataobject_types data_type, char ***const fmop_idents, size_t *num_idents) |
| Returns all known FMOP identifier from the fmop_db_handle_t given. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getModelIdentsDim (const fmop_db_handle_t database, fmop_dataobject_types data_type, size_t *num_idents) |
| Returns the total number of known FMOP identifiers from the fmop_db_handle_t given. More... | |
| DYNARDO_FMOP_API const char * | FMOP_getModelIdent (const fmop_db_handle_t database, fmop_dataobject_types data_type, size_t num_ident) |
| Returns the n-th known FMOP identifier from the fmop_db_handle_t given. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getModelParamIdents (const fmop_handle_t fmop, char ***const param_idents, size_t *num_params) |
| Returns all active scalar inputer parameters for the fmop handle given. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getModelParamIdentsDim (const fmop_handle_t fmop, size_t *num_params) |
| Returns the total number of active parameter identifiers from the fmop handle given. More... | |
| DYNARDO_FMOP_API const char * | FMOP_getModelParamIdent (const fmop_handle_t fmop, size_t num_param) |
| Returns the n-th active parameter identifier from the fmop handle given. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getParamLowerBounds (const fmop_handle_t fmop, double *lower_bounds) |
| Returns lower bound values of input parameters used to train the FMOP, aka the lower bound values of Design of Experiment input parameters. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getParamUpperBounds (const fmop_handle_t fmop, double *upper_bounds) |
| Returns upper bound values of input parameters used to train the FMOP, aka the upper bound values of Design of Experiment input parameters. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getModelTotalAvgFCoP (const fmop_handle_t fmop, double *fcop) |
| Returns the total average Field Coefficient of Prognosis for the fmop handle given. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getModelAvgFCoP (const fmop_handle_t fmop, double *fcops) |
| Returns the Field Coefficients of Prognosis per active scalar input parameter. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getModelDim (const fmop_handle_t fmop, size_t *num_mesh_items) |
| Returns the size of the FCoP vector, aka the number of mesh items. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getDataDim (const fmop_db_handle_t database, fmop_dataobject_types data_type, size_t *num_mesh_items) |
| Returns the size of the FCoP vector, aka the number of mesh items. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getDataPointIndices (fmop_handle_t fmop, unsigned int *part_ids, unsigned int *item_ids) |
| Maps internal node/element numbering to the external scheme consisting of part and item ID. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getDataPointCoors (fmop_handle_t fmop, char axis, double *coors) |
| Returns the cartesian data point coordinates for each data point. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getNumElementsAtNode (fmop_handle_t fmop, unsigned int node_idx, unsigned int *num_elements) |
| Identifies the elements connected to a given node. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getElementsAtNode (fmop_handle_t fmop, unsigned int node_idx, unsigned int *elements) |
| Identifies the elements connected to a given node. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_isNodePartOfBoundary (fmop_handle_t fmop, unsigned int node_idx, unsigned int *is_part_of_boundary) |
| Identifies if the given node is on the surface. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getNumNodesAtElement (fmop_handle_t fmop, unsigned int element_idx, unsigned int *num_nodes) |
| Identifies the nodes connected to a given element. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getNodesAtElement (fmop_handle_t fmop, unsigned int element_idx, unsigned int *nodes) |
| Identifies the nodes connected to a given element. More... | |
| DYNARDO_FMOP_API const char * | FMOP_getElementTypeIdent (fmop_handle_t fmop, unsigned int element_idx) |
| Identifies the element type ident of a given element. More... | |
Operations | |
API used to evalute a Field Meta Model of Optimal Prognosis (FMOP) | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_approxField (const fmop_handle_t fmop, const double *param_values, double *field) |
| Approximates a field response based on a vector of given active scalar input parameters. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_approxFieldExtrapolate (const fmop_handle_t fmop, const double *param_values, double *field) |
| Approximates a field response based on a vector of given active scalar input parameters. More... | |
Detailed Description
C-API to evaluate a Field Meta model of Optimal Prognosis (FMOP)
- Copyright
- DYNARDO Austria GmbH
- This API follows the Basic exception safety rule. If any of the operations fail, the original data, e.g. the fmop_handle*_t, might have been overwritten, but there should be no resource leak.
- Return values are typically of type fmop_error_t. To get a human readalbe interpretation forward this value to FMOP_getErrnoString() or call FMOP_getLastErrorString(). More information can be found in the Error Handling section
- Log messages from the SoS kernel are all bufferd in an internal variable. Unless otherwise stated in a function description, this internal variable gets reset(!) right at the beginning of each function call. Therefore, the user is forced into fetching all log messages of interest before proceeding.
- Warning
- Concurrent library calls are NOT supported
- Unless otherwise stated, every function call overwrites any log message of any previous function call
Typedef Documentation
◆ fmop_db_handle_t
| typedef void* fmop_db_handle_t |
Contains all the data being required to post-process any FMOP.
- Note
- Since we had some unresolved troubles in Matlab using the forward declaration we now prefer to write for the public definition 'void*' onlyvoid * fmop_db_handle_tContains all the data being required to post-process any FMOP.Definition: fmop_solver.h:42
◆ fmop_handle_t
| typedef void* fmop_handle_t |
Contains one specific single or cross correlated FMOP.
- Note
- Since we had some unresolved troubles in Matlab using the forward declaration we now prefer to write for the public defintion 'void*' onlyvoid * fmop_handle_tContains one specific single or cross correlated FMOP.Definition: fmop_solver.h:53
Function Documentation
◆ FMOP_approxField()
| DYNARDO_FMOP_API fmop_error_t FMOP_approxField | ( | const fmop_handle_t | fmop, |
| const double * | param_values, | ||
| double * | field | ||
| ) |
Approximates a field response based on a vector of given active scalar input parameters.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in] param_values Vector of a single sample of all active scalar input parameters. Size and parameter order are defined by the return values of FMOP_getModelParamIdents()
param_values [j]... the index j matches the parameter input name position returned in the param_idents argument of FMOP_getModelParamIdents()
sizeof ( param_values ) ... must match the num_params argument of FMOP_getModelParamIdents() The values must not be located outside the initial sampling bounds.[out] field An already initialized array of size num_mesh_items as returned by FMOP_getModelDim() On output contains the approximated field response.
Follows the scheme:![$ field[k] $](/sites/default/files/migrate-content/sos_c_api_of_fmopsolver_library/form_2.png)
k...internal mesh item ident, e.g. internal signal position, internal element number
Call FMOP_getDataPointIndices() to map internal to external numbering scheme
- Returns
- fmop_invalid_handle if the fmop handle is not allocated.
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the param_values or field array argument is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation. For detailed log messages call FMOP_getLastError() which outputs internal log messages.
◆ FMOP_approxFieldExtrapolate()
| DYNARDO_FMOP_API fmop_error_t FMOP_approxFieldExtrapolate | ( | const fmop_handle_t | fmop, |
| const double * | param_values, | ||
| double * | field | ||
| ) |
Approximates a field response based on a vector of given active scalar input parameters.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in] param_values Vector of a single sample of all active scalar input parameters. Size and parameter order are defined by the return values of FMOP_getModelParamIdents()
param_values [j]... the index j matches the parameter input name position returned in the param_idents argument of FMOP_getModelParamIdents()
sizeof ( param_values ) ... must match the num_params argument of FMOP_getModelParamIdents() The values may be located outside the initial sampling bounds.[out] field An already initialized array of size num_mesh_items as returned by FMOP_getModelDim() On output contains the approximated field response.
Follows the scheme:![$ field[k] $](/sites/default/files/migrate-content/sos_c_api_of_fmopsolver_library/form_2.png)
k...internal mesh item ident, e.g. internal signal position, internal element number
Call FMOP_getDataPointIndices() to map internal to external numbering scheme
- Returns
- fmop_invalid_handle if the fmop handle is not allocated.
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the param_values or field array argument is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation. For detailed log messages call FMOP_getLastError() which outputs internal log messages.
◆ FMOP_getDataDim()
| DYNARDO_FMOP_API fmop_error_t FMOP_getDataDim | ( | const fmop_db_handle_t | database, |
| fmop_dataobject_types | data_type, | ||
| size_t * | num_mesh_items | ||
| ) |
Returns the size of the FCoP vector, aka the number of mesh items.
- Parameters
-
[in] database A successfully initialized fmop_db_handle_t data object [in] data_type The data type to be queried (node, element, scalar) [in,out] num_mesh_items An already initialized scalar data object. Contains the size of the data vectors for the givvemn data type on return
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the num_mesh_items pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise.
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_initialize() returned fmop_model_success
◆ FMOP_getDataPointCoors()
| DYNARDO_FMOP_API fmop_error_t FMOP_getDataPointCoors | ( | fmop_handle_t | fmop, |
| char | axis, | ||
| double * | coors | ||
| ) |
Returns the cartesian data point coordinates for each data point.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in] axis Controls coordinate output. The following integers are accepted: - 0... asks for x-coordinates only
- 1... asks for y-coordinates only
- 2... asks for z-coordinates only
- 3... asks for x-, y- and z-coordinates
[in,out] coors An already initialized array of size
. Call FMOP_getModelDim() to get num_mesh_items. On output contains the following coordinate values:- finite element nodes for an FMOP of type fmop_node_data
- finite elements using their center coordinate in space for an FMOP of type fmop_element_data
- an FMOP of type fmop_scalar_data invokes an fmop_exception_occurred error Follows the scheme:
with
k...internal mesh item ident, e.g. internal signal position, internal element number
Call FMOP_getDataPointIndices() to map internal to external numbering scheme
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the axis parameter is out-of-bounds, or the coors pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise.
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
- Warning
- Calling this function for FMOP models of type fmop_element_data multiplies resource consumption!
◆ FMOP_getDataPointIndices()
| DYNARDO_FMOP_API fmop_error_t FMOP_getDataPointIndices | ( | fmop_handle_t | fmop, |
| unsigned int * | part_ids, | ||
| unsigned int * | item_ids | ||
| ) |
Maps internal node/element numbering to the external scheme consisting of part and item ID.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in,out] part_ids Either an already initialized array of size num_mesh_items as returned by FMOP_getModelDim(), or a NULL pointer. Note, most of the meshes consists of a single part only, e.g. signals. If the argument is initialized, it contains the external part IDs on output. A NULL pointer otherwise k...mesh item, e.g. signal position, element numberexternal( internal[k] ) = PART_ID [k], item_id [k][in,out] item_ids An already initialized array of size num_mesh_items as returned by FMOP_getModelDim(). On output contains the external node/element ID k...mesh item, e.g. signal position, element numberexternal( internal[k] ) = part_id [k], ITEM_ID [k]
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the item_id pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getElementsAtNode()
| DYNARDO_FMOP_API fmop_error_t FMOP_getElementsAtNode | ( | fmop_handle_t | fmop, |
| unsigned int | node_idx, | ||
| unsigned int * | elements | ||
| ) |
Identifies the elements connected to a given node.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in] node_idx the node index (0.. numNodes). This node index refers to the index in the FMOP data vectors. [in,out] elements An already initialized array of size as returned by FMOP_getNumElementsAtNode(). On output contains the internal element ID that are connected to the given node.
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the item_id pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getElementTypeIdent()
| DYNARDO_FMOP_API const char* FMOP_getElementTypeIdent | ( | fmop_handle_t | fmop, |
| unsigned int | element_idx | ||
| ) |
Identifies the element type ident of a given element.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in] element_idx the element index (0.. numElements). This element index refers to the index in the FMOP data vectors.
- Returns
- On success the element type identifier at array position num_ident from the database given, othewise an empty string.
- Note
- Calling this function changes the error number to:
- fmop_invalid_handle if the database or fmop_idents arguments is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the param_ident pointer does not hold a NULL pointer on input
- fmop_settings_error if the value of num_param given is greater than, or equal to the size of the param_idents char* array []
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise. Call FMOP_getErrnoString() to get a human readable representation
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getModel()
| DYNARDO_FMOP_API fmop_error_t FMOP_getModel | ( | fmop_db_handle_t | database, |
| fmop_dataobject_types | data_type, | ||
| const char *const | fmop_ident, | ||
| fmop_handle_t * | fmop | ||
| ) |
Loads a fmop_handle_t data object from the database given.
- Parameters
-
[in] database The already initialized database handle [in] data_type The data type in question [in] fmop_ident The FMOP ident to be loaded from the database given [in,out] fmop On input *fmop must point to NULL. Returns an initialized fmop handle to the requested fmop_ident on output. Pointer ownership is up to the caller after return. Call FMOP_releaseModel (fmop_handle_t *) at the end of lifetime.
- Returns
- fmop_invalid_handle if the database or fmop_ident argument is a NULL pointer
- fmop_invalid_handle if the fmop argument does not hold a NULL pointer on input
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to load a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_model_missing if the handle initialization fails
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_initialize() returned fmop_model_success
- Returns
- A success indicator. Call FMOP_getErrnoString to get a human readable representation
◆ FMOP_getModelAvgFCoP()
| DYNARDO_FMOP_API fmop_error_t FMOP_getModelAvgFCoP | ( | const fmop_handle_t | fmop, |
| double * | fcops | ||
| ) |
Returns the Field Coefficients of Prognosis per active scalar input parameter.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in,out] fcops An already initialized array of size num_params as returned by FMOP_getModelNumParams() On output contains the average Field Coefficient of Prognosis per active scalar input parameter Follows the scheme: fcops[i] (i..i'th active scalar input parameter).
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the fcops pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise.
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getModelDim()
| DYNARDO_FMOP_API fmop_error_t FMOP_getModelDim | ( | const fmop_handle_t | fmop, |
| size_t * | num_mesh_items | ||
| ) |
Returns the size of the FCoP vector, aka the number of mesh items.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in,out] num_mesh_items An already initialized scalar data object. Contains the size of the FCoP vector on return
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the num_mesh_items pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise.
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getModelIdent()
| DYNARDO_FMOP_API const char* FMOP_getModelIdent | ( | const fmop_db_handle_t | database, |
| fmop_dataobject_types | data_type, | ||
| size_t | num_ident | ||
| ) |
Returns the n-th known FMOP identifier from the fmop_db_handle_t given.
- Parameters
-
[in] database A successfully initialized fmop_db_handle_t data object [in] data_type The data type in question [in] num_ident Defines the position in the fmop_idents char* array []. Notice that the first element has a position of 0
- Returns
- On succes the FMOP identifier at array position num_ident from the database given, otherwise an empty string. The returned string will be overwritten by this function at the next call and will be destroyed on program termination
- Note
- Calling this function changes the error number to:
- fmop_invalid_handle if the database or fmop_idents arguments is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the fmop_idents pointer does not hold a NULL pointer on input
- fmop_settings_error if the value of num_ident given is greater than, or equal to the size of the fmop_idents char* array []
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise. Call FMOP_getErrnoString() to get a human readable representation
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getModelIdents()
| DYNARDO_FMOP_API fmop_error_t FMOP_getModelIdents | ( | const fmop_db_handle_t | database, |
| fmop_dataobject_types | data_type, | ||
| char ***const | fmop_idents, | ||
| size_t * | num_idents | ||
| ) |
Returns all known FMOP identifier from the fmop_db_handle_t given.
- Parameters
-
[in] database A successfully initialized fmop_db_handle_t data object [in] data_type The data type in question [in,out] fmop_idents On input *fmop_idents must point to NULL. On return contains all known FMOP identifier from the database given. Pointer ownership is up to the caller after return. Call FMOP_releaseIdents() at the end of life [in,out] num_idents An already initialized scalar data object. Contains the number of FMOP idents, aka the size of the fmop_idents char* array []
- Returns
- fmop_invalid_handle if the database or fmop_idents arguments is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the fmop_idents pointer does not hold a NULL pointer on input
- fmop_settings_error if the num_idents pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise.
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
- Many languages offers the possiblity to call functions from an external C-library, e.g. Java, python and Matlab. If you are running in some limitations due to our tripple pointer requirement, please use the wrapper functions FMOP_getModelIdentsDim() followed by FMOP_getModelIdent() to query known idents one by one
◆ FMOP_getModelIdentsDim()
| DYNARDO_FMOP_API fmop_error_t FMOP_getModelIdentsDim | ( | const fmop_db_handle_t | database, |
| fmop_dataobject_types | data_type, | ||
| size_t * | num_idents | ||
| ) |
Returns the total number of known FMOP identifiers from the fmop_db_handle_t given.
- Parameters
-
[in] database A successfully initialized fmop_db_handle_t data object [in] data_type The data type in question [in,out] num_idents An already initialized scalar data object. Contains the number of FMOP idents, aka the size of the fmop_idents char* array []
- Returns
- fmop_invalid_handle if the database or fmop_idents arguments is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the num_idents pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise.
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getModelParamIdent()
| DYNARDO_FMOP_API const char* FMOP_getModelParamIdent | ( | const fmop_handle_t | fmop, |
| size_t | num_param | ||
| ) |
Returns the n-th active parameter identifier from the fmop handle given.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in] num_param Defines the position in the fmop_idents char* array []. Notice that the first element has a position of 0
- Returns
- On success the parameter identifier at array position num_ident from the database given, othewise an empty string. The returned string will be overwritten by this function at the next call and will be destroyed on program termination
- Note
- Calling this function changes the error number to:
- fmop_invalid_handle if the database or fmop_idents arguments is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the param_ident pointer does not hold a NULL pointer on input
- fmop_settings_error if the value of num_param given is greater than, or equal to the size of the param_idents char* array []
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise. Call FMOP_getErrnoString() to get a human readable representation
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getModelParamIdents()
| DYNARDO_FMOP_API fmop_error_t FMOP_getModelParamIdents | ( | const fmop_handle_t | fmop, |
| char ***const | param_idents, | ||
| size_t * | num_params | ||
| ) |
Returns all active scalar inputer parameters for the fmop handle given.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [out] param_idents Requires a NULL pointer on input. On return contains all active scalar input parameters used in the fmop handle given. Pointer ownership is up to the caller after return. Call FMOP_releaseIdents() at the end of life [in,out] num_params An already initialized scalar data object. Contains the number of active scalar input parameters used in the fmop handle given, aka the size of the param_idents char* array []
- Returns
- fmop_invalid_handle if the fmop or param_idents arguments is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the param_idents pointer does not hold a NULL pointer on input
- fmop_settings_error if the num_params pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise.
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
- Many languages offers the possiblity to call functions from an external C-library, e.g. Java, python and Matlab. If you are running in some limitations due to our tripple pointer requirement, please use the wrapper functions FMOP_getModelParamIdentsDim() followed by FMOP_getModelParamIdent() to query known idents one by one
◆ FMOP_getModelParamIdentsDim()
| DYNARDO_FMOP_API fmop_error_t FMOP_getModelParamIdentsDim | ( | const fmop_handle_t | fmop, |
| size_t * | num_params | ||
| ) |
Returns the total number of active parameter identifiers from the fmop handle given.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in,out] num_params An already initialized scalar data object. Contains the number of active scalar input parameters used in the fmop handle given, aka the size of the param_idents char* array []
- Returns
- fmop_invalid_handle if the fmop or param_idents arguments is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the num_params pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise.
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getModelTotalAvgFCoP()
| DYNARDO_FMOP_API fmop_error_t FMOP_getModelTotalAvgFCoP | ( | const fmop_handle_t | fmop, |
| double * | fcop | ||
| ) |
Returns the total average Field Coefficient of Prognosis for the fmop handle given.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in,out] fcop An already initialized scalar data object on input. On output contains the total average Field Coefficient of Prognosis
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the fcop pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise.
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getNodesAtElement()
| DYNARDO_FMOP_API fmop_error_t FMOP_getNodesAtElement | ( | fmop_handle_t | fmop, |
| unsigned int | element_idx, | ||
| unsigned int * | nodes | ||
| ) |
Identifies the nodes connected to a given element.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in] element_idx the element index (0.. numElements). This element index refers to the index in the FMOP data vectors. [in,out] nodes An already initialized array of size as returned by FMOP_getNumNodesAtElement(). On output contains the internal node ID that are connected to the given element.
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the item_id pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getNumElementsAtNode()
| DYNARDO_FMOP_API fmop_error_t FMOP_getNumElementsAtNode | ( | fmop_handle_t | fmop, |
| unsigned int | node_idx, | ||
| unsigned int * | num_elements | ||
| ) |
Identifies the elements connected to a given node.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in] node_idx the node index (0.. numNodes). This node index refers to the index in the FMOP data vectors. [in,out] num_elements a pointer to an unsigned integer number. On output it will contain the number of connected elements.
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the item_id pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getNumNodesAtElement()
| DYNARDO_FMOP_API fmop_error_t FMOP_getNumNodesAtElement | ( | fmop_handle_t | fmop, |
| unsigned int | element_idx, | ||
| unsigned int * | num_nodes | ||
| ) |
Identifies the nodes connected to a given element.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in] element_idx the element index (0.. numElements). This element index refers to the index in the FMOP data vectors. [in,out] num_nodes a pointer to an unsigned integer number. On output it will contain the number of connected nodes.
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the item_id pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getParamLowerBounds()
| DYNARDO_FMOP_API fmop_error_t FMOP_getParamLowerBounds | ( | const fmop_handle_t | fmop, |
| double * | lower_bounds | ||
| ) |
Returns lower bound values of input parameters used to train the FMOP, aka the lower bound values of Design of Experiment input parameters.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in,out] lower_bounds An already initialized array of size num_params as returned by FMOP_getModelParamIdents() On output contains the vector of lower bound values of all active scalar input parameters used to train the FMOP, e.g. lower_boundsj.
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the lower_bounds pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise.
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_getParamUpperBounds()
| DYNARDO_FMOP_API fmop_error_t FMOP_getParamUpperBounds | ( | const fmop_handle_t | fmop, |
| double * | upper_bounds | ||
| ) |
Returns upper bound values of input parameters used to train the FMOP, aka the upper bound values of Design of Experiment input parameters.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in,out] upper_bounds An already initialized array of size num_params as returned by FMOP_getModelParamIdents() On output contains the vector of upper bound values of all active scalar input parameters used to train the FMOP, e.g. upper_boundsj.
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the upper_bounds pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise.
- Call FMOP_getErrnoString to get a human readable representation
- Note
- Assumes that FMOP_getModel() returned fmop_success
◆ FMOP_isNodePartOfBoundary()
| DYNARDO_FMOP_API fmop_error_t FMOP_isNodePartOfBoundary | ( | fmop_handle_t | fmop, |
| unsigned int | node_idx, | ||
| unsigned int * | is_part_of_boundary | ||
| ) |
Identifies if the given node is on the surface.
- Parameters
-
[in] fmop A successfully initialized fmop_handle_t data object [in] node_idx the node index (0.. numNodes). This node index refers to the index in the FMOP data vectors. [in,out] is_part_of_boundary a pointer to an unsigned integer number. On output it will contain - 1 if the node is on the boundary
- 0 if the node is not on the boundary
- Returns
- fmop_invalid_handle if the fmop argument is a NULL pointer
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_settings_error if the item_id pointer is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation
◆ FMOP_loadDbFile()
| DYNARDO_FMOP_API fmop_error_t FMOP_loadDbFile | ( | fmop_db_handle_t * | database, |
| const char * | path | ||
| ) |
Initializes a fmop_db_handle_t object from a previously saved Statistics on Structures (SoS) database.
- Parameters
-
[in,out] database On input *database must point to NULL. Returns an initialized handle to the loaded database on ouptut. The database of the returned handle has been set to the content of the file path given. Pointer ownership is up to the caller after return. Call FMOP_releaseDb (fmop_db_handle_t *) at the end of lifetime. [in] path The path to the SoS database file as a NULL terminated character array
- Returns
- fmop_invalid_handle if the database argument does not hold a NULL pointer on input
- fmop_settings_error if the path argument doesn't point to an existing file
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to load a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_exception_occurred if any other failure get invoked
- fmop_success if the fmop_db_handle_t has been initialized successfully
- Call FMOP_getErrnoString() to get a human readable representation.
◆ FMOP_loadDbFileWMesh()
| DYNARDO_FMOP_API fmop_error_t FMOP_loadDbFileWMesh | ( | fmop_db_handle_t * | database, |
| const char * | path | ||
| ) |
Initializes a fmop_db_handle_t object from a previously saved Statistics on Structures (SoS) database This function also builds up all internal data structures needed to represent FEM meshes. Hence it may need more CPU time and RAM.
- Parameters
-
[in,out] database On input *database must point to NULL. Returns an initialized handle to the loaded database on ouptut. The database of the returned handle has been set to the content of the file path given. Pointer ownership is up to the caller after return. Call FMOP_releaseDb (fmop_db_handle_t *) at the end of lifetime. [in] path The path to the SoS database file as a NULL terminated character array
- Returns
- fmop_invalid_handle if the database argument does not hold a NULL pointer on input
- fmop_settings_error if the path argument doesn't point to an existing file
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to load a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_exception_occurred if any other failure get invoked
- fmop_success if the fmop_db_handle_t has been initialized successfully
- Call FMOP_getErrnoString() to get a human readable representation.
◆ FMOP_releaseDb()
| DYNARDO_FMOP_API fmop_error_t FMOP_releaseDb | ( | fmop_db_handle_t * | database | ) |
Releases a fmop_db_handle_t object and dedicated memory.
- Parameters
-
[in,out] database The fmop_db_handle_t to be released. Set to NULLptr on return.
- Returns
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation
◆ FMOP_releaseIdents()
| DYNARDO_FMOP_API fmop_error_t FMOP_releaseIdents | ( | char ***const | idents, |
| const size_t * | num_idents | ||
| ) |
An auxiliary function to releases an array of char arrays and dedicated memory.
- Parameters
-
[in,out] idents A pointer to an array of char arrays. Set to NULLptr on return. [in] num_idents An already initialized scalar data object. Contains the number of idents in the char** array [] given
- Returns
- fmop_invalid_handle if the array argument is a NULL pointer or if *array points to NULL
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far
- fmop_settings_error if the num_idents argument is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation
◆ FMOP_releaseModel()
| DYNARDO_FMOP_API fmop_error_t FMOP_releaseModel | ( | fmop_handle_t * | fmop | ) |
Releases a fmop_handle_t object and dedicated memory.
- Parameters
-
[in,out] fmop The fmop_handle_t to be released. Set to NULLptr on return.
- Returns
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation