<div dir="ltr"><div><div><div><div>Hi Matthieu,<br><br></div>That makes complete sense. I've thought about putting in a C++ Catalyst pipeline in the main source code that could be used to just write out the data at some prescribed file name and frequency but haven't forced myself to do it. It gets slightly more complicated when dealing with multiple inputs. In the Examples/Catalyst/SampleScripts subdirectory of the source code there are two Python scripts that can be used to write out the full grid, gridwriter.py and allinputsgridwriter.py. <br><br></div>If you create a C++ script to do that and want to have it added into ParaView, I can help with that. Otherwise, I'll get to it eventually...<br><br></div>Cheers,<br></div>Andy<br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 21, 2016 at 10:29 AM, Lokman Rahmani <span dir="ltr"><<a href="mailto:lokman.rahmani@irisa.fr" target="_blank">lokman.rahmani@irisa.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div>Hi Matthieu!<br></div><div><br></div><div>I investigated the same question recently, here is what I found so far.<br></div><div><br></div><div>In Catalyst/CoProcessing the python script is used to create a vtk pipeline</div><div><br></div><div>---------<br></div><div>vtkNew<<wbr>vtkCPPythonScriptPipeline> pipeline;                     <wbr>              <br>pipeline->Initialize(<wbr>scriptPath)</div><div>--------- <br></div><div><br></div><div>This pipeline will be passed to vtk processor that will do the CoPorcessing by executing the pipeline<br></div><div><br></div><div>------<br></div><div>vtkCPProcessor* Processor = vtkCPProcessor::New();        <wbr>                              <wbr>    <br>Processor->Initialize();   </div><div>Processor->AddPipeline(<wbr>pipeline.GetPointer());</div><div>Processor->CcProcess(...)<br></div><div>------<br></div><div><br></div><div>checking the souce code of VtkCPProcessor (<a href="https://gitlab.kitware.com/paraview/paraview/blob/master/CoProcessing/Catalyst/vtkCPProcessor.h" target="_blank">https://gitlab.kitware.com/<wbr>paraview/paraview/blob/master/<wbr>CoProcessing/Catalyst/<wbr>vtkCPProcessor.h</a>)<br></div><div><br></div><div>----<br></div><div><div><br></div><div><pre style="overflow-y:hidden;overflow-x:auto;font-family:Menlo,'Liberation Mono',Consolas,'DejaVu Sans Mono','Ubuntu Mono','Courier New','andale mono','lucida console',monospace;font-size:13px!important;display:block;padding:10px;margin:0px;line-height:1.5!important;word-break:break-all;word-wrap:normal;color:#333333;border-left-width:1px;border-style:none none none solid;border-color:#f0f0f0;border-radius:0px;white-space:pre-wrap;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;background-color:#ffffff"><code style="font-family:Menlo,'Liberation Mono',Consolas,'DejaVu Sans Mono','Ubuntu Mono','Courier New','andale mono','lucida console',monospace;font-size:inherit;padding:0px;color:inherit;border-radius:0px;white-space:pre-wrap;word-wrap:normal;background-color:transparent"><span style="display:inline-block">  <span style="color:#999988;font-style:italic">/// Add in a pipeline that is externally configured. Returns 1 if</span></span>
<span style="display:inline-block">  <span style="color:#999988;font-style:italic">/// successful and 0 otherwise.</span></span>
<span style="display:inline-block">  <span style="font-weight:bold">virtual</span> <span style="color:#445588;font-weight:bold">int</span> <span style="color:#333333">AddPipeline</span><span>(</span><span style="color:#333333">vtkCPPipeline</span><span style="font-weight:bold">*</span> <span style="color:#333333">pipeline</span><span>);</span></span></code></pre></div></div><div>-------<br></div><div><br></div><div>a vtkCPProcessor object can add a pipeline of any class extending the vtkCPPipeline (which is a an abstract class)<br></div><div><br></div><div>Beside of the official python implementation (<a>https://gitlab.kitware.com/<wbr>paraview/paraview/blob/master/<wbr>CoProcessing/PythonCatalyst/<wbr>vtkCPPythonScriptPipeline.h</a>) I am not aware of any other implementation.</div><div><br></div><div>Otherwise, you can to implement your own implementation (which looks very time consuming ...). <br></div><div> <a href="http://www.vtk.org/Wiki/VTK/Tutorials/New_Pipeline" target="_blank">http://www.vtk.org/Wiki/VTK/<wbr>Tutorials/New_Pipeline</a><br></div><div><br></div><div>Hope this helps.<br></div><div><br></div><div>I'll be interested if some one is aware of any c++ implementation of the pipeline.<br></div><div><br></div><div>Best,<br></div><div>Lokman<br></div><div><br></div><div><span name="x"></span><div><span style="color:#808080" color="#808080">==============================<wbr>==<br><i><br></i></span></div><span name="x"></span><br></div><hr><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>De: </b>"Matthieu Dorier" <<a href="mailto:mdorier@anl.gov" target="_blank">mdorier@anl.gov</a>><br><b>À: </b>"ParaView Mailing List ‎[<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>]‎" <<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>><br><b>Envoyé: </b>Mercredi 21 Septembre 2016 15:27:41<br><b>Objet: </b>[Paraview] Catalyst: dump everything in C++<div><div class="h5"><br><div><br></div><div style="direction:ltr;font-family:Tahoma;color:#333399;font-size:10pt">Hi,<br> <br> In general the way we create python scripts for a Catalyst-enabled simulation is by first running the simulation with a Python script that writes the data into files, then do offline analysis on those files and export a python script representing the analysis tasks to be done in situ.<br> <br> I was wondering if, instead of using a Python script for writing all the data into file, an equivalent C++ code was available, and how such a code would be integrated into a Catalyst-enabled simulation? Or maybe just with VTK once the adaptors are written for the simulation's data?<br> <br> Thanks,<br> <br> Matthieu<br></div><br></div></div><span class="">______________________________<wbr>_________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><div><br></div>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br><div><br></div>Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br><div><br></div>Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br><div><br></div>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br></span></blockquote><div><br></div></div></div><br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>