CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to obtain the index of all the points that belong to a particular patch (https://www.cfd-online.com/Forums/openfoam-solving/58465-how-obtain-index-all-points-belong-particular-patch.html)

mathieu October 14, 2008 20:30

Hi to everybody ! It is po
 
Hi to everybody !

It is possible to create a field that contains all the point coordinates of the mesh :

vectorField meshPoints = mesh.points();

It is then possible to call a single point from that field if we know the index of that particular point :

vector point = meshPoints[index];

Now, I would like to know if there is a way to obtain the index of all the points that belong to a specified patch. Many thanks,

Mathieu

niklas October 15, 2008 06:02

const labelList& patchPoints =
 
const labelList& patchPoints = mesh.boundaryMesh()[patchIndex].meshPoints();

mathieu October 15, 2008 09:16

Thanks !
 
Thanks !


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