CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

HashTable use

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 15, 2014, 08:03
Default HashTable use
  #1
New Member
 
Nathanaël Geng
Join Date: May 2012
Posts: 18
Rep Power: 13
nathanael is on a distinguished road
Hello,

I try to use HashTable for storing data like in a map and I don't understand the behavior:
Code:
// Create the HashTable
HashTable<StoredClass, SortableList<label>, Hash<SortableList<label> > > myMap;

// Add item to it
const face& facePt = topo.faces()[fI];
myMap.insert(SortableList<label>(facePt.pointsLabel()), StoredClassItem);

// Get item back
StoredClass& face = myMap[SortableList<label>(blockFaces[blockFaceLabel])];
This code compile without problem, but ran a fatal error:
Code:
--> FOAM FATAL ERROR: 
4(0 1 2 3) not found in table.  Valid entries: 
24
(
4(2 4 18 21)
4(20 21 22 23)
4(5 7 9 11)
4(14 15 16 17)
4(0 1 2 3) <=== Data exist
4(12 14 24 25)
...
Same applies with find/found, the data is not found inside my HashTable.
I think I miss something with the usage of HashTable.

Thanks in advance for the help.

Nathanaël.
nathanael is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run time Selection Mechanism - Some help required to understand jaswi OpenFOAM Programming & Development 3 October 29, 2015 14:42
dynamic list (variable size) alquimista OpenFOAM Programming & Development 5 July 19, 2013 14:29
multidimensional hashtable? Farshad_Noravesh OpenFOAM 0 January 24, 2011 10:05
HashTable Binary write format deepsterblue OpenFOAM Bugs 1 March 16, 2010 11:03
Ordered HashTable olesen OpenFOAM 1 January 4, 2007 05:17


All times are GMT -4. The time now is 09:46.