CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   FluentMeshToFoam writes too small cellZones (http://www.cfd-online.com/Forums/openfoam-bugs/62584-fluentmeshtofoam-writes-too-small-cellzones.html)

gschaider May 22, 2007 13:57

The last cell in a cellZone do
 
The last cell in a cellZone does not get written (got lost during the index-shifting). The patch to repair fluentMeshToFoam.L would be:

Index: fluentMeshToFoam.L
================================================== =================
--- fluentMeshToFoam.L (revision 92)
+++ fluentMeshToFoam.L (working copy)
@@ -1588,14 +1588,14 @@
<< " of type " << type << " starting at " << start() - 1
<< " ending at " << end() - 1 << " to cellSet." << endl;

- labelList cls(end() - start());
+ labelList cls(end() - start() +1);

// Mark zone cells, used for finding faces
boolList zoneCell(pShapeMesh.nCells(), false);

// shift cell indizes by 1
label nr=0;
- for (label celli = (start() - 1); celli < (end() - 1); celli++)
+ for (label celli = (start() - 1); celli <= (end() - 1); celli++)
{
cls[nr]=celli;
zoneCell[celli] = true;


All times are GMT -4. The time now is 19:20.