[Paraview] Catalyst: dump everything in C++

Lokman Rahmani lokman.rahmani at irisa.fr
Wed Sep 21 10:29:28 EDT 2016


Hi Matthieu! 

I investigated the same question recently, here is what I found so far. 

In Catalyst/CoProcessing the python script is used to create a vtk pipeline 

--------- 
vtkNew<vtkCPPythonScriptPipeline> pipeline; 
pipeline->Initialize(scriptPath) 
--------- 

This pipeline will be passed to vtk processor that will do the CoPorcessing by executing the pipeline 

------ 
vtkCPProcessor* Processor = vtkCPProcessor::New(); 
Processor->Initialize(); 
Processor->AddPipeline(pipeline.GetPointer()); 
Processor->CcProcess(...) 
------ 

checking the souce code of VtkCPProcessor ( https://gitlab.kitware.com/paraview/paraview/blob/master/CoProcessing/Catalyst/vtkCPProcessor.h ) 

---- 

/// Add in a pipeline that is externally configured. Returns 1 if /// successful and 0 otherwise. virtual int AddPipeline ( vtkCPPipeline * pipeline ); 
------- 

a vtkCPProcessor object can add a pipeline of any class extending the vtkCPPipeline (which is a an abstract class) 

Beside of the official python implementation ( https://gitlab.kitware.com/paraview/paraview/blob/master/CoProcessing/PythonCatalyst/vtkCPPythonScriptPipeline.h ) I am not aware of any other implementation. 

Otherwise, you can to implement your own implementation (which looks very time consuming ...). 
http://www.vtk.org/Wiki/VTK/Tutorials/New_Pipeline 

Hope this helps. 

I'll be interested if some one is aware of any c++ implementation of the pipeline. 

Best, 
Lokman 

================================ 

----- Mail original -----

> De: "Matthieu Dorier" <mdorier at anl.gov>
> À: "ParaView Mailing List ‎[paraview at paraview.org]‎" <paraview at paraview.org>
> Envoyé: Mercredi 21 Septembre 2016 15:27:41
> Objet: [Paraview] Catalyst: dump everything in C++

> Hi,

> 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.

> 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?

> Thanks,

> Matthieu

> _______________________________________________
> 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

> Search the list archives at: http://markmail.org/search/?q=ParaView

> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160921/db720393/attachment.html>


More information about the ParaView mailing list