[prev in list] [next in list] [prev in thread] [next in thread] 

List:       paraview
Subject:    Re: [Paraview] Clean Grid and Average Point Data
From:       Tristan =?ISO-8859-1?B?U2NobPZnbA==?= <tristan.schloegl () ltd ! uni-erlangen ! de>
Date:       2014-07-31 7:31:27
Message-ID: CFFFBC76.288C%tristan.schloegl () ltd ! uni-erlangen ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Andy,

thanks for the idea with the "Pass Arrays" filter. After realising that the
filter is a bit buggy (see http://www.vtk.org/Bug/view.php?id=14817), I get
some good results using it. If I need more 'accurate' solutions I'll have a
look at the Programmable filter. Thanks for the link to the wiki!

Cheers
Tristan


Von:  Andy Bauer <andy.bauer@kitware.com>
Datum:  Dienstag, 29. Juli 2014 15:00
An:  Tristan Schloegl <tristan.schloegl@ltd.uni-erlangen.de>
Cc:  "Paraview@paraview.org" <Paraview@paraview.org>
Betreff:  Re: [Paraview] Clean Grid and Average Point Data

Hi Tristan,

I'm not familiar with deal.II's output format -- could you share a small
sample? 

Some other tricks you can try is using the "Pass Point Data" option with the
Point Data to Cell Data filter which will keep your point data around as
well. Then you could use the Pass Arrays filter to get rid of the cell data
that you didn't want generated from the point data before (i.e. the ones
that would overwrite your existing point data when you use the cell data to
point data filter).

As for the programmable filter, you can find more information on it at
http://www.paraview.org/Wiki/Python_Programmable_Filter. There are probably
more examples around the wiki that you can find as well with a little bit of
searching.

Regards,
Andy




On Tue, Jul 29, 2014 at 4:00 AM, Tristan Schlögl
<tristan.schloegl@ltd.uni-erlangen.de> wrote:
> Hi Andy,
> 
> thanks for your reply. I tried working with the "point data to cell data" and
> "cell data to point data" filters. Indeed, this is too much averaging. It
> might be a starting point for only the discontinuous field I'm interested in,
> but the filter applies on all data in my model (e.g. I don't want the
> continuous displacement field and others to be averaged). Is there a way to
> specify only a certain dataset the filter is working on?
> 
> Regarding the programmable filter, I'm very new to ParaView internals (I'm
> mainly working with the GUI), however I'm a bit experienced with Python. Can
> you recommend some tutorial, where I get a quick introduction in how to access
> the data and modify it?
> 
> I believe dealing with this problem in deal.ii directly requires some changes
> in the library itself. Maybe you can also do something with derived classes.
> However, having the full information of a discontinuous field, like deal.ii
> outputs it, is generally not a bad thing to examine results. I just sometimes
> need 'cleaner' pictures and thought that's a post processing task, best be
> handled in ParaView.
> 
> Tristan
> 
> 
> Von:  Andy Bauer <andy.bauer@kitware.com>
> Datum:  Montag, 28. Juli 2014 16:38
> An:  Tristan Schloegl <tristan.schloegl@ltd.uni-erlangen.de>
> Cc:  "Paraview@paraview.org" <Paraview@paraview.org>
> Betreff:  Re: [Paraview] Clean Grid and Average Point Data
> 
> Hi Tristan,
> 
> There are a couple of things you can try. The best but most complex is
> probably the programmable filter where you merge the points yourself and do
> the averaging for the point values. The other thing you can try is using the
> point data to cell data filter, then use the clean to grid filter and finally
> use the cell data to point data filter. This may due more averaging than you
> would like for your results. Other than that, did you get any feedback on the
> deal.II mailing list?
> 
> Regards,
> Andy
> 
> 
> On Mon, Jul 28, 2014 at 8:37 AM, Tristan Schlögl
> <tristan.schloegl@ltd.uni-erlangen.de> wrote:
>> Hi,
>> 
>> I'm using ParaView to visualise finite element simulation results created by
>> the deal.ii C++ library. Deal.ii outputs hex elements such that each element
>> has its own vertices. To illustrate that point a simple cube consisting of 8
>> elements and 27 nodes has 8*8=64 data points. When I display vector valued
>> data as glyphs I have multiple vectors at the same location resulting from
>> the contributions of neighbouring cells, see
>> http://blogs.fau.de/schloegl/files/2014/07/orig_grid.png .
>> 
>> I now want to display only a single vector at each point, namely the average
>> value of all contributions. I tried and applied a "Clean to Grid" filter, see
>> http://blogs.fau.de/schloegl/files/2014/07/clean_grid.png .
>> This is quite good already however, it seems that ParaView only takes one of
>> the vectors for each point and not the average (see top mid vector of the
>> front (z-max) face).
>> 
>> Is there any other way to realise what I need in ParaView?
>> 
>> Regards
>> Tristan
>> 
>> 
>> -- 
>> Dipl.-Ing. Tristan Schlögl
>> Chair of Applied Dynamics
>> University of Erlangen-Nuremberg
>> Haberstrasse 1
>> D-91058 Erlangen, Germany
>> room 01.013
>> phone +49 (0)9131 85 61003 <tel:%2B49%20%280%299131%2085%2061003>
>> fax +49 (0)9131 85 61011 <tel:%2B49%20%280%299131%2085%2061011>
>> url www.ltd.tf.uni-erlangen.de <http://www.ltd.tf.uni-erlangen.de>
>> 
>> _______________________________________________
>> Powered by www.kitware.com <http://www.kitware.com>
>> 
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>> 
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview
>> 
> 




[Attachment #5 (text/html)]

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; \
font-family: Calibri, sans-serif;"><div><div>Hi Andy,</div><div><br></div><div>thanks \
for the idea with the "Pass Arrays" filter. After realising that the filter is a bit \
buggy (see <a href="http://www.vtk.org/Bug/view.php?id=14817">http://www.vtk.org/Bug/view.php?id=14817</a>), \
I get some good results using it. If I need more 'accurate' solutions I'll have a \
look at the Programmable filter. Thanks for the link to the \
wiki!</div><div><br></div><div>Cheers</div><div>Tristan</div><div><div><br></div></div></div><div><br></div><span \
id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; \
text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; \
PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt \
solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span \
style="font-weight:bold">Von: </span> Andy Bauer &lt;<a \
href="mailto:andy.bauer@kitware.com">andy.bauer@kitware.com</a>&gt;<br><span \
style="font-weight:bold">Datum: </span> Dienstag, 29. Juli 2014 15:00<br><span \
style="font-weight:bold">An: </span> Tristan Schloegl &lt;<a \
href="mailto:tristan.schloegl@ltd.uni-erlangen.de">tristan.schloegl@ltd.uni-erlangen.de</a>&gt;<br><span \
style="font-weight:bold">Cc: </span> "<a \
href="mailto:Paraview@paraview.org">Paraview@paraview.org</a>" &lt;<a \
href="mailto:Paraview@paraview.org">Paraview@paraview.org</a>&gt;<br><span \
style="font-weight:bold">Betreff: </span> Re: [Paraview] Clean Grid and Average Point \
Data<br></div><div><br></div><div dir="ltr"><div><div>Hi Tristan,<br><br></div>I'm \
not familiar with deal.II's output format -- could you share a small sample? \
<br><br></div><div>Some other tricks you can try is using the "Pass Point Data" \
option with the Point Data to Cell Data filter which will keep your point data around \
as well. Then you could use the Pass Arrays filter to get rid of the cell data that \
you didn't want generated from the point data before (i.e. the ones that would \
overwrite your existing point data when you use the cell data to point data filter). \
<br><br></div><div>As for the programmable filter, you can find more information on \
it at <a href="http://www.paraview.org/Wiki/Python_Programmable_Filter">http://www.paraview.org/Wiki/Python_Programmable_Filter</a>. \
There are probably more examples around the wiki that you can find as well with a \
little bit of searching.<br><br></div><div>Regards,<br>Andy<br></div><div><br><br></div></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 29, 2014 at 4:00 AM, \
Tristan Schlögl <span dir="ltr">&lt;<a \
href="mailto:tristan.schloegl@ltd.uni-erlangen.de" \
target="_blank">tristan.schloegl@ltd.uni-erlangen.de</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div \
style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif"><div><div>Hi \
Andy,</div><div><br></div><div>thanks for your reply. I tried working with the "point \
data to cell data" and "cell data to point data" filters. Indeed, this is too much \
averaging. It might be a starting point for only the discontinuous field I'm \
interested in, but the filter applies on all data in my model (e.g. I don't want the \
continuous displacement field and others to be averaged). Is there a way to specify \
only a certain dataset the filter is working on?</div><div><br></div><div>Regarding \
the programmable filter, I'm very new to ParaView internals (I'm mainly working with \
the GUI), however I'm a bit experienced with Python. Can you recommend some tutorial, \
where I get a quick introduction in how to access the data and modify \
it?</div><div><br></div><div>I believe dealing with this problem in deal.ii directly \
requires some changes in the library itself. Maybe you can also do something with \
derived classes. However, having the full information of a discontinuous field, like \
deal.ii outputs it, is generally not a bad thing to examine results. I just sometimes \
need 'cleaner' pictures and thought that's a post processing task, best be handled in \
ParaView.</div><div><br></div><div>Tristan</div><div><br></div></div><div><br></div><span><div \
style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium \
none;BORDER-LEFT:medium \
none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt \
solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt"><span style="font-weight:bold">Von: \
</span> Andy Bauer &lt;<a href="mailto:andy.bauer@kitware.com" \
target="_blank">andy.bauer@kitware.com</a>&gt;<br><span \
style="font-weight:bold">Datum: </span> Montag, 28. Juli 2014 16:38<br><span \
style="font-weight:bold">An: </span> Tristan Schloegl &lt;<a \
href="mailto:tristan.schloegl@ltd.uni-erlangen.de" \
target="_blank">tristan.schloegl@ltd.uni-erlangen.de</a>&gt;<br><span \
style="font-weight:bold">Cc: </span> "<a href="mailto:Paraview@paraview.org" \
target="_blank">Paraview@paraview.org</a>" &lt;<a href="mailto:Paraview@paraview.org" \
target="_blank">Paraview@paraview.org</a>&gt;<br><span \
style="font-weight:bold">Betreff: </span> Re: [Paraview] Clean Grid and Average Point \
Data<br></div><div><div class="h5"><div><br></div><div dir="ltr"><div><div>Hi \
Tristan,<br><br></div>There are a couple of things you can try. The best but most \
complex is probably the programmable filter where you merge the points yourself and \
do the averaging for the point values. The other thing you can try is using the point \
data to cell data filter, then use the clean to grid filter and finally use the cell \
data to point data filter. This may due more averaging than you would like for your \
results. Other than that, did you get any feedback on the deal.II mailing \
list?<br><br></div>Regards,<br>Andy<br></div><div class="gmail_extra"><br><br><div \
class="gmail_quote">On Mon, Jul 28, 2014 at 8:37 AM, Tristan Schlögl <span \
dir="ltr">&lt;<a href="mailto:tristan.schloegl@ltd.uni-erlangen.de" \
target="_blank">tristan.schloegl@ltd.uni-erlangen.de</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div \
style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif"><div>Hi,</div><div><br></div><div>I'm \
using ParaView to visualise finite element simulation results created by the deal.ii \
C++ library. Deal.ii outputs hex elements such that each element has its own \
vertices. To illustrate that point a simple cube consisting of 8 elements and 27 \
nodes has 8*8=64 data points. When I display vector valued data as glyphs I have \
multiple vectors at the same location resulting from the contributions of \
neighbouring cells, see</div><div><a \
href="http://blogs.fau.de/schloegl/files/2014/07/orig_grid.png" \
target="_blank">http://blogs.fau.de/schloegl/files/2014/07/orig_grid.png</a>&nbsp;.</div><div><br></div><div>I \
now want to display only a single vector at each point, namely the average value of \
all contributions. I tried and applied a "Clean to Grid" filter, see</div><div><a \
href="http://blogs.fau.de/schloegl/files/2014/07/clean_grid.png" \
target="_blank">http://blogs.fau.de/schloegl/files/2014/07/clean_grid.png</a>&nbsp;.</div><div>This \
is quite good already however, it seems that ParaView only takes one of the vectors \
for each point and not the average (see top mid vector of the front (z-max) \
face).&nbsp;</div><div><br></div><div>Is there any other way to realise what I need \
in ParaView?</div><div><br></div><div>Regards</div><span><font \
color="#888888"><div>Tristan</div><div><br></div><div><div><br></div><div>--&nbsp;</div><div>Dipl.-Ing. \
Tristan Schlögl</div><div>Chair of Applied Dynamics</div><div>University of \
Erlangen-Nuremberg</div><div>Haberstrasse 1</div><div>D-91058 Erlangen, \
Germany</div><div>room 01.013</div><div>phone <a \
href="tel:%2B49%20%280%299131%2085%2061003" value="+4991318561003" \
target="_blank">+49 (0)9131 85 61003</a></div><div>fax <a \
href="tel:%2B49%20%280%299131%2085%2061011" value="+4991318561011" \
target="_blank">+49 (0)9131 85 61011</a></div><div>url <a \
href="http://www.ltd.tf.uni-erlangen.de" \
target="_blank">www.ltd.tf.uni-erlangen.de</a></div></div></font></span></div><br>_______________________________________________<br>
 Powered by <a href="http://www.kitware.com" \
target="_blank">www.kitware.com</a><br><br> Visit other Kitware open-source projects \
at <a href="http://www.kitware.com/opensource/opensource.html" \
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br> Please \
keep messages on-topic and check the ParaView Wiki at: <a \
href="http://paraview.org/Wiki/ParaView" \
target="_blank">http://paraview.org/Wiki/ParaView</a><br><br> Follow this link to \
subscribe/unsubscribe:<br><a \
href="http://public.kitware.com/mailman/listinfo/paraview" \
target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br><br></block \
quote></div><br></div></div></div></span></div></blockquote></div><br></div></span></body></html>




_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic