How to loop over cell faces
Posted September 17, 2014 at 12:09 by pfhan
How to loop over cell faces qoute
Quote:
Hi Marshak,
I think it is better to start another thread for being easy to search later.
Regarding your question, the following is my sample code:
Hopt that helps,
Fumiya
I think it is better to start another thread for being easy to search later.
Regarding your question, the following is my sample code:
Code:
scalar sumA = 0.0; //Sum of areas of all faces of a cell const cell& cFaces = mesh.cells()[yourCellIndex]; forAll(cFaces, i) { sumA += mag(mesh.Sf()[cFaces[i]]); //cFaces[i]: face label of a cell } scalar Length = mesh.V()[yourCellIndex]/sumA;
Fumiya
Total Comments 0