CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

LAPACK in openFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 3 Post By brosemu

Reply
 
LinkBack Thread Tools Display Modes
Old   July 27, 2011, 17:17
Default LAPACK in openFOAM
  #1
Member
 
Ali Shamooni
Join Date: Oct 2010
Posts: 36
Rep Power: 6
Alish1984 is on a distinguished road
Hi everyone

does anyone know how to use lapack++ and BLAS libraries in openfoam?
Alish1984 is offline   Reply With Quote

Old   July 27, 2011, 18:40
Default
  #2
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 14
l_r_mcglashan will become famous soon enough
Yes.

It can be as simple (in the case of uBLAS) as including the relevant header files in your source code and compiling.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   July 28, 2011, 11:29
Default
  #3
Member
 
Ali Shamooni
Join Date: Oct 2010
Posts: 36
Rep Power: 6
Alish1984 is on a distinguished road
Quote:
Originally Posted by l_r_mcglashan View Post
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.
Alish1984 is offline   Reply With Quote

Old   August 11, 2011, 09:56
Default
  #4
Member
 
Jim Knopf
Join Date: Dec 2010
Posts: 60
Rep Power: 6
JimKnopf is on a distinguished road
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
JimKnopf is offline   Reply With Quote

Old   September 5, 2011, 15:55
Default
  #5
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
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
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   September 6, 2011, 01:52
Default
  #6
Member
 
Jim Knopf
Join Date: Dec 2010
Posts: 60
Rep Power: 6
JimKnopf is on a distinguished road
Quote:
Originally Posted by lakeat View Post
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
JimKnopf is offline   Reply With Quote

Old   September 7, 2011, 06:26
Default
  #7
Member
 
Ali Shamooni
Join Date: Oct 2010
Posts: 36
Rep Power: 6
Alish1984 is on a distinguished road
Quote:
Originally Posted by lakeat View Post
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
Alish1984 is offline   Reply With Quote

Old   September 7, 2011, 06:33
Default
  #8
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 14
l_r_mcglashan will become famous soon enough
There is an implementation of SVD in OF, so you can save yourself the trouble with that one at least.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   September 7, 2011, 07:23
Default
  #9
Member
 
Ali Shamooni
Join Date: Oct 2010
Posts: 36
Rep Power: 6
Alish1984 is on a distinguished road
Quote:
Originally Posted by l_r_mcglashan View Post
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
Alish1984 is offline   Reply With Quote

Old   September 7, 2011, 10:41
Default
  #10
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Oh, I see.

Have you compared the code, Numerical Receipt good or Lapack++'s good? Or they are same for your case?
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   September 7, 2011, 10:42
Default
  #11
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Im looking for solving the eigenvalue and eigenvector, I am not sure OF has it or not? Anyone in the know?
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   February 10, 2012, 14:40
Default
  #12
New Member
 
Bill Rosemurgy
Join Date: Mar 2009
Location: Ann Arbor, MI
Posts: 20
Rep Power: 8
brosemu is on a distinguished road
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.
solefire, jiec827 and hua1015 like this.
brosemu is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 13:50


All times are GMT -4. The time now is 19:05.