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?
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.
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.
So it comes indeed from the reader, there is a logic like this:
// 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.