# How can I see the total number of vertices and elements in my DEVICE mesh?

#1

When I generate the mesh in my DEVICE simulation, how can I see how many elements or vertices there are in the generated mesh? Is there a log file?

#2

Hi @tecklee. When you run a simulation in DEVICE (or calculate the mesh), the solver does generate a log file. The name of the file will be “name_of_the_DEVICE_file_p0.log” and it is saved in the same folder as the .ldev file. You can open the log file in a text file editor (e.g. notepad) and it will contain information about the mesh (i.e. number of elements, vertices etc.).

#3

Dear aalam,

Thank you for your answers. I have a related question. Is there any way to get the number of elements or vertices using the script commands? I believe there is no direct command, however, is there any indirect way?

mesh('CHARGE'); grid = getresult('CHARGE','grid'); x = grid.x; elements = grid.elements; S_x = size(x); Nvertices = S_x(1); S_e = size(elements); Nelements = S_e(1);