# Pyfr partition tavg plugin

**URL:** <https://pyfr.discourse.group/t/pyfr-partition-tavg-plugin/308>\
**Category:** General\
**Created:** [11 November 2020 12:02 UTC](https://pyfr.discourse.group/t/pyfr-partition-tavg-plugin/308 "2020-11-11T12:02:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anthony\_Larroque](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@Anthony\_Larroque](https://pyfr.discourse.group/u/Anthony_Larroque)\
**Post date:** [11 November 2020 12:02 UTC](https://pyfr.discourse.group/t/pyfr-partition-tavg-plugin/308/1 "2020-11-11T12:02:05Z")

</div>

Dear PyFR developers,

I would like to partition solutions of the tavg plugin in order to make easier the post-treatment on it.

However when running pyfr partition on the solution of this plugin, I have the following message error:

Traceback (most recent call last):  
File “/home/anthony/anaconda3/bin/pyfr”, line 11, in   
load\_entry\_point(‘pyfr==1.10.0’, ‘console\_scripts’, ‘pyfr’)()  
File “/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr-1.10.0-py3.6.egg/pyfr/ **main**.py”, line 112, in main  
File “/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr-1.10.0-py3.6.egg/pyfr/ **main**.py”, line 173, in process\_partition  
File “/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr-1.10.0-py3.6.egg/pyfr/ **main**.py”, line 166, in   
File “/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr-1.10.0-py3.6.egg/pyfr/partitioners/base.py”, line 307, in partition\_soln  
File “/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr-1.10.0-py3.6.egg/pyfr/partitioners/base.py”, line 110, in \_combine\_soln\_parts  
File “/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr-1.10.0-py3.6.egg/pyfr/util.py”, line 35, in **call**  
File “/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr-1.10.0-py3.6.egg/pyfr/readers/native.py”, line 46, in array\_info  
ValueError: max() arg is an empty sequence

I specify that this operation works with the writer plugin.

So is it because the keys of the tavg and the writer plugin solutions have different names ? Are there basic changes in the code that could enable to partition solutions the tavg plugin ?

Also, I would like to know another thing: imagine that two solutions are issued from initially the same gmsh mesh but that we partitioned the mesh differently. When we run the pyfr partition 1 mesh.pyfrm solution.pyfrs for both solutions do the elements indexes match or are they different ?

Indeed, I would like to perform some post-treatment on all the .pyfrs files of the simulation but do not know how to do it when I do a pyfr restart with a mesh partitioned distinctly due to the computational resources that are available at the moment.

Regards,  
Anthony Larroque

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [11 November 2020 13:03 UTC](https://pyfr.discourse.group/t/pyfr-partition-tavg-plugin/308/2 "2020-11-11T13:03:45Z")

</div>

Hi Anthony,

It is not (currently) possible to repartition time average files. It would not be too difficult to update the code to support this.

In general if you independently partition a pair of solutions and then collapse them both down to a single partition, the element numbering’s will be different. In order to track element numbers you can use the -r flag to partition which will output the renumbering file.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![Anthony\_Larroque](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@Anthony\_Larroque](https://pyfr.discourse.group/u/Anthony_Larroque)\
**Post date:** [12 November 2020 09:23 UTC](https://pyfr.discourse.group/t/pyfr-partition-tavg-plugin/308/3 "2020-11-12T09:23:09Z")

</div>

Hi Freddie,

Thank you for your answers !

Regards,  
Anthony Larroque
