CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Programmig own limiter function, modifying r function in limitedLinear.H (http://www.cfd-online.com/Forums/openfoam/80949-programmig-own-limiter-function-modifying-r-function-limitedlinear-h.html)

idrama October 12, 2010 02:17

Programmig own limiter function, modifying r function in limitedLinear.H
 
Hello Foamers,

I copied limitedLinear directory to somewhere else where I have modified some entries (for test purposes). Now, I want to compiled it and to integrate it into OpenFOAM: How do I have to proceed? Cany anyone advice me, please?

Cheers in advance

chegdan October 13, 2010 16:06

wmake libso
 
I would probably try the following:

1. Create a Make directory in your folder containing the code you want to compile
2. create the "files" and "options" files and fill them appropriately for compilation of a shared object library
2.a files should have the name of your C file on the first line and the line LIB=$(FOAM_LIBBIN)/lib<your C file name without .C>
2.b the options file should have

EXE_INC= -I<any included files you need here>

LIB_LIBS = -l<any other libraries you need here>

3. then outside of your make folder, call wmake libso and it should compile

4. In the controlDict file of the case you want to use your new scheme, you add the line

libs("libSharedObject.so") where the words sharedobject is the name from 2.a

I hope this helps.

Dan

idrama October 14, 2010 04:20

Thank you very much! I got it.


All times are GMT -4. The time now is 01:12.