mfem / mfem

Lightweight, general, scalable C++ library for finite element methods
http://mfem.org
BSD 3-Clause "New" or "Revised" License
1.71k stars 499 forks source link

VisItDataCollection #1086

Closed dylan-copeland closed 5 years ago

dylan-copeland commented 5 years ago

For a VisItDataCollection that I output from an mfem code, VisIt displays a more refined mesh.

For example, in serial, sol_000000 contains a file mesh.000000 with

elements 24576

This is what I expect, a tetrahedral mesh with 16x16x16 cubes, each containing 6 tetrahedra, for a total of 24576 elements. Glvis displays this mesh file correctly. However, if I load sol_000000.mfem_root with VisIt, it shows a finer mesh with 32x32x32 cubes.

How is this possible, and how can I make VisIt show the true mesh?

v-dobrev commented 5 years ago

If you plot Mesh -> main in VisIt, you see the subdivided mesh. To see the see the original mesh use Subset -> main. The default subdivision factor (called lod in the .mfem_root file) is the order of the solution space, however you can adjust that in VisIt with the Operators -> Selection -> MultiresControl. You can also adjust it in MFEM using VisItDataCollection::SetLevelsOfDetail.

dylan-copeland commented 5 years ago

@v-dobrev Thanks, I was able to visualize the original mesh by using MultiresControl. Also, changing lod to 0 in the .mfem_root file worked. However, Subset -> main did not affect the mesh resolution.

v-dobrev commented 5 years ago

Just to clarify: setting the MutiresControl to 0 will show the linear approximation of the original mesh. If you have a curved mesh, you'll need to use Subset -> main with MultiresControl > 0 to see the curved elements.

tzanio commented 5 years ago

See also: https://github.com/CEED/Laghos/issues/10#issuecomment-363780907