[Paraview] Interfacing with FE simulation using Catalyst

Alexandre Ancel alexandre.ancel at cemosis.fr
Thu Nov 27 05:40:12 EST 2014


Hello,

Regarding to the vtkout_type, it is defined in the corresponding header:
https://github.com/feelpp/feelpp/blob/develop/feel/feelfilters/exporterVTK.hpp
I guess it is not really an issue as it is a typedef to
vtkUnstructuredGrid. Initially I intended to use vtkPolyData for 1D and 2D
meshes; and vtkUnstructuredGrid for 3D meshes, but I guess that I will
totally switch to vtkUnstucturedGrid as it would be able to handle all the
cases.

Thanks for the advice regarding to ForceOutput, I'll change it.

Now back to my issue, I managed to make it work. In the end, it was only me
misusing Catalyst.
Just how I make it work now: (for people that might have a similar issue to
mine)
- Launch Paraview and allow connections for Catalyst
- Pause the simulation (It will thus pause at the first timestep)
- Launch the simulation and visualize the data in Paraview

Thanks again for your time and help,

Best regards,
Alexandre Ancel


On Wed, Nov 26, 2014 at 6:06 PM, Andy Bauer <andy.bauer at kitware.com> wrote:

> Hi,
>
> My guess is that the templating isn't working the way you think it is. I
> couldn't see where vtkout_type was being set but in general you probably
> don't want to template on the VTK data sets since the API where the work is
> done is different for each of them. Also, input->GetClassName() should be
> returning the name of the actual class you want to use, e.g. vtkPolyData,
> vtkUnstructuredGrid, etc.
>
> Another thing I noticed is that you probably want to get rid of the
> SetForceOutput(true) in:
> if(inSituProcessor->RequestDataDescription(dataDescription.GetPointer())
> != 0)  {  dataDescription->GetInputDescriptionByName("input")->SetGrid
> (out);  dataDescription->SetForceOutput(true);  std::cout << "CoProcess "
> << inSituProcessor->CoProcess(dataDescription.GetPointer())<< std::endl;
> }
> This will ensure that all output from Catalyst is generated when possibly
> only a single output was requested in the pipelines.
>
> Regards,
> Andy
>
> On Wed, Nov 26, 2014 at 11:33 AM, Alexandre Ancel <
> alexandre.ancel at cemosis.fr> wrote:
>
>> Hello,
>>
>> An update on this issue that I'm still having:
>> I tried to pinpoint the source of the problem. I went through Paraview
>> and VTK code, and found that there is a check that fails to pass
>> apparently, resulting in the errors previously mentionned. This check fails
>> on the Paraview side.
>> In VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx (from which
>> vtkPVPostFilterExecutive inherits), the InputTypeIsValid (l.763) function
>> seems to check for data type, and fails to find a matching type when I try
>> to visualize the data extracted from the PVTrivialProducer.
>> The recorded type (with input->GetClassName()) is vtkDataObject and the
>> IsA function is unable to match it with any of the type in the list
>> iterated over.
>>
>> Did I went to far in the code ? Could the information about the
>> Unstructured grid nature be lost when I extract the data in Paraview ?
>>
>> By the way, this list is probably not the right place to talk about it,
>> since it is related to VTK, but isn't the error printed when no match is
>> found a bit confusing for the user ?
>> I mean if the function does not find a valid type, it will by default
>> choose the first type of the list, resulting in the kind of errors I had
>> (vtkPolyData in my case):
>> 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.
>>
>> Whereas the type checked was not matched with any type, thus not a
>> vtkPolyData.
>>
>> By the way, if you want to have a look at the C++ code used in our
>> library, it is available in:
>>
>> https://github.com/feelpp/feelpp/blob/develop/feel/feelfilters/exporterVTK_impl.hpp
>> With:
>> - the initialization part starting at line 115
>> - the coprocessing part starting at line 406
>>
>> Thanks again for the help,
>> Best regards,
>> Alexandre Ancel
>>
>>
>> On Mon, Nov 24, 2014 at 4:56 PM, Alexandre Ancel <
>> alexandre.ancel at cemosis.fr> wrote:
>>
>>> Hello,
>>>
>>> I tested writing data from the python script, and the data is apparently
>>> written correctly
>>>  when opening the files with Paraview. The issue is only present I try
>>> to extract the data in Paraview.
>>> I'll continue to investigate both in my code and Paraview. If you have
>>> other pieces of advice as to where I could be looking, I would be
>>> interested.
>>>
>>> I will also test if I can reproduce the issue with one of the example.
>>>
>>> Regards,
>>> Alexandre Ancel
>>>
>>> On Fri, Nov 21, 2014 at 10:57 PM, Andy Bauer <andy.bauer at kitware.com>
>>> wrote:
>>>
>>>> Hi Alexandre,
>>>>
>>>> If you could reproduce the errors that you're getting in one of the
>>>> examples, we could try to track that down. I tried using your script and
>>>> didn't have any issues with the CxxFullExample in the Catalyst example code
>>>> and PV 4.2.
>>>>
>>>>
>>>> Regards,
>>>> Andy
>>>>
>>>> On Fri, Nov 21, 2014 at 12:14 PM, Dan Lipsa <dan.lipsa at kitware.com>
>>>> wrote:
>>>>
>>>>>
>>>>>> 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!!
>>>>>> ---
>>>>>>
>>>>>
>>>>> I have not run an example for an unstructured grid. It should work
>>>>> similarly though.
>>>>> I recently wrote a Catalyst adapter for an unstructured grid. I will
>>>>> run Catalyst Live with that to see how that works.
>>>>>
>>>>> You could try however to save images or entire data from the pipeline
>>>>> script as it is done in the Catalyst examples.
>>>>>
>>>>>
>>>>>
>>>>>> 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 ?
>>>>>>
>>>>>
>>>>> The communication between catalyst and the simulation happens only at
>>>>> time steps. Because of that, Catalyst could only stop the simulation at
>>>>> time step 2.
>>>>>
>>>>>
>>>>> - Looking at the last lines of the blog post concerning pvserver. Is
>>>>>> pvserver catalyst enabled by default ?
>>>>>>
>>>>> Yes.
>>>>>
>>>>>
>>>>>> Does it mean that I can build the following pipeline ?
>>>>>> Paraview (local computer) <-> pvserver (cluster frontal node) <->
>>>>>> catalyst enabled simulation (cluster nodes)
>>>>>>
>>>>>
>>>>>  You need to enable MPI to be able to run this. pvserver is the
>>>>> paraview server that does all the rendering, only images are sent to
>>>>> ParaView (GUI).
>>>>>
>>>>> Dan
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>
>>
>>
>>
>> --
>> 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
>>
>
>


-- 
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/20141127/2163ac9a/attachment-0001.html>


More information about the ParaView mailing list