|
[Sponsors] |
How should new class constructors be compiled and linked? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 18, 2014, 05:56 |
How should new class constructors be compiled and linked?
|
#1 |
New Member
Kasper Linnestad
Join Date: Jun 2014
Posts: 8
Rep Power: 12 |
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. 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 |
|
July 18, 2014, 15:56 |
|
#2 |
New Member
Kalli
Join Date: Jul 2014
Posts: 9
Rep Power: 12 |
I would have done the modification in following manner.
I hope this helps. Kalli Last edited by osha; July 18, 2014 at 18:18. |
|
July 18, 2014, 16:10 |
|
#3 |
New Member
Kasper Linnestad
Join Date: Jun 2014
Posts: 8
Rep Power: 12 |
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). |
|
Tags |
compilation, constructor, library, library solver linking, linking |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Interepreted Vs. Compiled UDFs | Antonis | Fluent UDF and Scheme Programming | 10 | March 22, 2018 12:15 |
customization can not be linked | hpkidmr | FLOW-3D | 0 | November 12, 2013 22:40 |
Compiled library vs. inInclude Files, DSMC solver crashes after run | GPesch | OpenFOAM Programming & Development | 8 | April 18, 2013 08:17 |