<html><body><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<vtkCPPythonScriptPipeline> pipeline;                                   <br>pipeline->Initialize(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();                                          <br>Processor->Initialize();   </div><div>Processor->AddPipeline(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" data-mce-href="https://gitlab.kitware.com/paraview/paraview/blob/master/CoProcessing/Catalyst/vtkCPProcessor.h">https://gitlab.kitware.com/paraview/paraview/blob/master/CoProcessing/Catalyst/vtkCPProcessor.h</a>)<br></div><div><br></div><div>----<br></div><div><div><br></div><div><pre class="code highlight" style="box-sizing: border-box; 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; text-shadow: none; white-space: pre; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;" data-mce-style="box-sizing: border-box; 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; text-shadow: none; white-space: pre; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;"><code style="box-sizing: border-box; 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; word-wrap: normal; background-color: transparent;" data-mce-style="box-sizing: border-box; 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; word-wrap: normal; background-color: transparent;"><span id="LC64" class="line" style="box-sizing: border-box; display: inline-block;" data-mce-style="box-sizing: border-box; display: inline-block;">  <span class="c1" style="box-sizing: border-box; color: #999988; font-style: italic;" data-mce-style="box-sizing: border-box; color: #999988; font-style: italic;">/// Add in a pipeline that is externally configured. Returns 1 if</span></span>
<span id="LC65" class="line" style="box-sizing: border-box; display: inline-block;" data-mce-style="box-sizing: border-box; display: inline-block;">  <span class="c1" style="box-sizing: border-box; color: #999988; font-style: italic;" data-mce-style="box-sizing: border-box; color: #999988; font-style: italic;">/// successful and 0 otherwise.</span></span>
<span id="LC66" class="line" style="box-sizing: border-box; display: inline-block;" data-mce-style="box-sizing: border-box; display: inline-block;">  <span class="k" style="box-sizing: border-box; font-weight: bold;" data-mce-style="box-sizing: border-box; font-weight: bold;">virtual</span> <span class="kt" style="box-sizing: border-box; color: #445588; font-weight: bold;" data-mce-style="box-sizing: border-box; color: #445588; font-weight: bold;">int</span> <span class="n" style="box-sizing: border-box; color: #333333;" data-mce-style="box-sizing: border-box; color: #333333;">AddPipeline</span><span class="p" style="box-sizing: border-box;" data-mce-style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box; color: #333333;" data-mce-style="box-sizing: border-box; color: #333333;">vtkCPPipeline</span><span class="o" style="box-sizing: border-box; font-weight: bold;" data-mce-style="box-sizing: border-box; font-weight: bold;">*</span> <span class="n" style="box-sizing: border-box; color: #333333;" data-mce-style="box-sizing: border-box; color: #333333;">pipeline</span><span class="p" style="box-sizing: border-box;" data-mce-style="box-sizing: border-box;">);</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/paraview/paraview/blob/master/CoProcessing/PythonCatalyst/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> http://www.vtk.org/Wiki/VTK/Tutorials/New_Pipeline<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;" data-mce-style="color: #808080;" color="#808080">================================<br><i><br></i></span></div><span name="x"></span><br></div><hr id="zwchr"><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;" data-mce-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" <mdorier@anl.gov><br><b>À: </b>"ParaView Mailing List ‎[paraview@paraview.org]‎" <paraview@paraview.org><br><b>Envoyé: </b>Mercredi 21 Septembre 2016 15:27:41<br><b>Objet: </b>[Paraview] Catalyst: dump everything in C++<br><div><br></div><style id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style><div style="direction: ltr;font-family: Tahoma;color: #333399;font-size: 10pt;" data-mce-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>_______________________________________________<br>Powered by www.kitware.com<br><div><br></div>Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br><div><br></div>Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView<br><div><br></div>Search the list archives at: http://markmail.org/search/?q=ParaView<br><div><br></div>Follow this link to subscribe/unsubscribe:<br>http://public.kitware.com/mailman/listinfo/paraview<br></blockquote><div><br></div></div></body></html>