mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use objectRegistry/IOobjectList sorted instead of lookupClass
- in most cases a parallel-consistent order is required. Even when the order is not important, it will generally require fewer allocations to create a UPtrList of entries instead of a HashTable or even a wordList.
This commit is contained in:
@ -597,19 +597,19 @@ int main(int argc, char *argv[])
|
||||
polyMesh::meshSubDir/"sets"
|
||||
);
|
||||
|
||||
for (const word& setName : objects.sortedNames<cellSet>())
|
||||
for (const IOobject& io : objects.csorted<cellSet>())
|
||||
{
|
||||
cSetNames.insert(setName, cSetNames.size());
|
||||
cSetNames.insert(io.name(), cSetNames.size());
|
||||
}
|
||||
|
||||
for (const word& setName : objects.sortedNames<faceSet>())
|
||||
for (const IOobject& io : objects.csorted<faceSet>())
|
||||
{
|
||||
fSetNames.insert(setName, fSetNames.size());
|
||||
fSetNames.insert(io.name(), fSetNames.size());
|
||||
}
|
||||
|
||||
for (const word& setName : objects.sortedNames<pointSet>())
|
||||
for (const IOobject& io : objects.csorted<pointSet>())
|
||||
{
|
||||
pSetNames.insert(setName, pSetNames.size());
|
||||
pSetNames.insert(io.name(), pSetNames.size());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user