Skip to main content

optiSLang C API of FMOPSolver Library 2025 R1

fmop_solver.h File Reference

Last update: 10.02.2025

C-API to evaluate a Field Meta model of Optimal Prognosis (FMOP) More...

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)

  • 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
typedef struct FMOP_Database* fmop_db_handle_t;
we now prefer to write for the public definition 'void*' only

◆ 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
typedef struct FMOP* fmop_handle_t;
we now prefer to write for the public defintion 'void*' only

Connect with Ansys