CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Type of dictionaryConstructorTablePtr_ (https://www.cfd-online.com/Forums/openfoam-programming-development/164384-type-dictionaryconstructortableptr_.html)

t.oliveira December 19, 2015 20:57

Type of dictionaryConstructorTablePtr_
 
Dear all,

In many parts of OpenFOAM (e.g. src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C) the variable dictionaryConstructorTablePtr_ occurs.

I would like to know what the class of this variable is, and where on the code it is instantiated.

Thanks!

t.oliveira December 21, 2015 11:07

I found that the variable dictionaryConstructorTablePtr_ that occurs on src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C
is of pointer type Foam::combustionModels:: psiCombustionModel::dictionaryConstructorTable* {aka Foam::HashTable<Foam::autoPtr<Foam::combustionMode ls:: psiCombustionModel> (*)(const Foam::word&, const Foam::fvMesh&), Foam::word, Foam::string::hash>*}.

So I believe its type varies according to the scope of dictionaryConstructorTablePtr_.

tomislav_maric December 21, 2015 11:32

Quote:

Originally Posted by t.oliveira (Post 578192)
Dear all,

In many parts of OpenFOAM (e.g. src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C) the variable dictionaryConstructorTablePtr_ occurs.

I would like to know what the class of this variable is, and where on the code it is instantiated.

Thanks!

Check out this blog post. There is an entire series on RTS that I wrote, you might want to read that if you want to understand the RTS mechanism.

FYI: do not expect to read that stuff in 2 minutes and understand everything immediately - it's a complicated system that uses macros together with nested class templates to register stuff to class-static hash tables. It is not a cookie recipe ;) Work over the source code examples (available on bitbucket ). If you find a bug in the examples, please submit an issue here

wouter December 21, 2015 18:27

Hello t.oliveira
found another place where it is explained in another way.
http://openfoamwiki.net/index.php/Op...tion_mechanism

Maybe it helps,
Wouter

t.oliveira December 28, 2015 13:48

Thanks, Tomislav and Wouter.

Tomislav, the series on RTS on sourceflux blog is one of a kind. Please consider making a new chapter out of it to add to the next edition of your book (which has been very useful, by the way).

Piyush25 March 2, 2021 11:44

Need Help
 
what is dictionaryConstructorTablePtr_ and dictionaryConstructorTable??


All times are GMT -4. The time now is 14:22.