postprocessing of 3D hexahedral elements via the ngsolve.webgui


First of all, thanks for sharing this very nice FEM solver. I am a very beginner, just to mention. I would have three questions.

My first question regards to the postprocessing of 3D hexahedral (volume) elements via the ngsolve.webgui.
When creating the mesh via:
mesh = MakeStructured3DMesh(hexes=[b]False[/b], nx=3, ny=3, nz=3)
Plotting the solution via Draw(gfu, mesh) works fine.

But this is not the case, when using hexahedral meshes, i.e.:
mesh = MakeStructured3DMesh(hexes=[b]True[/b], nx=3, ny=3, nz=3)

Is there any possibility to plot the hexahedral mesh in the webgui? (At least, I could sucessfully export the results of the hexahedral mesh via VTKOutput and results are looking as expected.)

Please find the jupyter-notebook attached (I am using version number v6.2.2102).

Second question (and maybe a stupid one): if the mesh is made out of hexahedral elements, ngsolve is really using hexahedral elements (interpolation functions of hex) in the background calculations and does not split the hexes to tets)?

Third question: when converting results to vtk format (via VTKOutput) is there any possibility to also add “deformation” information of the exported mesh, as possible in the webgui for, e.g., strucutral analyses?

Thank you very much!

Best regards

Attachment: 337e5ac453a4ee2267185f42d34c6381

Hi Marius,

  1. The webgui supports hexes and your jupyter notebook looks fine to me. You don’t have a recent version on ngsolve! Try v6.2.2105.
  2. Yes, if you have a hex mesh, the elements are treated as hexes (no subdivision).
  3. To export the deformation, simply export the deformation :). Just add the deformation as a Coefficientfunction (e.g. a GridFunction) as an output field. Then your visualization tool can use that field for deformation again.


Thanks for the quick reply on my questions! Ok with the current version it finally works also in the webgui - perfect!

Best regards