<div dir="ltr"><div><div><div><div><div><div><div>Hi Matthias,<br><br></div>First mail to answer to the point 1.<br></div>When choosing a file to open, ParaView browses the available readers than can process the extension of the provided file.<br></div>So during a first pass, those readers (here there is a single one I guess) are instantiated temporarily and the function <span style="font-family:monospace,monospace">CanReadFile()</span> is called with the filepath.<br></div>Then, from all those readers ParaView checks the one that answered positively (or the one choosen by the user if more than one reader<br></div>can process the file) and create a new temporary instance of it to call <span style="font-family:monospace,monospace">CanReadFile()</span> again.<br></div>Then a new instance is created again to perform the loading (RequestInfo and eventually RequestData).<br><br></div><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><i>"But additionally the RequestData routine of the first file (instanceA) is called again. Why?"</i></blockquote>I seen two possibilities here:<br> - There might be a problem in your reader, if RequestData is called again it might be because Modified() has been called on it or its input changed. Check that there is no strange stuff like that in your reader.<br> - I have seen such a behaviour recently with unstructured data: the pipeline first executes the filter 'normally' (without ghost cells request) but then, for rendering matters, the geometry filter internally connected to the reader/filter requires one level of ghost cells. This updates the pipeline request and eventually call RequestData again.<br><div>So check the pipeline requests (information keys) in RequestData to understand what is happening here.<br><br></div><div>Best,<br></div><div>Joachim<br></div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b>Joachim Pouderoux</b><font size="2">, <font size="1">PhD</font></font><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font size="1"><i>Technical Expert - Scientific Computing Team</i></font><br><b><font size="1"><a href="http://www.kitware.fr" target="_blank">Kitware SAS</a></font></b><br></blockquote>
</div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">2016-12-21 2:56 GMT-04:00 Matthias Sonntag <span dir="ltr"><<a href="mailto:sonntag@iag.uni-stuttgart.de" target="_blank">sonntag@iag.uni-stuttgart.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
we are developing a Paraview-Plugin to read state files written by our CFD flow solver (<a href="https://www.flexi-project.org/" rel="noreferrer" target="_blank">https://www.flexi-project.org<wbr>/</a>). We managed to get it somehow running, but the internal logic of ParaView how the plugin is accessed, created and deleted is not totally clear to us.<br>
We observed the following (a commented logfile is listed below):<br>
<br>
1. When opening a file with our plugin, ParaView first creates two instances of the plugin and directly destroys them, without calling the RequestInformation or RequestData routines. Why?<br>
2. The third instance (lets call it instanceA) of the plugin finally executes the RequestInformation routine (but 2 times!) and the file becomes visible in the pipeline browser.<br>
3. When pressing 'Apply' the RequestInformation is executed again. Why? And then RequestData routine is called once and everything works as expected and the data is visualized.<br>
4. Loading a second file leads to the following behaviour:<br>
Steps 1. and 2. are the same for the second file. But additionally the RequestData routine of the first file (instanceA) is called again. Why?<br>
5. Pressing 'Apply' for the second file shows the same behavior as in step 3. for the first file.<br>
<br>
Basically it works, but we get an additional RequestData call of the already visualized first file, when loading a second file. In our case this is quite expensive and we would like to avoid it.<br>
<br>
LogFile for the above example:<br>
* Loading first file<br>
visu3DReader 0x431c2e0<br>
~visu3DReader 0x431c2e0<br>
visu3DReader 0x431c2e0<br>
~visu3DReader 0x431c2e0<br>
visu3DReader 0x431c2e0<br>
RequestInformation 0x431c2e0<br>
RequestInformation 0x431c2e0<br>
* Pressing Apply<br>
RequestInformation 0x431c2e0<br>
RequestData0x431c2e0<br>
* Loading second file<br>
visu3DReader 0x736f950<br>
~visu3DReader 0x736f950<br>
visu3DReader 0x74662f0<br>
~visu3DReader 0x74662f0<br>
visu3DReader 0x74662f0<br>
RequestInformation 0x74662f0<br>
RequestInformation 0x74662f0<br>
RequestData 0x431c2e0 <<<<<< Why called again for first file?<br>
* Pressing Apply<br>
RequestInformation 0x74662f0<br>
RequestData 0x74662f0<br>
<br>
Can anyone explain/reproduce this behavior? Is there any source of information how the internal logic of requesting information / data works? Does anyone know the respective parts in the paraview source code?<br>
<br>
Regards,<br>
Matthias Sonntag<br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>Paraview-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/paraview-develope<wbr>rs</a><br>
</blockquote></div><br></div>