[MOAB-dev] get_vertex_coordinates()

Nico Schlömer nico.schloemer at gmail.com
Wed Nov 4 18:32:59 CST 2015


Hi everyone,

I'm just looking into how I can extract the vertex coordinates from a mesh,
and found [1]. Curiously, the functions returns a single vector of length
3*N (N being the number of vertices), arranged like
```
x0 x1 ... xN y0 y1 ... yN z0 ... zN.
```
This I find a little weird, since typically you'll be interested inall
coordinates of a single point, (xK, yK, zK), and given the above memory
arrangement, you have to jump around the vector, completely eliminating the
chances for cache hits. If you really have to return a single vector, a
better layout appears to be
```
x0 y0 z0 x1 y1 z1 ...
```
Perhaps there is a reason behind the above output though. What do you think?

Cheers,
Nico

[1]
http://www.mcs.anl.gov/~fathom/moab-docs/html/classmoab_1_1Interface.html#aa25d4dcabd4fb5eb0db2b7f5c3b3d6d2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20151105/182295e7/attachment.html>


More information about the moab-dev mailing list