Hello,<div><br></div><div>I'm following the SC'10 tutorial with the help of the VTK doxygen, but I don't understand how to do the following:</div><div><br></div><div>I have a 3D rectilinear grid which coordinates are defined by mesh_x, mesh_y and mesh_z (float arrays of dimensions PX, PY and PZ). I have a variable "temperature" defined as a 3D array representing the temperature at each point of the grid. Currently I have followed the slides 24 and 25 from the SC'10 tutorial, at some point vtkDataObjects have to be created, here is how I created the grid object :</div>
<div><br></div><div><div>// This function is called to retrieve the mesh</div><div>vtkObject* wrapMeshData()</div><div>{</div><div> vtkFloatArray* xCoords, yCoords, zCoords;</div><div> xCoords = vtkFloatArray::New();</div>
<div> xCoords->setArray(mesh_x,PTX,1);</div><div><div> yCoords = vtkFloatArray::New();</div><div> yCoords->setArray(mesh_y,PTY,1);</div></div><div><div> zCoords = vtkFloatArray::New();</div><div> zCoords->setArray(mesh_z,PTZ,1);</div>
</div><div> vtkRectilinearGrid *grid = vtkRectilinearGrid::New();</div><div> grid->setDimensions(PTX,PTY,PTZ);</div><div> grid->setXCoordinates(xCoords);</div><div> grid->setYCoordinates(yCoords);</div><div> grid->setZCoordinates(zCoords);</div>
<div> return (vtkObject*)grid;</div><div>}</div><div><br></div>Now I want to make a function that retrieves the temperature so that I can map each data value to each point of the mesh, something like :</div><div><br></div>
<div>vtkDataObject* wrapTemperature() {</div><div> // ???</div><div>}</div><div><br></div><div>How can I do that without copying the original array that I want to wrap?</div><div>Also what functions do I then call from the vtkCPDataDescription object? (on the tutorial they call SetGrid, I guess there is something else to call for the temperature field)</div>
<div><br></div><div>Thank you for your help,</div><div><br></div><div>Matthieu</div><div><br><div class="gmail_quote">2012/1/19 Berk Geveci <span dir="ltr"><<a href="mailto:berk.geveci@kitware.com">berk.geveci@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Please feel free to ask questions if anything is not clear or if you need some help. We will be working on better documentation in the coming few months.<div>
<br></div><div>Best,</div><div>-berk<div><div class="h5"><br><br><div class="gmail_quote">
On Wed, Jan 18, 2012 at 12:08 PM, Matthieu Dorier <span dir="ltr"><<a href="mailto:matthieu.dorier@gmail.com" target="_blank">matthieu.dorier@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thank you, this tutorial will help a lot.<span><font color="#888888"><div><br></div></font></span><div><span><font color="#888888">Matthieu</font></span><div><div><br><br><div class="gmail_quote">
2012/1/18 Andy Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The current main wiki page for coprocessing with ParaView is at <a href="http://paraview.org/Wiki/CoProcessing" target="_blank">http://paraview.org/Wiki/CoProcessing</a>. In there it has links to 2 examples, a C++ driven example and a python driven example. You were looking at the C++ example. There's also a powerpoint presentation and some more code examples at <a href="http://www.paraview.org/Wiki/SC10_Coprocessing_Tutorial" target="_blank">http://www.paraview.org/Wiki/SC10_Coprocessing_Tutorial</a>. We will but putting together a more extensive book but that probably won't be ready for a month or two.<br>
<br>My suggestion would be to first work on creating a vtkDataObject to represent your data. Look at the powerpoint presentation for information on doing that and then maybe the VTK doxygen (<a href="http://www.vtk.org/doc/nightly/html/classes.html" target="_blank">http://www.vtk.org/doc/nightly/html/classes.html</a>) for more specific API questions.<br>
<br>Andy<br><br><div class="gmail_quote"><div><div>On Wed, Jan 18, 2012 at 5:12 AM, Matthieu Dorier <span dir="ltr"><<a href="mailto:matthieu.dorier@gmail.com" target="_blank">matthieu.dorier@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>
Hello,<div><br></div><div>I have difficulties to understand how to instrument a simulation with ParaView in order to perform in-situ visualization.</div><div>Is there any documentation other than the simple example provided at <a href="http://paraview.org/Wiki/Coprocessing_example" target="_blank">http://paraview.org/Wiki/Coprocessing_example</a> ?</div>
<div>Thank you,<span><font color="#888888"><br clear="all"><div><br></div>-- <br>Matthieu Dorier<br>ENS Cachan, Brittany (Computer Science dpt.)<br>IRISA Rennes, Office C113<br><a href="http://perso.eleves.bretagne.ens-cachan.fr/%7Emdori307" target="_blank">http://perso.eleves.bretagne.ens-cachan.fr/~mdori307</a><br>
</font></span></div>
<br></div></div>_______________________________________________<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://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthieu Dorier<br>ENS Cachan, Brittany (Computer Science dpt.)<br>IRISA Rennes, Office C113<br><a href="http://perso.eleves.bretagne.ens-cachan.fr/~mdori307" target="_blank">http://perso.eleves.bretagne.ens-cachan.fr/~mdori307</a><br>
</div></div></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://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthieu Dorier<br>ENS Cachan, Brittany (Computer Science dpt.)<br>IRISA Rennes, Office C113<br><a href="http://perso.eleves.bretagne.ens-cachan.fr/~mdori307" target="_blank">http://perso.eleves.bretagne.ens-cachan.fr/~mdori307</a><br>
</div>