# Automatic application of mesh displacement for certain name of vector field

**URL:** https://discourse.paraview.org/t/automatic-application-of-mesh-displacement-for-certain-name-of-vector-field/16252
**Category:** ParaView Support
**Created:** [February 28, 2025, 9:36am UTC](https://discourse.paraview.org/t/automatic-application-of-mesh-displacement-for-certain-name-of-vector-field/16252 "2025-02-28T09:36:22Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![fab4100](https://discourse.paraview.org/user_avatar/discourse.paraview.org/fab4100/32/4945_2.png) [@fab4100](https://discourse.paraview.org/u/fab4100)
#### Post date: [February 28, 2025, 9:36am UTC](https://discourse.paraview.org/t/automatic-application-of-mesh-displacement-for-certain-name-of-vector-field/16252/1 "2025-02-28T09:36:22Z")

</div>

Dear All,

I am working with a moving mesh and I noticed that ParaView automatically applies the mesh displacement for certain names of the displacement vector field (e.g. “disp” or “displacement”). I typically define a “Warp by Vector” filter for this. I am curious what is the attribute name pattern for which this happens automatically?

Thanks for your time!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 28, 2025, 10:01am UTC](https://discourse.paraview.org/t/automatic-application-of-mesh-displacement-for-certain-name-of-vector-field/16252/2 "2025-02-28T10:01:01Z")

</div>

> [@fab4100](#):
>
> ParaView automatically applies the mesh displacement for certain names of the displacement vector field

Can you precise what you mean by “automatically” here ?

---

<div class="post-metadata">

### Author: ![fab4100](https://discourse.paraview.org/user_avatar/discourse.paraview.org/fab4100/32/4945_2.png) [@fab4100](https://discourse.paraview.org/u/fab4100)
#### Post date: [February 28, 2025, 10:07am UTC](https://discourse.paraview.org/t/automatic-application-of-mesh-displacement-for-certain-name-of-vector-field/16252/3 "2025-02-28T10:07:19Z")

</div>

Assume I have a results file (Exodus II) with two timesteps and a vector field called “disp” that describes the mesh displacement. If I load the file in ParaView, it automatically recognizes the “disp” vector field an uses it when I step through the time steps (“displacement” also worked in my tests).

If I name the vector field, say, “mesh\_displacement” (in the code that generates the data) and I load this file, ParaView does not automatically recognize this vector field as mesh displacement and I have to add a Warp by Vector filter first before the mesh displacement is displayed.

So ParaView must have some glob pattern internally responsible for this? I grepped the code a bit but could not find where this should happen.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 28, 2025, 10:10am UTC](https://discourse.paraview.org/t/automatic-application-of-mesh-displacement-for-certain-name-of-vector-field/16252/4 "2025-02-28T10:10:53Z")

</div>

> [@fab4100](#):
>
> it automatically recognizes the “disp” vector field an uses it when I step through the time steps (“displacement” also worked in my tests).

Thats is definitely not a feature in ParaView.  
It may be a feature of the ExodusII reader but I doubt it as I can’t find any code doing that.

> in the code that generates the data

IMO the displacement of the geometry comes from the data generation itself.

---

<div class="post-metadata">

### Author: ![fab4100](https://discourse.paraview.org/user_avatar/discourse.paraview.org/fab4100/32/4945_2.png) [@fab4100](https://discourse.paraview.org/u/fab4100)
#### Post date: [February 28, 2025, 10:22am UTC](https://discourse.paraview.org/t/automatic-application-of-mesh-displacement-for-certain-name-of-vector-field/16252/5 "2025-02-28T10:22:10Z")

</div>

> IMO the displacement of the geometry comes from the data generation itself.

I think this is what I meant to say, apologies if I was not clear.

It may be the reader then, I will look a bit further. I am just curious. Attached are two exodus files, one names the mesh displacement vector “disp” (if it was named “displacement” would also work) for which the mesh deformation works “magically out of the box” and the other names it “mesh\_displacement” for which the assumed internal glob pattern possibly fails and you need to add a “Warp by Vector” filter first. I am using ParaView 5.13.0 for these tests.

[disp.e](https://discourse.paraview.org/uploads/short-url/qD0ApaHeVfXLegdKhaht7FGamyv.e) (170.1 KB)  
[mesh\_disp.e](https://discourse.paraview.org/uploads/short-url/3xotL8C66K10XLeRDdL45J7gzjt.e) (170.1 KB)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 28, 2025, 10:30am UTC](https://discourse.paraview.org/t/automatic-application-of-mesh-displacement-for-certain-name-of-vector-field/16252/6 "2025-02-28T10:30:20Z")

</div>

So it comes indeed from the reader, there is a logic like this:

```auto
  // find the first field that begins with "dis" and has as many components as
  // the degree.
  for (const auto& fname : names)
  {
    if (vtksys::SystemTools::UpperCase(fname.substr(0, 3)) == "DIS" &&
      nodeblock->get_fieldref(fname).raw_storage()->component_count() == degree)
    {
      return fname;
    }    
  }

```

Naming the field `dis....` indeed trigger this behavior.

You can however disable this behavior using the “ApplyDisplacement” property which is an advanced option of the reader.

![a](https://discourse.paraview.org/uploads/default/original/3X/3/3/335205fa52c3a64e320db4d8e09ad41da5d724f3.png)

hth,
