1

I am trying to integrate a vector valued (49 components) function f[] which as an example may look like:

f[0] = 1
f[1] = cos(x)
f[2] = cos(2x)
f[3] = cos(3x)

... and so on.

I was wondering if there was a way to integrate such a vector function in GSL using a single command. I can currently do this only by having n=49 different cquad integration handles/procedures which seems inefficient, as I wish to use the same integration "mesh " for all the function components.

Thank you for your attention.

user2844647
  • 163
  • 4

1 Answers1

0

As far as I know, at the moment such things via GSL cannot be done. But your task can be solved with the help of openmp (with #pragma omp parallel for), but there may be a very large overhead when using gsl dll by several threads at the same time. It is possible (this is not accurate) that for that you will have to rebuild the GSL library itself with the openmp-compiler-flags. But GSL is quite thread-safe on its own.

DJNZ
  • 121
  • 1
  • 13