'NameError: name 'device' is not defined'

Hi, I’m asking for help because I’m in trouble.
When opening the gmsh_diode2d.py in python spyder, the error ‘NameError: name ‘device’ is not defined’ appears continuously. How do I prevent errors?

And if I output gmsh_diode2d.py normally, will it output the same as the result mesh of gmsh_diode2d.msh?

Hi @psj0118

Usually there is 1 device, and you can get the device name using:


and if there is only 1 region:


the solution will be on the same mesh coordinates, but you would need to match them. I usually use VisIt or Paraview to look at the tecplot results from the devsim.write_devices command