View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000104OpenFOAM[All Projects] Bugpublic2010-12-08 21:062010-12-09 09:54
Assigned Tomattijs 
StatusclosedResolutionno change required 
PlatformLinuxOSUbuntuOS Version10.04
Product Version 
Target VersionFixed in Version 
Summary0000104: cellCells() gives segmentation fault on non-orthogonal mesh
DescriptionWhen the cellCells function is used to create a labelList of a cell's neighbours, the program crashes giving a segmentation fault unless the mesh is completely orthogonal.

Here is an example of the code used:
label probeCell = mesh_.findCell(probePoint); //Label cell probePoint is in
const labelList& probeCellNeighbours = mesh_.cellCells()[probeCell];

The first line executes fine. The second line using cellCells() works fine on a flat plate mesh made in blockMesh. When the second line is used on a structured mesh around an airfoil (for instance, the airFoil2D mesh in the simpleFoam tutorials), it gives a segmentation fault and crashes the program. It seems to hit some cells and make an infinitely long list of neighbors until it crashes.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
mattijs (reporter)
2010-12-09 09:54

Check the return value of your call to findCell. Most likely it is -1 (= point not in any cell).

- Issue History
Date Modified Username Field Change
2010-12-08 21:06 doedmund New Issue
2010-12-09 09:54 mattijs Note Added: 0000172
2010-12-09 09:54 mattijs Status new => closed
2010-12-09 09:54 mattijs Assigned To => mattijs
2010-12-09 09:54 mattijs Resolution open => no change required
2010-12-09 09:54 mattijs Fixed in Version => 1.7.x