mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: unallocated list in triSurface vtk reader (issue #297)
- Condition is there to catch cases where the vtkSurfaceFormat returns no zones (which should never be the case), but assigns a fallback value without first resizing.
This commit is contained in:
@ -67,11 +67,7 @@ bool Foam::triSurface::readVTK(const fileName& fName)
|
||||
|
||||
patches[zoneI] = geometricSurfacePatch
|
||||
(
|
||||
(
|
||||
zone.geometricType() != word::null
|
||||
? zone.geometricType()
|
||||
: "empty"
|
||||
),
|
||||
zone.geometricType().size() ? zone.geometricType() : "empty",
|
||||
regionName,
|
||||
zoneI
|
||||
);
|
||||
@ -86,6 +82,7 @@ bool Foam::triSurface::readVTK(const fileName& fName)
|
||||
else
|
||||
{
|
||||
// Add single patch
|
||||
patches.setSize(1);
|
||||
patches[0] = geometricSurfacePatch("empty", "patch0", 0);
|
||||
|
||||
// Triangle regions already set to 0
|
||||
|
||||
Reference in New Issue
Block a user