|
[Sponsors] |
December 13, 2016, 16:02 |
making change in some base class
|
#1 |
Member
Emad Tandis
Join Date: Sep 2010
Posts: 77
Rep Power: 15 |
Hello
I am new to openFoam programming and want to make some change in some class like gaussLapacianScheme.C located in $WM_PROJECT/src/finiteVolume/finiteVolume/lapalcianScheme/ to the extent that I understood form "Make" directory, the option file in almost all application usually access to this calss using -lfiniteVolme in "option" file. for example the "option" file of one solver is something like below: EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lmeshTools My question are: 1- Do the " -I$(LIB_SRC)/finiteVolume/lnInclude " and "-lfiniteVolume " say same thing? also "-I$(LIB_SRC)/meshTools/lnInclude" and "-lmeshTools"? 2- I removed "-lfiniteVolume " and instead of using that dynamic library, copied all files in in $WM_PROJECT/src/finiteVolume to "lnInclude" located in application folder. but I received Error. Why I have to use dynamic library? I think I have got quite confused with the dependencies and be glad to receive some notes. Thanks in advance |
|
December 13, 2016, 18:37 |
|
#2 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
To answer your questions:
In the options file, there are two sections. The *_INC section will tell the compiler where to look for *.H and *.C files that the code you are compiling needs. The *_LIBS section is a list of all the libraries (e.g. libfiniteVolume.so) within OpenFOAM that are needed. Wmake then puts it all together and helps your compiler ... compile things. |
|
December 14, 2016, 16:42 |
|
#3 |
Member
Emad Tandis
Join Date: Sep 2010
Posts: 77
Rep Power: 15 |
Thanks chegdan for reply
1- If I want to compile finite volume classes and my newApp.C at the same time, and not using -lfiniteVolume, Do you think it is doable? ( I tried but received error) 2- I did the method that you've mentioned (using option file), but it was of no use. So I copied all finite volume classes to my slover's directory to make sure that they are available for newApp.C . As I said the compiler show error while compiling classes file. Then tried to compile finite volume classes separately (using >>wmake libso command, like what openFoam did), it works. I just want to know why I can not compile them with the newApp.C at the same time? |
|
December 15, 2016, 03:21 |
|
#4 | |||
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20 |
Quote:
Quote:
Why would you want to do that in the first place? Your executable will become huge, and your solver will suddenly have openfoam hard-coded, which means that you need to do a lot of changes to your solver if the finite volume library is updated, as opposed to requiring zero changes. Quote:
Read this first. |
||||
December 15, 2016, 09:15 |
|
#5 |
Member
Emad Tandis
Join Date: Sep 2010
Posts: 77
Rep Power: 15 |
Thanks floquation
I think i got the point.. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
GPU Linear Solvers for OpenFOAM | gocarts | OpenFOAM Announcements from Other Sources | 37 | August 17, 2022 14:22 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 17:11 |
[swak4Foam] Error bulding swak4Foam | sfigato | OpenFOAM Community Contributions | 18 | August 22, 2013 12:41 |
[swak4Foam] funkySetFields compilation error | tayo | OpenFOAM Community Contributions | 39 | December 3, 2012 05:18 |
How to change turbulence model in InterFoam | Gildeh | OpenFOAM Running, Solving & CFD | 4 | March 28, 2012 12:04 |