mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: additional Map/HashTable constructors and ListOp functions
- construct Map/HashTable from key/value lists. - invertToMap() : like invert() but returns a Map<label>, which is useful for sparse numbering - inplaceRenumber() : taking a Map<label> for the mapper ENH: construct/reset CStringList for list of C-strings
This commit is contained in:
@ -295,9 +295,7 @@ void addToInterface
|
||||
else
|
||||
{
|
||||
// Create new interface of size 1.
|
||||
Map<label> zoneToSize;
|
||||
zoneToSize.insert(zoneID, 1);
|
||||
regionsToSize.insert(interface, zoneToSize);
|
||||
regionsToSize(interface).insert(zoneID, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -484,18 +482,10 @@ void getInterfaceSizes
|
||||
zoneName + "_" + name1 + "_to_" + name0
|
||||
);
|
||||
}
|
||||
interfaceSizes[nInterfaces] = infoIter();
|
||||
|
||||
if (regionsToInterface.found(e))
|
||||
{
|
||||
regionsToInterface[e].insert(zoneID, nInterfaces);
|
||||
}
|
||||
else
|
||||
{
|
||||
Map<label> zoneAndInterface;
|
||||
zoneAndInterface.insert(zoneID, nInterfaces);
|
||||
regionsToInterface.insert(e, zoneAndInterface);
|
||||
}
|
||||
interfaceSizes[nInterfaces] = infoIter();
|
||||
regionsToInterface(e).insert(zoneID, nInterfaces);
|
||||
|
||||
nInterfaces++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user