<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div apple-content-edited="true">
<div style="font-family: Menlo; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div style="color: rgb(0, 0, 0); font-family: Menlo; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Thanks Tim,</div>
<div style="color: rgb(0, 0, 0); font-family: Menlo; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Menlo; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
I am still having a problem, may be the guys at Argonne can help with this.</div>
<div style="color: rgb(0, 0, 0); font-family: Menlo; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Menlo; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
I've tried a simpler one and trying to crete the vertex from point.</div>
<div style="color: rgb(0, 0, 0); font-family: Menlo; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br>
</div>
<div style="font-family: Menlo; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div style="margin: 0px; font-size: 12px; "> <span style="font-size: 11px; ">double</span> points[<span style="font-size: 11px; ">9</span>]={<span style="font-size: 11px; ">0.5</span>,<span style="font-size: 11px; ">0</span>,<span style="font-size: 11px; ">0</span>};</div>
<div style="margin: 0px; font-size: 12px; "> EntityHandle vertex;</div>
<div style="margin: 0px; font-size: 12px; "> rval=moab2.create_vertex(points,vertex);CHKERR_PETSC(rval);</div>
<div style="margin: 0px; font-size: 12px; "> EntityHandle dummy;</div>
<div style="margin: 0px; font-size: 12px; "> rval = moab2.create_element(MBVERTEX,&vertex,<span style="font-size: 11px; ">1</span>,dummy); CHKERR_PETSC(rval);</div>
</div>
<br class="Apple-interchange-newline">
</div>
But I am getting Error code 2, MB_TYPE_OUT_OF_RANGE ! </div>
<div apple-content-edited="true">Is it possible to use MBVERTEX here?</div>
<div apple-content-edited="true"><br>
</div>
<div apple-content-edited="true">Thanks,</div>
<div apple-content-edited="true"><br>
</div>
<div apple-content-edited="true">Michael</div>
<br>
<div>
<div>On 29 Jan 2015, at 15:04, Tim Tautges <<a href="mailto:tautges@mcs.anl.gov">tautges@mcs.anl.gov</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">[cc'ng moab-dev list, since I've left Argonne.]<br>
<br>
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.<br>
<br>
- tim<br>
<br>
On 01/29/2015 03:34 AM, CORTIS M. wrote:<br>
<blockquote type="cite">Dear Tim,<br>
<br>
I've got the following problem:<br>
<br>
I want to create vertex entities, ie create the points and vertex entities using those points.<br>
So I've create a set of vertices from an array of coordinates.<br>
And If you try to set the connectivity for every point you get Error code 4 (MB_ENTITY_NOT_FOUND).<br>
<br>
This is my code:<br>
<br>
double points[6]={1,0,0, 0,1,0, 0,0,1};<br>
Range vertices;<br>
rval = moab.create_vertices(points,2,vertices); CHKERR_PETSC(rval);<br>
EntityHandle dummy=0;<br>
rval = moab.set_connectivity(dummy,vertexlist,1); CHKERR_PETSC(rval); //Error code 4<br>
<br>
Any suggestions how to overcome this problem.<br>
<br>
Kind regards,<br>
<br>
Michael<br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote>
</blockquote>
</div>
<br>
</body>
</html>