Skip to main content

SoS C API of FMOPSolver library 2023 R2

fmop_solver.h File Reference

Last update: 16.07.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;
void * fmop_db_handle_t
Contains all the data being required to post-process any FMOP.
Definition: fmop_solver.h:42
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;
void * fmop_handle_t
Contains one specific single or cross correlated FMOP.
Definition: fmop_solver.h:53
we now prefer to write for the public defintion 'void*' only

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]fmopA successfully initialized fmop_handle_t data object
[in]param_valuesVector 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]fieldAn 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] $
k...internal mesh item ident, e.g. internal signal position, internal element number
Call FMOP_getDataPointIndices() to map internal to external numbering scheme
Returns
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]fmopA successfully initialized fmop_handle_t data object
[in]param_valuesVector 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]fieldAn 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] $
k...internal mesh item ident, e.g. internal signal position, internal element number
Call FMOP_getDataPointIndices() to map internal to external numbering scheme
Returns
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]databaseA successfully initialized fmop_db_handle_t data object
[in]data_typeThe data type to be queried (node, element, scalar)
[in,out]num_mesh_itemsAn already initialized scalar data object. Contains the size of the data vectors for the givvemn data type on return
Returns
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]fmopA successfully initialized fmop_handle_t data object
[in]axisControls 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]coorsAn already initialized array of size $ ( 1 + \lfloor \frac{\mathit{axis}}{3} \rfloor ) * \mathit{num\_mesh\_items} $. Call FMOP_getModelDim() to get num_mesh_items. On output contains the following coordinate values:
Returns
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]fmopA successfully initialized fmop_handle_t data object
[in,out]part_idsEither 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
external( internal[k] ) = PART_ID [k], item_id [k]
k...mesh item, e.g. signal position, element number
[in,out]item_idsAn already initialized array of size num_mesh_items as returned by FMOP_getModelDim(). On output contains the external node/element ID
external( internal[k] ) = part_id [k], ITEM_ID [k]
k...mesh item, e.g. signal position, element number
Returns
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]fmopA successfully initialized fmop_handle_t data object
[in]node_idxthe node index (0.. numNodes). This node index refers to the index in the FMOP data vectors.
[in,out]elementsAn 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
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]fmopA successfully initialized fmop_handle_t data object
[in]element_idxthe 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:
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]databaseThe already initialized database handle
[in]data_typeThe data type in question
[in]fmop_identThe FMOP ident to be loaded from the database given
[in,out]fmopOn 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
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]fmopA successfully initialized fmop_handle_t data object
[in,out]fcopsAn 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
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]fmopA successfully initialized fmop_handle_t data object
[in,out]num_mesh_itemsAn already initialized scalar data object. Contains the size of the FCoP vector on return
Returns
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]databaseA successfully initialized fmop_db_handle_t data object
[in]data_typeThe data type in question
[in]num_identDefines 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:
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]databaseA successfully initialized fmop_db_handle_t data object
[in]data_typeThe data type in question
[in,out]fmop_identsOn 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_identsAn already initialized scalar data object. Contains the number of FMOP idents, aka the size of the fmop_idents char* array []
Returns
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]databaseA successfully initialized fmop_db_handle_t data object
[in]data_typeThe data type in question
[in,out]num_identsAn already initialized scalar data object. Contains the number of FMOP idents, aka the size of the fmop_idents char* array []
Returns
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]fmopA successfully initialized fmop_handle_t data object
[in]num_paramDefines 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:
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]fmopA successfully initialized fmop_handle_t data object
[out]param_identsRequires 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_paramsAn 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
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]fmopA successfully initialized fmop_handle_t data object
[in,out]num_paramsAn 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
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]fmopA successfully initialized fmop_handle_t data object
[in,out]fcopAn already initialized scalar data object on input. On output contains the total average Field Coefficient of Prognosis
Returns
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]fmopA successfully initialized fmop_handle_t data object
[in]element_idxthe element index (0.. numElements). This element index refers to the index in the FMOP data vectors.
[in,out]nodesAn 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
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]fmopA successfully initialized fmop_handle_t data object
[in]node_idxthe node index (0.. numNodes). This node index refers to the index in the FMOP data vectors.
[in,out]num_elementsa pointer to an unsigned integer number. On output it will contain the number of connected elements.
Returns
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]fmopA successfully initialized fmop_handle_t data object
[in]element_idxthe element index (0.. numElements). This element index refers to the index in the FMOP data vectors.
[in,out]num_nodesa pointer to an unsigned integer number. On output it will contain the number of connected nodes.
Returns
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]fmopA successfully initialized fmop_handle_t data object
[in,out]lower_boundsAn 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
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]fmopA successfully initialized fmop_handle_t data object
[in,out]upper_boundsAn 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
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]fmopA successfully initialized fmop_handle_t data object
[in]node_idxthe node index (0.. numNodes). This node index refers to the index in the FMOP data vectors.
[in,out]is_part_of_boundarya 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
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]databaseOn 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]pathThe 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]databaseOn 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]pathThe 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]databaseThe fmop_db_handle_t to be released. Set to NULLptr on return.
Returns
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]identsA pointer to an array of char arrays. Set to NULLptr on return.
[in]num_identsAn already initialized scalar data object. Contains the number of idents in the char** array [] given
Returns
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]fmopThe fmop_handle_t to be released. Set to NULLptr on return.
Returns
Call FMOP_getErrnoString() to get a human readable representation

Connect with Ansys