CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   nternal faces that surround each cell (

hawkeye321 March 11, 2013 22:59

nternal faces that surround each cell
Do you know how can I find the list of internal faces that surround each cell?

fumiya March 15, 2013 12:40

Hi mahdiiowa,

I think there are more elegant ways, but the following is an example:


forAll(mesh.cells(), cellI)
    const cell& cFaces = mesh.cells()[cellI];

    forAll(cFaces, i)
        label cf = cFaces[i];

        if (mesh.isInternalFace(cf))
            //cf is a label of a face that belongs to cellI and is an internal face

Best regards,

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