|
[Sponsors] |
June 27, 2011, 14:02 |
Linking ALGLIB to OpenFOAM
|
#1 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi,
I've been doing some BC programming and now I got to the point where I need specific functions, not implemented in OpenFOAM. My goal is to make cnoidal waves, and as a result I need complete elliptic integrals and so on. My intention is to use existing code instead of having to program the functions if possible. I found a C++ (and more) library with all the functions I need which is called ALGLIB, so I tried linking it to my BC file: Code:
#include "specialfunctions.h" ... KElliptic = alglib::ellipticintegralk(mElliptic); Code:
interFoam: symbol lookup error: /home/phicau/OpenFOAM/phicau-1.7.1/lib/linux64GccDPOpt/libIHWavesAlpha.so: undefined symbol: _ZN6alglib17ellipticintegralkEd Thanks in advance Pablo |
|
June 28, 2011, 05:27 |
|
#2 |
Member
|
Hi Picau,
I also encurred in the need for linking the alglib libraries to some applications in OpenFOAM. In particular I included the ap.h and the matinv.h headers in the source code of my application and add the reference to the alglib source files and to the object in the Make/options file as follows: EXE_INC = \ -I$(LIB_SRC)/postProcessing/postCalc \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I/usr/local/src/alglib/cpp/out EXE_LIBS = \ $(FOAM_LIBBIN)/postCalc.o \ -L/usr/local/src/alglib/cpp/out/ -lalglib \ -lfiniteVolume Hope you find this helpful
__________________
Cosimo Bianchini Ergon Research s.r.l. Via Panciatichi, 92 50127 Florence - ITALY Tel: +39 055 0763716 Mob: +39 320 9460153 e-mail: cosimo.bianchini@ergonresearch.it URL: www.ergonresearch.it |
|
June 28, 2011, 14:40 |
|
#3 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hey thanks a lot! Things are easier now:
Fool of me I did not include all the files I needed, since you have to include both the .h and .cpp on the header, so to make "specialfunctions" to work you just need the following includes: Code:
#include "./cpp/src/specialfunctions.h" #include "./cpp/src/ap.h" #include "./cpp/src/alglibinternal.h" #include "./cpp/src/specialfunctions.cpp" #include "./cpp/src/ap.cpp" #include "./cpp/src/alglibinternal.cpp" |
|
January 11, 2012, 17:52 |
|
#4 | |
New Member
Betsy Seiffert
Join Date: Feb 2011
Location: Honolulu, HI
Posts: 11
Rep Power: 15 |
Quote:
Thanks, Betsy |
||
January 11, 2012, 18:07 |
|
#5 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi
yes I currently have a boundary condition that generates cnoidal waves along with several other theories, and includes simultaneous active wave absorption. However I am in the process of publishing a couple of papers and I cannot give further details for the moment. As soon as the papers are in press I will give some references. I still don't know if the BC code will be available in the future, but I hope it will. Regards |
|
January 12, 2012, 03:45 |
|
#6 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Betsy
You might find the following toolbox interesting: http://openfoamwiki.net/index.php/Contrib/waves2Foam (Please note that I make commercial for my own work). The toolbox includes a method for generating cnoidal waves. Kind regards, Niels |
|
January 12, 2012, 17:15 |
|
#7 |
New Member
Betsy Seiffert
Join Date: Feb 2011
Location: Honolulu, HI
Posts: 11
Rep Power: 15 |
Thanks Pablo and Niels for the references, I will take a look at these.
Betsy |
|
Tags |
alglib, functions, openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 07:25 |
Modified OpenFOAM Forum Structure and New Mailing-List | pete | Site News & Announcements | 0 | June 29, 2009 06:56 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 15:25 |
OpenFOAM Debian packaging current status problems and TODOs | oseen | OpenFOAM Installation | 9 | August 26, 2007 14:50 |