# Using the same filter for multiple input fields

**URL:** https://discourse.paraview.org/t/using-the-same-filter-for-multiple-input-fields/12668
**Category:** ParaView Support
**Created:** [August 9, 2023, 10:24am UTC](https://discourse.paraview.org/t/using-the-same-filter-for-multiple-input-fields/12668 "2023-08-09T10:24:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lamBOO](https://discourse.paraview.org/user_avatar/discourse.paraview.org/lamboo/32/12193_2.png) [@lamBOO](https://discourse.paraview.org/u/lamBOO)
#### Post date: [August 9, 2023, 10:24am UTC](https://discourse.paraview.org/t/using-the-same-filter-for-multiple-input-fields/12668/1 "2023-08-09T10:24:23Z")

</div>

I have a dataset with 2 or more input fields “f1”, “f2”, “f3” etc. Say all fields have values in [0.1]. How can I apply the same filter to all of the fields simultaneously without copying the filter?

E.g. applying a “Contour” filter with one isoline at 1.0 that gets “f1” as input and then apply the same filter with the same settings also to “f2”, “f3”, etc.

In pseudocode, I want to replace

```auto
d = open("data.vtu");
contour(d.f1, iso=[1.0]);
contour(d.f2, iso=[1.0]);
contour(d.f3, iso=[1.0]);
contour(d.f4, iso=[1.0]);
contour(d.f5, iso=[1.0]);
contour(d.f6, iso=[1.0]);
# ...

```

with

```auto
contour([d.f1,d.f2,d.f3,d.f4,d.f5,d.f6], iso=[1.0]);
# Julia-like: or map(x->contour(x, iso=[1.0]), [d.f1,d.f2,d.f3,d.f4,d.f5,d.f6])

```

… in the GUI.

Is that possible?

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [August 9, 2023, 1:58pm UTC](https://discourse.paraview.org/t/using-the-same-filter-for-multiple-input-fields/12668/2 "2023-08-09T13:58:50Z")

</div>

As you stated, it is not possible to do that in ParaView without creating `n` filters.

---

<div class="post-metadata">

### Author: ![lamBOO](https://discourse.paraview.org/user_avatar/discourse.paraview.org/lamboo/32/12193_2.png) [@lamBOO](https://discourse.paraview.org/u/lamBOO)
#### Post date: [August 10, 2023, 2:26pm UTC](https://discourse.paraview.org/t/using-the-same-filter-for-multiple-input-fields/12668/3 "2023-08-10T14:26:38Z")

</div>

Thanks for the reply.

I found another way in the meantime (for my very specific problem)…  
**Setup** : I have a set of triangles where each node has a value assigned to it (integer membership to a domain decomposition = region) and want to mark the region boundaries. It is basically a DG-style mesh produced by `Gridap.jl` when writing a cell field, see, e.g., [here](https://github.com/gridap/Gridap.jl/issues/861).  
**Problem** : Since it’s a set of unconnected triangles, we cannot apply a contour filter with `iso=[1,2,3,...]`.  
**Fix** : “Apply Warp to 3D” filter for the region membership s.t. every region has a different z component. Then apply the “Clean” filter to glue the triangles of each regions together. Then apply the “Extract Region Surface” filter folowed by the “Features Edges (only boundary edges enabled)” to get all region boundaries.
