CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Find cellID (http://www.cfd-online.com/Forums/openfoam-solving/85696-find-cellid.html)

magjohan March 4, 2011 12:51

Find cellID
 
Hi, just wondering how i can print out the cellIDs in the same way as the cell neighbours are printed with the following command

Info<< mesh.cellCells()[i]<< endl;

gwierink March 5, 2011 03:42

Hi Johan,

If you'd just like a list of all cells, you could do something like
Code:

forAll(mesh.C(), cellI)
{
    Info << "cellID = " << cellI << endl;
}



All times are GMT -4. The time now is 07:08.