[MOAB-dev] Setting connectivity for single vertex

Tim Tautges tautges at mcs.anl.gov
Thu Jan 29 09:04:46 CST 2015


[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
>
>
>
>
>
>


More information about the moab-dev mailing list