<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Vijay,<br>
<br>
I had the same thought and took a quick look. Much of the
infrastructure is there, namely, that the VTK writer appears to
already know how to write out nodes as 1-vertex elements.<br>
<br>
What is missing is to include the list of vertices among the list of
elements to be written. This happens near lines 144 & 180 in
src/io/WriteVTK.cpp. I think it would need very few changes to make
it serve Michael's needs, but a little more work and testing to be
implemented as an option.<br>
<br>
There would also emerge questions about how to implement the option:<br>
<ul>
<li>when invoked, always write all vertices as 1-vertex elements,
or<br>
</li>
<li>when invoked, only write vertices that lack higher-dimension
connectivity as 1-vertex elements</li>
</ul>
<p>The former is quick and easy, but only serves the special case
when a model has only unconnected vertices.<br>
</p>
Paul<br>
<br>
<div class="moz-cite-prefix">On 02/02/2015 04:49 PM, Vijay S.
Mahadevan wrote:<br>
</div>
<blockquote
cite="mid:CAOcbyd1eJwx4i_m5zKpJf0+5N0xTPvjQNd2pSO=aNR5h5ZXeKA@mail.gmail.com"
type="cite">
<pre wrap="">Michael,
If the intent is just to visualize these point clouds and data on
them, we can certainly add some specific functionality for this when
we output the data to vtk. If you want to contribute some code for
this, we will be happy to take a PR directly on our bitbucket repo.
Querying connectivity of the point cloud is not currently supported
and unless you do create a higher dimensional element using sets of
vertices, we cannot compute the one ring vertex neighbors (which
involves find the element adjacencies and performing a union on the
connectivity of these entities). Depicting a point as a traditional
element (0-D element) can possibly be done but this is not supported
now and am not sure how easy it will be without few involved changes
in some parts including the I/O writers.
Vijay
On Sun, Feb 1, 2015 at 9:39 AM, CORTIS M. <a class="moz-txt-link-rfc2396E" href="mailto:michael.cortis@durham.ac.uk"><michael.cortis@durham.ac.uk></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
So if you save points on vtk you have such thing where no connectivity and
no cell definition.
POINTS 2 double
10.0 0 0
-10.0 0 0
CELLS 0 0
CELL_TYPES 0
but if you want to can include connectivities and cel definition as follows
POINTS 2 double
10.0 0 0
-10.0 0 0
CELLS 2 4
1 0
1 1
CELL_TYPES 2
1
1
This way, Paraview and VisIt can recognise points as elements and
consequently can visualise them.
Michael
On 1 Feb 2015, at 15:34, Paul Wilson <a class="moz-txt-link-rfc2396E" href="mailto:ppwilson@wisc.edu"><ppwilson@wisc.edu></a>
wrote:
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 <a class="moz-txt-link-rfc2396E" href="mailto:ppwilson@wisc.edu"><ppwilson@wisc.edu></a>
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." <a class="moz-txt-link-rfc2396E" href="mailto:iulian@mcs.anl.gov"><iulian@mcs.anl.gov></a> 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: <a class="moz-txt-link-abbreviated" href="mailto:moab-dev-bounces@mcs.anl.gov">moab-dev-bounces@mcs.anl.gov</a> [<a class="moz-txt-link-abbreviated" href="mailto:moab-dev-bounces@mcs.anl.gov">moab-dev-bounces@mcs.anl.gov</a>] on behalf
of CORTIS M. [<a class="moz-txt-link-abbreviated" href="mailto:michael.cortis@durham.ac.uk">michael.cortis@durham.ac.uk</a>]
Sent: Thursday, January 29, 2015 10:18 AM
To: <a class="moz-txt-link-abbreviated" href="mailto:moab-dev@mcs.anl.gov">moab-dev@mcs.anl.gov</a>
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.
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 <a class="moz-txt-link-rfc2396E" href="mailto:tautges@mcs.anl.gov"><tautges@mcs.anl.gov></a> 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: <a class="moz-txt-link-freetext" href="http://bit.ly/pphw-cal">http://bit.ly/pphw-cal</a>
Professor, Engineering Physics. ~ <a class="moz-txt-link-freetext" href="http://cnerg.engr.wisc.edu">http://cnerg.engr.wisc.edu</a>
Faculty Director, Advanced Computing Infrastructure ~ <a class="moz-txt-link-freetext" href="http://aci.wisc.edu">http://aci.wisc.edu</a>
--
-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --
Paul Wilson ~ UW-Madison ~ 608-263-0807 ~ cal: <a class="moz-txt-link-freetext" href="http://bit.ly/pphw-cal">http://bit.ly/pphw-cal</a>
Professor, Engineering Physics. ~ <a class="moz-txt-link-freetext" href="http://cnerg.engr.wisc.edu">http://cnerg.engr.wisc.edu</a>
Faculty Director, Advanced Computing Infrastructure ~ <a class="moz-txt-link-freetext" href="http://aci.wisc.edu">http://aci.wisc.edu</a>
</pre>
</blockquote>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --
Paul Wilson ~ UW-Madison ~ 608-263-0807 ~ cal: <a class="moz-txt-link-freetext" href="http://bit.ly/pphw-cal">http://bit.ly/pphw-cal</a>
Professor, Engineering Physics. ~ <a class="moz-txt-link-freetext" href="http://cnerg.engr.wisc.edu">http://cnerg.engr.wisc.edu</a>
Faculty Director, Advanced Computing Infrastructure ~ <a class="moz-txt-link-freetext" href="http://aci.wisc.edu">http://aci.wisc.edu</a></pre>
</body>
</html>