CFD Online Discussion Forums

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

magjohan March 4, 2011 11: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 02: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 10:39.