CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   LAPACK in openFOAM (https://www.cfd-online.com/Forums/openfoam-programming-development/91012-lapack-openfoam.html)

Alish1984 July 27, 2011 17:17

LAPACK in openFOAM
 
Hi everyone

does anyone know how to use lapack++ and BLAS libraries in openfoam?

l_r_mcglashan July 27, 2011 18:40

Yes.

It can be as simple (in the case of uBLAS) as including the relevant header files in your source code and compiling.

Alish1984 July 28, 2011 11:29

Quote:

Originally Posted by l_r_mcglashan (Post 317783)
Yes.

It can be as simple (in the case of uBLAS) as including the relevant header files in your source code and compiling.

whats uBLAS?
as I know,LAPACK needs BLAS and both of them are compiled seperately and make their own libraries.and i dont know how to use these libraries.

JimKnopf August 11, 2011 09:56

It is as simple als you have to compile the LaPack++ library on your Workstation and than include the headerfiles like

Code:

#include "lafnames.h"
but take care to include the library in Make/options. There you need to define a -I/path/to/your/lapack++library.so

greets
Jim

lakeat September 5, 2011 15:55

Hi,

Sorry, my question might be stupid, but why do you want to use Lapack? (LAPACK — Linear Algebra PACKage), is it because the funtion you need OpenFOAM currently does not have it, or is it not as efficient as Lapack is?

Thanks

JimKnopf September 6, 2011 01:52

Quote:

Originally Posted by lakeat (Post 322991)
Hi,

Sorry, my question might be stupid, but why do you want to use Lapack? (LAPACK — Linear Algebra PACKage), is it because the funtion you need OpenFOAM currently does not have it, or is it not as efficient as Lapack is?

Thanks

Probably he needs the eigenvalue functions or the QR-Factorization in LAPACK. But there might be tons of other reasons

Greets Jim

Alish1984 September 7, 2011 06:26

Quote:

Originally Posted by lakeat (Post 322991)
Hi,

Sorry, my question might be stupid, but why do you want to use Lapack? (LAPACK — Linear Algebra PACKage), is it because the funtion you need OpenFOAM currently does not have it, or is it not as efficient as Lapack is?

Thanks

As Jim said I wanted to use some of its functions like SVD(Singular value decomposition), Cholesky decomposition, QR decomposition... that openFOAM doesnt have
I forgot about Lapack and used "NumericalRecipies in C++" algorithms for my work

l_r_mcglashan September 7, 2011 06:33

There is an implementation of SVD in OF, so you can save yourself the trouble with that one at least.

Alish1984 September 7, 2011 07:23

Quote:

Originally Posted by l_r_mcglashan (Post 323256)
There is an implementation of SVD in OF, so you can save yourself the trouble with that one at least.


Yeah I saw SVD in OF2.0

lakeat September 7, 2011 10:41

Oh, I see.

Have you compared the code, Numerical Receipt good or Lapack++'s good? Or they are same for your case?

lakeat September 7, 2011 10:42

Im looking for solving the eigenvalue and eigenvector, I am not sure OF has it or not? Anyone in the know?

brosemu February 10, 2012 13:40

If anyone is still having trouble using LAPACK functions in OpenFOAM, I have put together a quick example application that demonstrates how to do it. I sure don't understand all of the intricacies, but it works! Send me a message with your e-mail address and I'll be sure to get it off to you.

mufeng March 21, 2022 22:45

Quote:

Originally Posted by brosemu (Post 343842)
If anyone is still having trouble using LAPACK functions in OpenFOAM, I have put together a quick example application that demonstrates how to do it. I sure don't understand all of the intricacies, but it works! Send me a message with your e-mail address and I'll be sure to get it off to you.

Dear brosemu, I also have trouble using LAPACK functions in OpenFOAM. would you like to share a quick example application on how to do it? my e-mail address is 1564480576@qq.com. Thanks a lot.


All times are GMT -4. The time now is 07:10.