I needed to modify Time.C and
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?
Time is one of the basic class
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)?
Thanks for your help. ĒThe mod
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
|All times are GMT -4. The time now is 07:57.|