[MOAB-dev] Setting connectivity for single vertex
CORTIS M.
michael.cortis at durham.ac.uk
Thu Jan 29 10:18:47 CST 2015
Thanks Tim,
I am still having a problem, may be the guys at Argonne can help with this.
I've tried a simpler one and trying to crete the vertex from point.
double points[9]={0.5,0,0};
EntityHandle vertex;
rval=moab2.create_vertex(points,vertex);CHKERR_PETSC(rval);
EntityHandle dummy;
rval = moab2.create_element(MBVERTEX,&vertex,1,dummy); CHKERR_PETSC(rval);
But I am getting Error code 2, MB_TYPE_OUT_OF_RANGE !
Is it possible to use MBVERTEX here?
Thanks,
Michael
On 29 Jan 2015, at 15:04, Tim Tautges <tautges at mcs.anl.gov<mailto:tautges at mcs.anl.gov>> wrote:
[cc'ng moab-dev list, since I've left Argonne.]
dummy is 0, which is an invalid handle, but should be the handle(s) of the entities whose connectivity you're setting; I suspect what you want there is *vertices.begin(). And you can't set connectivity until you make an element, so you need to call create_element, probably with the number of verts per element as 1 and the connectivity just the single vertex defining the point element.
- tim
On 01/29/2015 03:34 AM, CORTIS M. wrote:
Dear Tim,
I've got the following problem:
I want to create vertex entities, ie create the points and vertex entities using those points.
So I've create a set of vertices from an array of coordinates.
And If you try to set the connectivity for every point you get Error code 4 (MB_ENTITY_NOT_FOUND).
This is my code:
double points[6]={1,0,0, 0,1,0, 0,0,1};
Range vertices;
rval = moab.create_vertices(points,2,vertices); CHKERR_PETSC(rval);
EntityHandle dummy=0;
rval = moab.set_connectivity(dummy,vertexlist,1); CHKERR_PETSC(rval); //Error code 4
Any suggestions how to overcome this problem.
Kind regards,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20150129/f190bcfc/attachment.html>
More information about the moab-dev
mailing list