Problem implementing runTime Selection
Hi all,
I am trying to implement a model using runTimeSelection as per this link http://openfoamwiki.net/index.php/Op...tion_mechanism, especially section using section 4.3 as a guide. But the subsection http://openfoamwiki.net/index.php/Op...es_to_registercauses a compilation error: Code:
no matching function for call to ‘Foam::basicIgnitionModel::basicIgnitionModel(Foam::NoIgnition*)’ Is there an implementation in OpenFOAM source that I can look at? |
Hi!
Can you post the code line which is causing the error? Best Kathrin |
Hi Adhiraj,
The actual implementation of runTimeSelection (RTS) is hidden in OpenFOAM using a series of macros, such as addToRunTimeSelectionTable and defineRunTimeSelectionTable. So you never actually see it. This page of the wiki pulls out these sections and reconstructs them for all to see. Section 4.3 of the wiki was not intended to be directly implemented in your code. It's just supposed to show you what's going on. But I have managed to get RTS working this way - so it is possible. What I suggest is you try using the macros. The basic ones outlined in the first few sections of the wiki page should work. If your base class or derived classes are templates, then things get more challenging. Examples are everywhere in OpenFOAM. Straightforward to follow: Base: src/turbulenceModels/incompressible/RAS/RASModel Derived: src/turbulenceModels/incompressible/RAS/kEpsilon, Derived: src/turbulenceModels/incompressible/RAS/kOmega Buried deep in other macros - hard to figure out: Base: src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver Derived: src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit Derived: src/thermophysicalModels/chemistryModel/chemistrySolver/ode Hope this helps! |
Thanks to both of you
Quote:
Code:
Section 4.3 of the wiki was not intended to be directly implemented in your code. It's just supposed to show you what's going on. But I have managed to get RTS working this way - so it is possible. What I suggest is you try using the macros. The basic ones outlined in the first few sections of the wiki page should work. If your base class or derived classes are templates, then things get more challenging. Code:
Examples are everywhere in OpenFOAM. |
All times are GMT -4. The time now is 23:47. |