[MOAB-dev] Setting connectivity for single vertex

Paul Wilson ppwilson at wisc.edu
Sun Feb 1 09:34:55 CST 2015


Hello again,

On 02/01/2015 09:31 AM, CORTIS M. wrote:
> Hello Paul,
>
> In fact you can create vertices and use them and store data on tag.
> The only problem was that if there is no connectivity,
> ParaView and VisIT does not visualise them unless you plot the points 
> using glyphs.
> So I had to create a function which read the points from a mesh file 
> and insert their individual connectivities and save them as vtk.
Now I see!  Thanks for the clarification.

So are you connecting the vertices to themselves?  What is the element 
type in VTK for such an element?

Paul



>
> Problem solved. But may be MOAB would consider this problem and do 
> something about it.
>
> Thanks for your input,
>
> Michael
>
>
> On 1 Feb 2015, at 15:24, Paul Wilson <ppwilson at wisc.edu 
> <mailto:ppwilson at wisc.edu>>
>  wrote:
>
>> Hello Michael,
>>
>> On 01/29/2015 05:08 PM, CORTIS M. wrote:
>>> Hi Iulian,
>>>
>>> Yes I am trying to create an element made from single vertex.
>>> I want to used these for Material Point Method.
>>>
>>> So there is a way of creating the vertices, but not adding 
>>> connectivity to themselves only?
>>> Or may be another way round?
>>
>> Perhaps, I'm not fully understanding your questions, but it is 
>> certainly possible to create vertices in MOAB and then use them 
>> directly in your analysis.  There is no need to create an element if, 
>> in fact, all you need are the vertices.  Each vertex can be tagged 
>> with data in the same way that an element can be.
>>
>> I hope that is helpful,
>> Paul
>>
>>> If not, don't worry about. Will create a vtk writer to do this and 
>>> hopefully moab can use the vertices.
>>>
>>> Any assistance is really appreciated.
>>>
>>> Kind regards
>>>
>>> Michael
>>>
>>>
>>>
>>>
>>> On 29 Jan 2015, at 17:24, "Grindeanu, Iulian R." <iulian at mcs.anl.gov 
>>> <mailto:iulian at mcs.anl.gov>> wrote:
>>>
>>>> Hello,
>>>> Moab does not have elements with a single vertex. Is this what you 
>>>> are trying to do?
>>>> A vertex (node) is represented with an entity handle of type 
>>>> MBVERTEX, and you can get coordinates for it
>>>>
>>>> I am not sure what are you trying to do.
>>>> Best Regards,
>>>> Iulian
>>>>
>>>> ------------------------------------------------------------------------
>>>> *From:*moab-dev-bounces at mcs.anl.gov 
>>>> <mailto:moab-dev-bounces at mcs.anl.gov> [moab-dev-bounces at mcs.anl.gov 
>>>> <mailto:moab-dev-bounces at mcs.anl.gov>] on behalf of CORTIS M. 
>>>> [michael.cortis at durham.ac.uk <mailto:michael.cortis at durham.ac.uk>]
>>>> *Sent:*Thursday, January 29, 2015 10:18 AM
>>>> *To:*moab-dev at mcs.anl.gov <mailto:moab-dev at mcs.anl.gov>
>>>> *Cc:*Tautges, Timothy J.
>>>> *Subject:*Re: [MOAB-dev] Setting connectivity for single vertex
>>>>
>>>> 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.
>>>>
>>>> doublepoints[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
>>>
>>
>> -- 
>> -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --
>> Paul Wilson ~ UW-Madison ~ 608-263-0807 ~ cal:http://bit.ly/pphw-cal
>> Professor, Engineering Physics. ~http://cnerg.engr.wisc.edu
>> Faculty Director, Advanced Computing Infrastructure ~http://aci.wisc.edu
>

-- 
-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --
Paul Wilson ~ UW-Madison ~ 608-263-0807 ~ cal: http://bit.ly/pphw-cal
Professor, Engineering Physics. ~ http://cnerg.engr.wisc.edu
Faculty Director, Advanced Computing Infrastructure ~ http://aci.wisc.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20150201/2e37a0ac/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6303 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20150201/2e37a0ac/attachment-0001.bin>


More information about the moab-dev mailing list