<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" style="word-wrap:break-word">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hello,<br>
Moab does not have elements with a single vertex. Is this what you are trying to do?
<br>
A vertex (node) is represented with an entity handle of type MBVERTEX, and you can get coordinates for it<br>
<br>
I am not sure what are you trying to do.<br>
Best Regards,<br>
Iulian<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF966284"><font size="2" color="#000000" face="Tahoma"><b>From:</b> moab-dev-bounces@mcs.anl.gov [moab-dev-bounces@mcs.anl.gov] on behalf of CORTIS M. [michael.cortis@durham.ac.uk]<br>
<b>Sent:</b> Thursday, January 29, 2015 10:18 AM<br>
<b>To:</b> moab-dev@mcs.anl.gov<br>
<b>Cc:</b> Tautges, Timothy J.<br>
<b>Subject:</b> Re: [MOAB-dev] Setting connectivity for single vertex<br>
</font><br>
</div>
<div></div>
<div>
<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-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
<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-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
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-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
<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-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
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-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
<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-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
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-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
<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-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
<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>Is it possible to use MBVERTEX here?</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Michael</div>
<br>
<div>
<div>On 29 Jan 2015, at 15:04, Tim Tautges <<a href="mailto:tautges@mcs.anl.gov" target="_blank">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>
</div>
</div>
</div>
</body>
</html>