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

Reply via email to