[Paraview] Paraview Live Visualisation C++ Pipeline
Andy Bauer
andy.bauer at kitware.com
Thu Jan 26 10:22:03 EST 2017
Hi,
Currently the Live functionality only works when ParaView is built with
Python bindings. My suggestion would be to build ParaView yourself. That
should be much easier than trying to put in a C++ pipeline that can deal
with the Live functionality properly.
As for building ParaView, you may want to look into using the ParaView
Superbuild (https://gitlab.kitware.com/paraview/paraview-superbuild/) which
will also build all needed dependencies. The dependencies are probably all
there though since you've said that ParaView is already installed there.
I'm not sure the set up you're looking for but if you want to run with the
simulation+Catalyst linking to a parallel pvserver on the cluster which
then connects to a client, you may want to use ParaView master. The reason
for this is that there was a bug that had all of the simulation+Catalyst
nodes only being able to communicate with a single pvserver node (multiple
pvserver processes though). If you only want to connect the
simulation+Catalyst to the GUI client or pvserver processes on a single
node then 5.2 should work fine for you.
Best,
Andy
On Thu, Jan 26, 2017 at 9:53 AM, Kohlhase, Simon <simon.kohlhase at tum.de>
wrote:
> Hi,
>
>
>
> for a University Project we’re trying to run Paraview Live Simulation on
> the local cluster-network. Unfortunately the network only has a Paraview
> version without python-binding installed, therefore we would like to run
> the LiveSimulation with a C++-coded Pipeline Skript.
>
>
>
> As far as we understood, to make it work we have to rewrite the following
> lines from the PythonPipeline Script to C++, which turns out to be quite
> challenging:
>
>
>
> coprocessor.UpdateProducers(datadescription)
>
> # Write output data, if appropriate.
>
> coprocessor.WriteData(datadescription);
>
> # Live Visualization, if enabled.
>
> coprocessor.DoLiveVisualization(datadescription, "localhost", 22222)
>
>
>
> We tried the following:
>
>
>
> //INITIALIZE
>
> vtkNew<vtkLiveInsituLink> link;
>
> vtkSMProxyManager* proxyManager;
>
> vtkSMSessionProxyManager* sessionProxyManager;
>
> link -> SetInsituPort(22222);
>
> link -> SetHostname("localhost");
>
> proxyManager = vtkSMProxyManager::GetProxyManager();
>
> sessionProxyManager = proxyManager->GetActiveSessionProxyManager();
>
> link -> Initialize(sessionProxyManager);
>
>
>
> // Initialize returns 1, therefore connection established properly
>
>
>
> //Then we tried to coprocess with the following code:
>
> vtkNew<vtkXMLPImageDataWriter> writer;
>
> writer->SetInputConnection(producer->GetOutputPort());
>
> vtkSMProxy* proxy = sessionProxyManager->NewProxy(
> "insitu_writer_parameters","XMLPImageDataWriter");
>
> vtkSMInputProperty* property = (vtkSMInputProperty*) proxy ->
> GetProperty("Input");
>
>
>
> //set input of proxy to our writer or datadescription – DOESN’T WORK
>
> while(true){
>
> link->InsituUpdate(dataDescription->GetTime(),
> dataDescription->GetTimeStep());
>
> //update pipeline
>
> link->InsituPostProcess(dataDescription->GetTime(),
> dataDescription->GetTimeStep());
>
> if(link->GetSimulationPaused()){
>
> if(link->WaitForLiveChange()){
>
> break;
>
> }
>
> } else{
>
> break;
>
> }
>
> }
>
>
>
> So how are we supposed to get the data from our simulation into the Proxy?
>
> We have been trying and searching the documentation for the right
> functions, but we can’t figure out how to do it.
>
>
>
> We would really appreciate some help ;-)
>
>
>
> Best regards,
>
> Simon Kohlhase
>
> _______________________________________________
> 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/20170126/2248dea7/attachment-0001.html>
More information about the ParaView
mailing list