CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Other] accesing points of a cell in a mesh (https://www.cfd-online.com/Forums/openfoam-meshing/75694-accesing-points-cell-mesh.html)

arkangel May 3, 2010 09:05

accesing points of a cell in a mesh
 
Dear Foamer,

I hope someone can help me

I have an external solver with a structured grid, I wan to interpolate the values of this grid into a polyMesh .

1) I can create one polyMesh with the information from the structured grid

2) or I can create the polyMesh in a more standard way and just interpolate the values of each grid on each other

I want to create a Chimera Grid like library , I know how to access the Cell center but to have a complete relationship I need to know the coordinates of the cell vertices, more or less like :

forAll(mesh.C(), cellI)
{

forAll(mesh.cells()[cellI].points(), pointI){
Info << mesh.cells()[cellI].points()[pointI].x()<<endl;
}

Info<<mesh.C()[cellI].x()<<endl;
}


How can I write the inner forAll to get the x,y,z coordinates of all points /vertices in one cell ?

Thanks

rolandde June 28, 2012 15:43

Did you figure it out? I have the same problem...

Smed October 16, 2012 09:18

Can anyone answer this?
How do you access all of the vertices of a cell?

Code:

mesh.points()[cellI]
only returns the coordinates of a single vertex associated with that cell.

Smed October 16, 2012 12:11

This question is answered here:
http://www.cfd-online.com/Forums/ope...ize-x-y-z.html


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