CFD Online Discussion Forums

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

mahdiiowa March 11, 2013 22: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 12: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 08:41.