integrand: f(x) = x
-1/2 ln(x)
USAGE: To create a different integrand function, simply
duplicate this model and change the String 'C_integrand' for the
desired mathematical function in standard C-syntax. This model then
needs to be "simulated" (it actually only copies/creates files,
compiles and archives them) before the larger model, which may then
include multiple uses of the relevant 'integrand' (e.g., in qag or
other GSL routines).
in C-syntax: "log(par[0]*x)/sqrt(x)"
Note the possibility to place parameters (always with 'par'
and always starting with index 0). The values of these can then be
set during the larger model runtime (see the integration
blocks).
Wherever possible, Modelica.Utilities routines are used to
handle file / system commands. The current exception is the use of
'gcc' to compile the libgsl_integration_MI.so /
libgsl_integration_MI.dll library. This is standard on any Linux
system and is available for any Windows system via 'mingw'.
Alternatively, one could edit integrand.c directly and then
compile "by hand" in a command window:
gcc -fPIC -c integrand.c integration_mi.c
gcc -shared integration.o integration_mi.o -o
libgsl_integration_MI.so [.dll for windows]