|
[Sponsors] |
October 1, 2013, 23:44 |
PtrList and List
|
#1 |
Member
Geon-Hong Kim
Join Date: Feb 2010
Location: Ulsan, Republic of Korea
Posts: 36
Rep Power: 16 |
Dear Foamers,
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. Best regards, Geon-Hong. |
|
October 6, 2013, 15:36 |
|
#2 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Geon-Hong,
Quote:
In addition, OpenFOAM uses pointers a lot, so much that it has the "tmp" mechanism: http://openfoamwiki.net/index.php/OpenFOAM_guide/tmp Best regards, Bruno
__________________
|
||
Tags |
data, list, openfoam, ptrlist |
|
|
Similar Threads | ||||
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 07:05 |