Draw() doesn't work for SetDeformation

Dear all,

I generated a mesh on a unit sphere and tried to deform it using SetDeformation(). But when I applied Draw(), it still showed the original mesh on the unit sphere. Do you know how to draw the deformed mesh instead?

Thank you very much!

Here are my testing codes:

The SetDeformation function is used e.g. to assemble bilinear forms with respect to the deformed domain. To draw the deformed mesh, you can use

Draw(mesh, deformation=mesh_pos)

if you are using the Draw function from the webgui.

For the Netgen GUI you can use

from ngsolve.internal import visoptions

Draw(mesh_pos, mesh, "deformation")
visoptions.vecfunction = "deformation"
SetVisualization(deformation=True)

Best,
Michael

Dear Micheal,

Thank you very much for your reply! I didn’t recognize there are two different Draw() functions. Your resolution works for both of them!