- **Main CFD Forum**
(*https://www.cfd-online.com/Forums/main/*)

- - **Any numerical triple integration program is available in Fortran?
**
(*https://www.cfd-online.com/Forums/main/455-any-numerical-triple-integration-program-available-fortran.html*)

Any numerical triple integration program is available in Fortran?
I have a complicated equation in terms of Sine and Cosine which contains a vector integration. However, the Mathematica software failed to perform the analytical integration. Is there any software other than Mathematica which is capable to perform a complicated analytical integeration? The program quad3d in 'Numerical recipes in Fortran' is not practical in this case. Because, this program takes at least 2 hours to perform one integration from -inf to +inf with our equation and we have to do at least 1 Lakh iterations during our computations. Is there any numerical program available to do a triple integration within a reasonable time in Fortran language? Let me know your suggestions and insights in this regard.
With regards, Radhakrishnan. K |

Re: Any numerical triple integration program is available in Fortran?
It's not clear from your description what you are integrating, more specifically, how many variable parameters are involved in your integral. In general, if the integrals are expensive (e.g. elliptic integrals) it's a good idea to create tables for them, which will cost you time just once; in the computations all you have to do is to look the tables up (plus simple interpolation, which are fast). If you have many parameters, then you can at least reduce their number by doing a hybrid table/analytic, table/numerical, etc.
Hope I haven't stated the obvious Adrin Gharakhani |

Re: Any numerical triple integration program is available in Fortran?
Hello:
Based on the very limited information you have provided about your problem, I can offer the following suggestions. 1. Since your function is composed of sines and cosines, I would strongly urge you to attempt a solution through the use of Fourier techniques. ( an FFT may be applicable to your problem, and could give you an answer that is thousands of times faster than a "brute force" approach). 2. SInce you seem to be integrating between (+/-) inf, you need to introduce a change of variables so as to integrate between finite limits. This is easily done. 3. If your boundary is of a complex shape, then your best bet is to employ Gaussian integration techniques along each direction. It is possible to decompose your volume integral into surface integrals on the boundary. The surface integrals in turn may be decomposed into line integrals along each elementary surface defining your volume. These line integrals are finally evaluated by Gaussian integration. I would be happy to provide more details of this method. |

Re: Any numerical triple integration program is available in Fortran?
Hello Sir,
Many many thanks for your helpful response on my question. Meanwhile, I have solved my problem using some numerical methods. |

All times are GMT -4. The time now is 02:01. |