# Entropy filter - point set combination

**URL:** <https://pyfr.discourse.group/t/entropy-filter-point-set-combination/1107>\
**Category:** Cases\
**Tags:** config, compressible\
**Created:** [10 June 2024 11:47 UTC](https://pyfr.discourse.group/t/entropy-filter-point-set-combination/1107 "2024-06-10T11:47:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frankx9](https://avatars.discourse-cdn.com/v4/letter/f/3e96dc/32.png) [@Frankx9](https://pyfr.discourse.group/u/Frankx9)\
**Post date:** [10 June 2024 11:47 UTC](https://pyfr.discourse.group/t/entropy-filter-point-set-combination/1107/1 "2024-06-10T11:47:11Z")

</div>

Hello,

I was trying to use the entropy filtering but I don’t understand why this point set combination is not valid

```auto

[solver-interfaces-quad]
flux-pts = gauss-legendre-lobatto

[solver-interfaces-tri]
flux-pts = alpha-opt

[solver-elements-pri]
flux-pts = alpha-opt
soln-pts = alpha-opt~gauss-legendre-lobatto

```

and it causes the error:

```auto
ValueError: Entropy filter requires flux points to be a subset of solution points or a convex combination thereof.

```

Any insight on that?

Best

---

<div class="post-metadata">

**Author:** ![p.vincent](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/p.vincent/32/225_2.png) [@p.vincent](https://pyfr.discourse.group/u/p.vincent)\
**Post date:** [10 June 2024 12:46 UTC](https://pyfr.discourse.group/t/entropy-filter-point-set-combination/1107/2 "2024-06-10T12:46:23Z")

</div>

Hi,

I think this should work. It is possible that there are still some tolerance issues with how the points are tabulated for the tri and quad vs the prism. What order does it fail at? And is the mesh a pure prism mesh?

Also, FYI, I don’t think specifying flux points for the elements is required.

Peter

---

<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:** [10 June 2024 12:47 UTC](https://pyfr.discourse.group/t/entropy-filter-point-set-combination/1107/3 "2024-06-10T12:47:07Z")

</div>

Can you confirm what version of PyFR you are using?

---

<div class="post-metadata">

**Author:** ![Frankx9](https://avatars.discourse-cdn.com/v4/letter/f/3e96dc/32.png) [@Frankx9](https://pyfr.discourse.group/u/Frankx9)\
**Post date:** [10 June 2024 13:43 UTC](https://pyfr.discourse.group/t/entropy-filter-point-set-combination/1107/4 "2024-06-10T13:43:56Z")

</div>

Hi, thanks for the answer.

> And is the mesh a pure prism mesh?

Yes I confirm that the mesh is pure prism.

> Can you confirm what version of PyFR you are using?

I’m using the latest 2.0.2

> And is the mesh a pure prism mesh?

It works with order 1, 2, 3 but fails with order 4

Best

---

<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:** [10 June 2024 13:47 UTC](https://pyfr.discourse.group/t/entropy-filter-point-set-combination/1107/5 "2024-06-10T13:47:57Z")

</div>

Can you run the following script and let me know if it gives any errors:

```auto
import numpy as np

from pyfr.inifile import Inifile
from pyfr.shapes import PriShape

cfg = """
[solver]
order = 4

[solver-interfaces-quad]
flux-pts = gauss-legendre-lobatto

[solver-interfaces-tri]
flux-pts = alpha-opt

[solver-elements-pri]
soln-pts = alpha-opt~gauss-legendre-lobatto
"""
cfg = Inifile(cfg)

p = PriShape(None, cfg)
m0 = p.m0
mrowsum = np.max(np.abs(np.sum(m0, axis=1) - 1.0))
if np.min(m0) < -1e-8 or mrowsum > 1e-8:
    raise ValueError('Entropy filter requires flux points to be a '
                     'subset of solution points or a convex '
                     'combination thereof.')

```

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![Frankx9](https://avatars.discourse-cdn.com/v4/letter/f/3e96dc/32.png) [@Frankx9](https://pyfr.discourse.group/u/Frankx9)\
**Post date:** [10 June 2024 13:52 UTC](https://pyfr.discourse.group/t/entropy-filter-point-set-combination/1107/6 "2024-06-10T13:52:46Z")

</div>

I get the same error

---

<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:** [10 June 2024 15:11 UTC](https://pyfr.discourse.group/t/entropy-filter-point-set-combination/1107/7 "2024-06-10T15:11:13Z")

</div>

That script works fine for me under a fresh install of 2.0.2.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![p.vincent](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/p.vincent/32/225_2.png) [@p.vincent](https://pyfr.discourse.group/u/p.vincent)\
**Post date:** [11 June 2024 23:17 UTC](https://pyfr.discourse.group/t/entropy-filter-point-set-combination/1107/8 "2024-06-11T23:17:23Z")

</div>

That script also works for me with latest release. Could you double check the version you are running?
