CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

Compiling part of srcOpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2006, 06:13
Default I needed to modify Time.C and
  #1
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
I needed to modify Time.C and Time.H but when I compile with Allwmake in the src/ it takes lots of time. Is it possibel that I make a local Make folder in src/OpenFOAM/db/Time and compile it a shared object .so?

I will copy the Make file from OpenFOAM and modify it. Do I have to write any thing before:
wmake libso Time.

I guess I need to compile OpenFOAM folder once only after that and then any modifications in Time.C and Time.H will only need recompiling the Time folder to .so file. Am I right?


best Regards,
Maka
maka is offline   Reply With Quote

Old   March 7, 2006, 11:24
Default Time is one of the basic class
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Time is one of the basic classes and if you change its header (Time.H), most of OpenFOAM will need to recompile. However, if you only wish to change the implementation of some functions, you could make a local copy of Time.C and link it directly with your executable. The local version will take precedence over the shared object library and all will be well (I'd add some print statements into your functions if I were you). However, you will not be able to add new member functions or new member data into Time without recompiling the whole lot. Is there any chance of creating a new class derived from Time and adding your functionality that way (without disturbing the whole of FOAM)?

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   March 13, 2006, 07:29
Default Thanks for your help. ĒThe mod
  #3
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
Thanks for your help. ĒThe modification is about adding two memeber functions (writeInterval() and outputTime(label n) which are useful for processing existing instaneous data) so, the local version will not work. Unfotunately, the added functionality fits into the existing Time class so, if I derived a new class I wouldn't even know what to call it. You have not commented on the effect of separting the .so file of Time. Is there a reason the all OpenFOAM.so to be on file? I read in the user guide that is OpenFOAM.so loaded by default, is that the only reason. Anyway, thanks for your helpful comments
maka is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Advection part.... Sas Main CFD Forum 0 June 15, 2007 16:46
PhD in China (part 2) Rui Main CFD Forum 9 June 9, 2007 09:40
how to see 8.part file li FLUENT 2 May 30, 2005 21:28
part-time-cfd Michael Main CFD Forum 6 February 2, 2000 13:01


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