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:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -88,15 +88,8 @@ void Foam::distributedTriSurfaceMesh::distributeFields
|
||||
{
|
||||
typedef DimensionedField<Type, triSurfaceGeoMesh> fieldType;
|
||||
|
||||
HashTable<fieldType*> fields
|
||||
(
|
||||
objectRegistry::lookupClass<fieldType>()
|
||||
);
|
||||
|
||||
forAllIters(fields, fieldIter)
|
||||
for (fieldType& field : objectRegistry::sorted<fieldType>())
|
||||
{
|
||||
fieldType& field = *fieldIter();
|
||||
|
||||
const label oldSize = field.size();
|
||||
|
||||
map.distribute(field);
|
||||
|
||||
Reference in New Issue
Block a user