|October 1, 2013, 22:44||
PtrList and List
Join Date: Feb 2010
Location: Ulsan, Republic of Korea
Posts: 27Rep Power: 8
Recently I have peered the OpenFOAM source codes to understand the data structures used in it.
Meanwhile, a fundamental question has come up : "why does the OpenFOAM frequently use PtrList instead of List?"
I think it may not be the case of OpenFOAM only but also C++ language.
One thing that I can guess is that it can handle large data efficiently by using the pointers instead of objects directly. But I don't have any other idea of advantages of using PtrList over List.
Please somebody help me with this problem!
Thank you very much.
|October 6, 2013, 14:36||
Join Date: Mar 2009
Location: Lisbon, Portugal
Blog Entries: 39Rep Power: 97
In addition, OpenFOAM uses pointers a lot, so much that it has the "tmp" mechanism: http://openfoamwiki.net/index.php/OpenFOAM_guide/tmp
|data, list, openfoam, ptrlist|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Read properties per component from an input file dictionary||Cyp||OpenFOAM Programming & Development||29||November 1, 2015 22:41|
|Pollutant dispersion in the environment||alberto||OpenFOAM Running, Solving & CFD||24||November 29, 2014 14:31|
|PtrList initialization problem||mateusz_slowikowski||OpenFOAM Running, Solving & CFD||8||March 19, 2012 15:32|
|PtrList error while trying to define an array of volScalarFields||adhiraj||OpenFOAM||2||February 15, 2012 18:26|
|C question||kar||OpenFOAM Running, Solving & CFD||26||May 20, 2008 06:05|