[MOAB-dev] Possible bug in moab::Core::get_coords
Roman Putanowicz
putanowr at l5.pk.edu.pl
Wed Jul 28 10:51:53 CDT 2010
> Hello,
>
> Thanks for sending the bug.
>
> I could not reproduce it, because I have gcc 4.2.4
> Still, you should not use Range for connectivity, because the vertices will be returned in the increasing order of the handles (this is why you had for the last edge 1 4 , and not 4 1; see definition of the Range)
>
> You should use std::vector, like in
> ....
> moab::ErrorCode ierr;
> std::vector<moab::EntityHandle> vertices;
> ierr = imesh->get_connectivity(&handle, 1, vertices);
> RINS(imesh, ierr);
> double coords[6];
> ....
>
> Can you try changing the code, and let us know if the bug still shows up?
Dear Iulian,
Thank you for your answer. Using std::vector instead of Range helps.
It is the second time I make this mistake :(.
However, regardless of the order of vertices (i.e. std::vector versus
Range) the function get_coords should fill the coords array properly,
shouldn't it?
Regards,
Roman
--
Roman Putanowicz, PhD < putanowr at l5.pk.edu.pl >
Institute for Computational Civil Engng (L-5)
Dept. of Civil Engng, Cracow Univ. of Technology
www.l5.pk.edu.pl, tel. +48 12 628 2569, fax 2034
More information about the moab-dev
mailing list