mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: use SubList for CompactListList access
- this was previously a UList instead of SubList, but SubList supports better assignment of values ENH: add invertOneToManyCompact - returns a CompactListList<label> instead of labelListList, which allows for reuse as partitioning table etc and/or slightly reduced memory overhead
This commit is contained in:
@ -65,16 +65,19 @@ void Foam::meshDualiser::checkPolyTopoChange(const polyTopoChange& meshMod)
|
||||
|
||||
if (nUnique < points.size())
|
||||
{
|
||||
labelListList newToOld(invertOneToMany(nUnique, oldToNew));
|
||||
CompactListList<label> newToOld
|
||||
(
|
||||
invertOneToManyCompact(nUnique, oldToNew)
|
||||
);
|
||||
|
||||
forAll(newToOld, newI)
|
||||
forAll(newToOld, newi)
|
||||
{
|
||||
if (newToOld[newI].size() != 1)
|
||||
if (newToOld[newi].size() != 1)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "duplicate verts:" << newToOld[newI]
|
||||
<< "duplicate verts:" << newToOld[newi]
|
||||
<< " coords:"
|
||||
<< UIndirectList<point>(points, newToOld[newI])
|
||||
<< UIndirectList<point>(points, newToOld[newi])
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user