- If the underlying type is contiguous, FixedList hashes its storage directly.
- Drop labelPairHash (non-commutative) from fvMeshDistribute since
FixedList::Hash does the right thing anyhow.
- Hash<edge> specialization is commutative, without multiplication.
- Hash<triFace> specialization kept multiplication (but now uLabel).
There's not much point optimizing it, since it's not used much anyhow.
Misc. changes
- added StaticAssert to NamedEnum.H
- label.H / uLabel.H : define FOAM_LABEL_MAX, FOAM_ULABEL_MAX with the
values finally used for the storage. These can be useful for pre-processor
checks elsewhere (although I stopped needing them in the meantime).
Injection:
- moved position and velocity constraints for 2-d cases to the base InjectionModel
- added validInjection function
Clouds
- added an effective density function to the KinematicCloud
- not much speed difference between SuperFastHash and Jenkin's lookup3 but
both are 5-10% faster than what is currently implemented in Foam::string,
albeit inlining probably helps there.
- TODO: integration with existing infrastructure
- compare iteratorBase == iteratorBase by value, not position
thus this works
list[a] == list[b] ...
- compare iterator == iteratorBase and const_iterator == iteratorBase
by position, not value. The inheritance rules means that this works:
iter == list.end() ...
this will compare positions:
iter == list[5];
Of course, this will still compare values:
*iter == list[5];
- make table power-of-two, but since it seems to give 1-2% performance
improvement, maybe forget it too.
- remove two-argument form of hashing classes and do the modulus direclty
within HashTable instead. This simplifies things a fair bit.
- migrate Hash<void*> from db/dlLibrary to primitives/hashes/Hash
- it was possible to create a PackedList::iterator from a
PackedList::const_iterator and violate const-ness
- added HashTable::printInfo for emitting some information
- changed default table sizes from 100 -> 128 in preparation for future
2^n table sizes
- much better performance on empty tables (4-6x speedup), neutral
performance change on filled tables. Since tableSize_ is non-zero when
nElmts_ is, there is no modulus zero problem.