|
[Sponsors] |
June 29, 2012, 05:30 |
MRFZone.C compiling
|
#1 |
New Member
Michal
Join Date: Apr 2012
Location: Czech Republic
Posts: 27
Rep Power: 14 |
Hi,
I've changed the file MRFZone.C and I would like to compile the edited file. ~/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/cfdTools/general/MRF The make files and options are located several directories up: ~/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume So I compile in this directory in this way: wmake all It compiles all dependent file in the finiteVolume, but my question is: Is it some easier way?(only compile the MRFZone.C) Thanks. Michal |
|
July 10, 2012, 06:00 |
|
#2 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
You should write your own code in libraries/applications that are separate from the main code tree.
The usual way to do this is as follows: Copy the .C and .H file into your own directory. Rename the files : myMRFzone.C, myMRFzone.C (think of better names ) Rename the classes: use an editor with automatic name change executed on mutliple files Create a Make/{files, options} in this directory (you can see how this looks like for libfiniteVolume.so, you need to only copy the lines from Make/files that pertain to myMRFzone, change the LIB to your name, and the options stay the same). At the end, you have your own library compiled and ready to use. To use it, go into system/controlDict of a case you are running and put: libs ("libMyNewLibrary.so"); at the top of the file. |
|
July 10, 2012, 08:13 |
|
#3 |
New Member
Michal
Join Date: Apr 2012
Location: Czech Republic
Posts: 27
Rep Power: 14 |
Dear Tomislav,
thanks. I'll try it. Michal |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with Compiling UDFs in Ansys Fluent 13 (lnx64) | Ali.beh | Fluent UDF and Scheme Programming | 3 | August 27, 2018 04:22 |
paraview 3.10.1 compiling error (1.6-ext) | vkrastev | OpenFOAM Installation | 7 | October 28, 2011 03:17 |
Help with KIVA4 source code compiling | geothokar | Main CFD Forum | 0 | September 3, 2010 05:40 |
Dissimilarity in compiling new BC in 32bit OpenSuSE 103 versus 64bit CentOS 50 versus 64bit SLED 100 | sponiar | OpenFOAM Running, Solving & CFD | 3 | February 26, 2008 06:31 |
Discussing UDF and C++ Compiling | Big Stone | FLUENT | 9 | April 12, 2004 15:07 |