CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   nternal faces that surround each cell (https://www.cfd-online.com/Forums/openfoam/114481-nternal-faces-surround-each-cell.html)

hawkeye321 March 11, 2013 21:59

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

fumiya March 15, 2013 11:40

Hi mahdiiowa,

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

Code:

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,
Fumiya


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