[Paraview] Interfacing with FE simulation using Catalyst

Alexandre Ancel alexandre.ancel at cemosis.fr
Fri Nov 21 11:09:40 EST 2014


Hello Dan,

Thanks for the link to the blog post (I totally missed this one).

I tested the example provided in the blog post, it worked and it made me
understand from where my issue came from. In fact, the simulation was
running and connected to Paraview via catalyst, but I only had one time
step, so as soon as it went throught the Catalyst code, the app continued
its execution and ended before I could visualize data in Paraview.
I then put a user data input before the end of the execution, and now I am
able to see my data in the PVTrivialProducer1 in Paraview.


But an other issue arose then:

When I click on the icon located near the producer to visualize the data, I
get an Extract component added to the pipeline. Trying to visualize this,
then throws me the following errors:

---
ERROR: In
/home/ancel/Downloads/ParaView-v4.2.0-source/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,
line 810
vtkPVPostFilterExecutive (0x3efc890): Input for connection index 0 on input
port index 0 for algorithm vtkPVPostFilter(0x3efbe70) is of type
vtkDataObject, but a vtkPolyData is required.


ERROR: In
/home/ancel/Downloads/ParaView-v4.2.0-source/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx,
line 810
vtkPVPostFilterExecutive (0x3efc890): Input for connection index 0 on input
port index 0 for algorithm vtkPVPostFilter(0x3efbe70) is of type
vtkDataObject, but a vtkPolyData is required.


ERROR: In
/home/ancel/Downloads/ParaView-v4.2.0-source/ParaViewCore/ServerManager/Rendering/vtkSMParaViewPipelineControllerWithRendering.cxx,
line 504
vtkSMParaViewPipelineControllerWithRendering (0x38bbc00): Data cannot be
shown in the defaulted render view!!
---

Note that when I look in the Information of the TrivialProducer, data is
recognized as Unstructured grid with the correct point, cell and field data
information.
Do I need to provide specific info in the python script ? Like a conversion
to vtkUnstructuredGrid ?


A few more questions come in my mind now:
- If I understand correctly and if the user wants to pause the simulation,
for example when he has only 1 timestep, he would have to do the following
steps:
* Connect with catalyst in Paraview
* Set a breakpoint for time step 0
* launch the simulation
Is that alright ?
Would it be possible to do this with the play/next frame paraview buttons ?

- Looking at the last lines of the blog post concerning pvserver. Is
pvserver catalyst enabled by default ?
Does it mean that I can build the following pipeline ?
Paraview (local computer) <-> pvserver (cluster frontal node) <-> catalyst
enabled simulation (cluster nodes)


Thanks again for your help (it helped me a lot in understanding the whole
process)

Best regards,
Alexandre Ancel


On Fri, Nov 21, 2014 at 3:16 PM, Dan Lipsa <dan.lipsa at kitware.com> wrote:

> Hi Alexandre,
> The following blog post describes how to pause the simulation and how to
> manipulate data in Catalyst Live.
>
> http://www.kitware.com/blog/home/post/722
>
> Could you try the scripts attached in the blog post? Do those work?
> Thanks,
> Dan
>
>
> On Fri, Nov 21, 2014 at 8:30 AM, Alexandre Ancel <
> alexandre.ancel at cemosis.fr> wrote:
>
>> Hello,
>>
>> I am trying to use catalyst in our Finite Element framework, but I can't
>> get it to work right now. For background information, I would like to
>> inferface a parallel simulation, running with MPI, with paraview to display
>> the results, thus do live visualization.
>>
>> I compiled Paraview from the 4.2 sources (from the website) to ensure
>> that our library compiles with the same library as the ParaView I'm
>> launching.
>>
>> The problem I have is similar to the one reported in:
>> http://public.kitware.com/pipermail/paraview/2013-June/028497.html
>>
>>
>> In our application, we have an exporter interface that allows to write
>> VTK data (vtkUnstructuredGrid) with field data (scalar, vectorial). I built
>> the catalyst interoperation on top of it, by using the Cxx example provided
>> in:
>>
>> https://github.com/Kitware/ParaViewCatalystExampleCode/tree/master/CxxFullExample
>> <https://github.com/Kitware/ParaViewCatalystExampleCode>
>> I'm am using a modified version of the feslicescript.py
>> <https://github.com/Kitware/ParaViewCatalystExampleCode/blob/master/CxxFullExample/SampleScripts/feslicescript.py>
>> that should enable live visualization IMHO (enclosed with this email).
>>
>> The excerpt of C++ code running the coprocessing is the following one:
>> ----
>> vtkSmartPointer<vtkCPDataDescription> dataDescription =
>> vtkSmartPointer<vtkCPDataDescription>::New();
>> dataDescription->AddInput("input");
>>
>> if(inSituProcessor->RequestDataDescription(dataDescription.GetPointer())
>> != 0)
>> {
>>   dataDescription->GetInputDescriptionByName("input")->SetGrid(out);
>>   dataDescription->SetForceOutput(true);
>>   std::cout << "CoProcess " <<
>> inSituProcessor->CoProcess(dataDescription.GetPointer())<< std::endl;
>> }
>> ----
>> where out is the unstructured grid data.
>>
>> I then launch Paraview and allow connection for catalyst via the menu.
>> Eventually I launch our simulation that interfaces with Catalyst.
>>
>> I then get the following error in Paraview:
>> ERROR: In
>> /home/ancel/Downloads/ParaView-v4.2.0-source/VTK/Parallel/Core/vtkSocketCommunicator.cxx,
>> line 812
>> vtkSocketCommunicator (0x2b1f940): Could not receive tag. 1
>>
>> And the coprocessing stops in Paraview, altough I can see the catalyst
>> server in the Pipeline browser and a PVTrivialProducer1 appearing in the
>> background, but no data appear in the visualization window of Paraview.
>>
>> I tried instrumenting the code in Paraview to locate where the problem
>> would be, but it appears that the problem happens outside of the
>> vtkLiveInsituLink class, which (correct me If I'm wrong) should handle the
>> link between the application and Paraview.
>>
>> The different questions that I have would be summed up as:
>> - Can you give me some pointer as to where the problem might be located ?
>> Coding mistake on my side ? Did I miss something in the issue I referred to
>> before ?
>> - Is it possible to pause the simulation while the user manipulates data
>> in Paraview ? How ?
>>
>> Sorry for the long mail, but I tried to be as precise as I could be,
>> Thanks in advance for the help and your time,
>>
>> Best regards,
>> Alexandre Ancel
>>
>> --
>> Alexandre Ancel
>> Docteur, Ingénieur de recherche / Phd, Research Engineer
>> Cemosis <http://www.cemosis.fr> - alexandre.ancel at cemosis.fr
>> Tel: +33 (0)3 68 8*5 02 06*
>> IRMA - 7, rue René Descartes
>> 67 000 Strasbourg, France
>>
>> _______________________________________________
>> 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
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview
>>
>>
>


-- 
Alexandre Ancel
Docteur, Ingénieur de recherche / Phd, Research Engineer
Cemosis <http://www.cemosis.fr> - alexandre.ancel at cemosis.fr
Tel: +33 (0)3 68 8*5 02 06*
IRMA - 7, rue René Descartes
67 000 Strasbourg, France
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20141121/282e4f5f/attachment-0001.html>


More information about the ParaView mailing list