[Kratos] Nodes Id of a specific element

Pablo Becker pbecker en cimne.upc.edu
Lun Oct 19 17:03:53 CEST 2015


Hello Sheila,
once you know the element you must use its Geometry() and from there you
can have access to the nodes defining the element:

#first we get the reference to the Element, because now we only have its Id.
Element& my_element = GetElement( ElementId);
#to get the geometry:
Geometry<Node<3> >& geom = Element.GetGeometry();
#and then we can loop the nodes of the geometry of the elment.
for (unsigned int i=0; i!=(3); i++)
      int node_id =  geom[i].Id();


I hope this works. If you have more doubs, do not hesitate to write again.
Pablo

On 15 October 2015 at 10:32, Sheila Fernández López <sheilafzlz en gmail.com>
wrote:

> Hi, I would need to know the 'id' of the nodes of a specific element (that
> i have found with the function Find2D in pointlocation.h (i am working in
> c++)), but i do not want to iterate over all the nodes of the mesh. I don't
> know how i can do it, if there is a function already defined or not. Thanks
>
>
> _______________________________________________
> Kratos mailing list
> Kratos en listas.cimne.upc.edu
> http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/kratos
>
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://listas.cimne.upc.edu/pipermail/kratos/attachments/20151019/69711e89/attachment.htm 


Más información sobre la lista de distribución Kratos