CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

Search Results

Register Blogs Community New Posts Updated Threads Search

Showing results 1 to 4 of 4
Search took 0.00 seconds.
Search: Posts Made By: deepsterblue
Forum: OpenFOAM Programming & Development October 28, 2011, 16:07
Replies: 12
Views: 2,576
Posted By deepsterblue
Choosing a particular container depends on how...

Choosing a particular container depends on how you would like to use it. If you want random access into a linked list, then a hash table would be a good choice, but you'll take a hit with performance...
Forum: OpenFOAM Programming & Development October 28, 2011, 15:45
Replies: 12
Views: 2,576
Posted By deepsterblue
The new list is created only when the underlying...

The new list is created only when the underlying storage is filled to capacity. Anyhow, I can't think of a better way to do this, so I consider this optimal.
Forum: OpenFOAM Programming & Development October 28, 2011, 10:26
Replies: 12
Views: 2,576
Posted By deepsterblue
It's not a simple wrap around List<T>. It's true...

It's not a simple wrap around List<T>. It's true that the underlying memory-handling is done by List<T>, but allocations/deallocations and memcpy's are rare. The idea is to pre-allocate a region of...
Forum: OpenFOAM Programming & Development October 27, 2011, 08:36
Replies: 12
Views: 2,576
Posted By deepsterblue
You can use the setSize(const label, const T&)...

You can use the setSize(const label, const T&) member function in the List class (where Field is derived from) to increment its size (by 1 or any other number). This automatically copies values from...
Showing results 1 to 4 of 4

 
Forum Jump

All times are GMT -4. The time now is 16:55.