Linking ALGLIB to OpenFOAM
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" Code:
interFoam: symbol lookup error: /home/phicau/OpenFOAM/phicau-1.7.1/lib/linux64GccDPOpt/libIHWavesAlpha.so: undefined symbol: _ZN6alglib17ellipticintegralkEd Thanks in advance Pablo |
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 |
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" |
Quote:
Thanks, Betsy |
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 |
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 |
Thanks Pablo and Niels for the references, I will take a look at these.
Betsy |
All times are GMT -4. The time now is 05:00. |