How should new class constructors be compiled and linked?
Hi,
I am currently working on extending twoPhaseEulerFoam to include mutlicomponent mixtures in each phase :). So far I have switched from the thermodynamic model rhoThermo to rhoReactionThermo and created the necessary fields in createFields.H. The problem is that the mixture model (basicMulticomponentMixture) doesn't have a constructor that includes the phase names. I was therefore wondering on how to include a new constructor that includes phase names (similar to what is done in basicThermo). The implementation in itself looks quite straightforward, but I am unsure on how to extend the existing model with the new constructor. :confused: The only solution that I can think of is to copy the whole reactionThermo folder, apply the changes and compile it to the user library. However, this will create a lot of duplicate code and I'm guessing there is a better way to do it. Does anyone know how to do it with less duplications? I could compile the changes directly in the src folder, but I would rather not do any changes to the original source code. Kasper |
I would have done the modification in following manner.
I hope this helps. Kalli |
Thanks for the reply!
I will try that once I get back from vacation ;) Another possibility that has arisen is to copy only the files that will be altered from the source folder, and link to the other original files. Since I am adding a constructor (without deleting the old ones), I believe that it is safe to create a user library that precedes the original library while all the other functionality is maintained (please correct me if I'm wrong). |
All times are GMT -4. The time now is 14:55. |