[MOAB-dev] get_vertex_coordinates()

Grindeanu, Iulian R. iulian at mcs.anl.gov
Thu Nov 5 10:40:43 CST 2015


you can use
http://www.mcs.anl.gov/~fathom/moab-docs/html/classmoab_1_1Interface.html#a30ecd0d51554763a820513f637f09df0

you will have to get vertices first in a range

________________________________
From: moab-dev-bounces at mcs.anl.gov [moab-dev-bounces at mcs.anl.gov] on behalf of Nico Schlömer [nico.schloemer at gmail.com]
Sent: Wednesday, November 04, 2015 6:32 PM
To: moab-dev at mcs.anl.gov
Subject: [MOAB-dev] get_vertex_coordinates()

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/28f2fd64/attachment.html>


More information about the moab-dev mailing list