CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   How to loop over faces in a cell? (http://www.cfd-online.com/Forums/openfoam/70601-how-loop-over-faces-cell.html)

jhierroa November 30, 2009 06:04

How to loop over faces in a cell?
 
Dear sirs,

I am wondering how may I loop over all the faces in a cell.

I have been looking at the code (mesh definition) and have found only a reference to faces, neighbours and owners.

Is there any way to find all the faces surrounding a given cell?

Yours faithfully,

andrewryan November 30, 2009 06:09

For example look in src/lagrangian/basic/Particle/Particle.C on line 75:

Code:

const labelList& faces = mesh.cells()[celli];

jhierroa November 30, 2009 06:42

Thank you very much.
 
In fact, what I was looking for is defined in primitiveMesh.H

I could not have found it without your hint.

Thanks!


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