View Issue Details

IDProjectCategoryView StatusLast Update
0001387OpenFOAMBugpublic2015-03-02 20:54
ReporterHakikiCanakkaleli Assigned Touser4 
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformLinuxOSUbuntuOS Version12.04
Summary0001387: cutCells() return duplicated cell IDs.
Description== 1 ==
const labelList& cutCells() const inline returns a list of cells cut by the generated plane; however, the list contains duplicated (or more) cell IDs.
Steps To Reproduce== 2 ==
Consider a typical computational rectangular computational domain from which we would like to obtain cell IDs from a specified cut plane:

// Generate the plane
point pnt(1.0, 1.0, 0.0);
vector direction (1.0 , 0.0 , 0.0);
const Foam::plane pl1(pnt,direction);

// Generate cuttingPlane
const primitiveMesh& primMesh = mesh;
const bool tri = 0;
const labelUList& cellIdLabels = mesh.owner();
Foam::cuttingPlane cutPlane(pl1, primMesh, tri, cellIdLabels);

// Create the cell ID list
const labelList& cutCells = cutPlane.cutCells();

== 3 ==
Info << cutCells << endl;

The following produces many duplicated cell IDs within the same list.

"
...
335022
335022
335022
335034
335034
335175
335175
335176
335176
335176
...
"
TagsNo tags attached.

Activities

user4

2015-03-02 20:53

  ~0003947

The 4th argument to cuttingPlane is a list of potentially cut cells. You're passing in the owner list which has duplicate cell labels. Either default the argument (= cut all cells) or construct a labellist with unique contents.

Issue History

Date Modified Username Field Change
2014-08-31 08:47 HakikiCanakkaleli New Issue
2015-03-02 20:53 user4 Note Added: 0003947
2015-03-02 20:54 user4 Status new => closed
2015-03-02 20:54 user4 Assigned To => user4
2015-03-02 20:54 user4 Resolution open => no change required