View Issue Details

IDProjectCategoryView StatusLast Update
0002727OpenFOAM[All Projects] Bugpublic2017-10-18 16:27
ReporterjacobAssigned Tohenry 
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version14.04
Product Versiondev 
Fixed in Versiondev 
Summary0002727: mergeMeshes fails when master mesh has zero patches
DescriptionWhen the "mergeMeshes" utility is applied on empty master mesh (i.e. boundary, points, faces, owner and neighbour contain zero-sized lists) -- which should be an acceptable starting point for merging multiple meshes -- the utility crashes with a segmentation fault.
Steps To ReproduceCreate a case with empty mesh (i.e. boundary, points, faces, owner and neighbour contain zero-sized lists) and try to merge any other mesh to this one using "mergeMeshes".
Additional InformationThe utility wrongly (or unnecessarily) assumes that the master mesh contains at least one patch. A trivial fix is attached to this report.
TagsNo tags attached.

Activities

jacob

2017-10-18 15:25

reporter  

mergePolyMesh.diff (385 bytes)
--- mergePolyMesh.C	2017-10-18 16:18:01.127756622 +0200
+++ mergePolyMesh-fixed.C	2017-10-16 13:35:07.000000000 +0200
@@ -410,6 +410,7 @@
         Info<< "Adding new patches. " << endl;
 
         label endOfLastPatch =
+            patchi == 0 ? 0 :
             oldPatches[patchi - 1].start() + oldPatches[patchi - 1].size();
 
         for (; patchi < patchNames_.size(); patchi++)
mergePolyMesh.diff (385 bytes)

henry

2017-10-18 16:27

manager   ~0008889

Thanks for the patch.

Resolved by commit 644253773f6edc519859069fe9de2fd93934be79

Issue History

Date Modified Username Field Change
2017-10-18 15:25 jacob New Issue
2017-10-18 15:25 jacob File Added: mergePolyMesh.diff
2017-10-18 16:27 henry Assigned To => henry
2017-10-18 16:27 henry Status new => resolved
2017-10-18 16:27 henry Resolution open => fixed
2017-10-18 16:27 henry Fixed in Version => dev
2017-10-18 16:27 henry Note Added: 0008889