mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: hash constructors with power-of-two
- use 1024 instead of 1000 since it will be changed internally to 1024 anyhow.
This commit is contained in:
@ -54,7 +54,7 @@ int main(int argc, char *argv[])
|
|||||||
std::vector<bool> stlVector(n, true);
|
std::vector<bool> stlVector(n, true);
|
||||||
|
|
||||||
labelHashSet emptyHash;
|
labelHashSet emptyHash;
|
||||||
labelHashSet fullHash(1000);
|
labelHashSet fullHash(1024);
|
||||||
for (label i = 0; i < n; i++)
|
for (label i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
fullHash.insert(i);
|
fullHash.insert(i);
|
||||||
|
|||||||
@ -393,7 +393,7 @@ void extractSurface
|
|||||||
|
|
||||||
// Collect sizes. Hash on names to handle local-only patches (e.g.
|
// Collect sizes. Hash on names to handle local-only patches (e.g.
|
||||||
// processor patches)
|
// processor patches)
|
||||||
HashTable<label> patchSize(1000);
|
HashTable<label> patchSize(1024);
|
||||||
label nFaces = 0;
|
label nFaces = 0;
|
||||||
forAllConstIter(labelHashSet, includePatches, iter)
|
forAllConstIter(labelHashSet, includePatches, iter)
|
||||||
{
|
{
|
||||||
@ -405,7 +405,7 @@ void extractSurface
|
|||||||
|
|
||||||
|
|
||||||
// Allocate zone/patch for all patches
|
// Allocate zone/patch for all patches
|
||||||
HashTable<label> compactZoneID(1000);
|
HashTable<label> compactZoneID(1024);
|
||||||
forAllConstIter(HashTable<label>, patchSize, iter)
|
forAllConstIter(HashTable<label>, patchSize, iter)
|
||||||
{
|
{
|
||||||
label sz = compactZoneID.size();
|
label sz = compactZoneID.size();
|
||||||
|
|||||||
@ -230,7 +230,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
// From (name of) patch to compact 'zone' index
|
// From (name of) patch to compact 'zone' index
|
||||||
HashTable<label> compactZoneID(1000);
|
HashTable<label> compactZoneID(1024);
|
||||||
// Mesh face and compact zone indx
|
// Mesh face and compact zone indx
|
||||||
DynamicList<label> faceLabels;
|
DynamicList<label> faceLabels;
|
||||||
DynamicList<label> compactZones;
|
DynamicList<label> compactZones;
|
||||||
@ -238,7 +238,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
// Collect sizes. Hash on names to handle local-only patches (e.g.
|
// Collect sizes. Hash on names to handle local-only patches (e.g.
|
||||||
// processor patches)
|
// processor patches)
|
||||||
HashTable<label> patchSize(1000);
|
HashTable<label> patchSize(1024);
|
||||||
label nFaces = 0;
|
label nFaces = 0;
|
||||||
forAllConstIter(labelHashSet, includePatches, iter)
|
forAllConstIter(labelHashSet, includePatches, iter)
|
||||||
{
|
{
|
||||||
@ -247,7 +247,7 @@ int main(int argc, char *argv[])
|
|||||||
nFaces += pp.size();
|
nFaces += pp.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
HashTable<label> zoneSize(1000);
|
HashTable<label> zoneSize(1024);
|
||||||
forAllConstIter(labelHashSet, includeFaceZones, iter)
|
forAllConstIter(labelHashSet, includeFaceZones, iter)
|
||||||
{
|
{
|
||||||
const faceZone& pp = fzm[iter.key()];
|
const faceZone& pp = fzm[iter.key()];
|
||||||
|
|||||||
Reference in New Issue
Block a user