|
[Sponsors] |
Best way to maintain additional functionality between versions |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 5, 2008, 12:50 |
Hello,
This could be a gene
|
#1 |
New Member
Kian Mehravaran
Join Date: Mar 2009
Location: London, U.K
Posts: 22
Rep Power: 17 |
Hello,
This could be a general programming question, and similar to the one asked by Sergio Ferraris (Feb.27, 2008), but left without an elegant solution. Similar to his question, I have added virtual functions to classes and unlike his case, I don't mind dirtying the original OpenFOAM code. However, upgrading to a new release would require going to all the .H and .C files and copy/pasting them in the new release files, which would've been fine if I only had a handful of functions. As an example, I have defined the virtual function probeL() in LESmodel, and later defined it GenEddyVisc and GenSGSStress. In the main code an instance of compressible::LESmodel is created and called "turbulence". Now I can easily do turbulence->probeL() to access my function. Please note that if I had created a subclass of LESmodel (call it LESmodel2) and added my function there, it won't be seen by GenEddyVisc, GenSGSStress or their subclasses, unless I had created their subclasses, inheriting from LESmodel2. I appreciate any ideas. Best Regards, Kian Mehravaran |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
3D UDF Paraboilc Velocity Profile (Can't Maintain) | Sing | FLUENT | 12 | August 7, 2017 07:25 |
how to maintain constant presure in a tank? | JB | FLUENT | 5 | July 31, 2008 06:12 |
How to maintain the total gravity? | panpan1202 | FLUENT | 0 | March 12, 2008 03:43 |
How to maintain spacing along a new curve? | KB | Main CFD Forum | 2 | June 5, 2007 17:45 |
Turbo functionality is not enabled! | nancy | FLUENT | 0 | October 9, 2003 16:44 |