Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Index of mesh vertices starting from 0 or 1?
Posted 5 mai 2011, 10:28 UTC−4 Interfacing, Mesh Version 4.1 2 Replies
Please login with a confirmed email address before reporting spam
Hi,
i obtain the tet-elements of a mesh by
tets = mesh1.getElem('tet');
which gives me a matrix containing the indices of the four vertices that determine each tet-element in each column.
Now I try to get the coordinates of the vertices by using the index-values with matrix
vertices = mesh1.getVertex;
But some tet have a 0 as index-value, so i guess that Comsol starts counting the vertices from 0. If i don't shift the index +1 Matlab gives me an error because it starts counting arrays from 1.
So am I right with my guess or does 0 mean something else (like 'no vertex' ...which would mean that Comsol also puts triangles in the tet set)?
Best regards
i obtain the tet-elements of a mesh by
tets = mesh1.getElem('tet');
which gives me a matrix containing the indices of the four vertices that determine each tet-element in each column.
Now I try to get the coordinates of the vertices by using the index-values with matrix
vertices = mesh1.getVertex;
But some tet have a 0 as index-value, so i guess that Comsol starts counting the vertices from 0. If i don't shift the index +1 Matlab gives me an error because it starts counting arrays from 1.
So am I right with my guess or does 0 mean something else (like 'no vertex' ...which would mean that Comsol also puts triangles in the tet set)?
Best regards
2 Replies Last Post 6 mai 2011, 13:34 UTC−4