
The purpose of this document is to present the latest features developed within the Open TURNS library regarding the interfacing mechanism with a computational code.
The latest advances offer users:
greater simplicity of implementation with the use of macros and shared functions that cover a large part of the expressed needs;
greater reliability, again thanks to these shared functions;
faster development by reducing the amount of programming required from the user;
simplified maintenance, again thanks to the reduction of the volume of code;
improved performance by using parallel techniques in a few relevant spots.
2 The different types of functions
3.1 Operating principle of a wrapper
3.1.1 Why use a wrapper?
3.1.2 Presentation of the wrapper
3.1.3 The dynamic library
3.1.4 The description file
3.1.5 Invoking and loading a wrapper
3.1.6 Step 1: Creation of a NumericalMathFunction
3.1.7 Step 2: Search for the description file
3.1.8 Step 3: Analysis of the description file
3.1.9 Step 4: Search for the dynamic library
3.1.10 Step 5: Loading the dynamic library
3.1.11 Step 6: Completion of the NumericalMathFunction construction
3.2 Example: Creating a minimal wrapper
3.2.1 Required Items
3.2.2 Starting from a template to generate the wrapper
3.2.3 Compilation and installation of the wrapper
3.2.4 Description file for the minimal wrapper
3.2.5 Source code for the minimal wrapper
3.2.6 Checking if the minimal wrapper is functioning
4.1.1 In the wrapper's source file
4.1.2 In the wrapper's description file
4.3 The processing/step combination
4.4.1 createState_ function
4.4.2 deleteState_ function
4.4.3 getInfo_ function
4.4.4 init_ function
4.4.5 exec_ function for the Function
4.4.6 exec_sample_ function for the Function
4.4.7 exec_ function for the Gradient
4.4.8 exec_ function for the Hessian
4.4.9 finalize_ function
4.5 Static linking with FORTRAN 77
4.6 Computation with data samples
4.7 Computation with a Gradient or a Hessian
5 The wrapper as interface for the external code
5.1 Transmitting values to the code
5.2.1 General
5.2.2 Implementation in the description file
5.5 Transmission using command line arguments
5.6 Writing an execution function for an external code
5.7 Sharing the internal state
7 Functions from the WrapperCommon library
7.1 Display and error functions
7.2 Functions manipulating the exchange data structure
7.3 Execution isolation functions
8 Macros from the WrapperMacros library
9 Description of the wrapper's development structures
9.1 wrapper_linked_with_C_function directory
9.2 wrapper_linked_with_F77_function directory
9.3 wrapper_calling_shell_command directory
10 DTD for the wrapper's description file