# Element-wise operations

**URL:** <https://pyfr.discourse.group/t/element-wise-operations/683>\
**Category:** Development\
**Created:** [29 August 2022 13:04 UTC](https://pyfr.discourse.group/t/element-wise-operations/683 "2022-08-29T13:04:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EitanA](https://avatars.discourse-cdn.com/v4/letter/e/bc79bd/32.png) [@EitanA](https://pyfr.discourse.group/u/EitanA)\
**Post date:** [29 August 2022 13:04 UTC](https://pyfr.discourse.group/t/element-wise-operations/683/1 "2022-08-29T13:04:19Z")

</div>

Hello all  
I am wondering how element wise operations can be achieved in pyfr (beyond matrix multiplication)?  
In particular, I am interested in extracting the element average/0th order polynomial, and the minimum/maximum value of a single variable in the solution points to be used in point-wise operations.

Many thanks  
Eitan

---

<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:** [29 August 2022 13:29 UTC](https://pyfr.discourse.group/t/element-wise-operations/683/2 "2022-08-29T13:29:16Z")

</div>

This can be done with a 1D kernel in PyFR. An example of such a kernel in the current release is the shock sensor.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![EitanA](https://avatars.discourse-cdn.com/v4/letter/e/bc79bd/32.png) [@EitanA](https://pyfr.discourse.group/u/EitanA)\
**Post date:** [29 August 2022 14:39 UTC](https://pyfr.discourse.group/t/element-wise-operations/683/3 "2022-08-29T14:39:44Z")

</div>

Thank you very much, Such an example is exactly what I have been searching for…
