Synopsys: grid2D(xg,yg,[xC,yC])

To understand these quantities, let us suppose to discretize a general 2D dimensional problem.

Let us consider the picture below, which shows the Voronoi cell around r_{l} the position of the l-th point of the mesh.

To this purpose, we need the surface of the Voronoi cell l, the length of the segment delimiting the Voronoi cell \sigma_{li}, and the distance

between the point l and its first neighbour d_{li.}

Since it is easier to work with vectors rather than with matrices, the discretized quantities (e.g. the electrostatic potential, x-y coordinates, free charge etc.) are ordered first along x and then along y. This means that in the 2D domain, if the generic point r_{l} has index i and j along the two axis, its index l in the mapped vector is:

l=i+j*nx

with

i=0..nx-1

j=0..ny-1

The attribute of grid2D instance are the following:

**nx : (int)**number of grid points along the x axis**ny : (int)**number of grid points along the y axis**Np : (int)**total number of grid points: Np=nx*ny**x2D : (array of double, dimension Np)**x coordinates of each grid point, ordered as above**y2D : (array of double, dimension Np)**y coordinates of each grid point, ordered as above**surf : (array of double, dimension [Np]) surface of the Voronoi cell**.**dist : (matrix of double, dimension [Np][4])**matrix of the d_{li }distances between point l and i. Since the grid is hexahedric, point l has 4 first neighbour. dist[l][0], and dist[l][1] correspond to the distances along the x axis where x[i-1]=x[i]-dist[i][0] and x[i+1]=x[i]+dist[i][1], dist[l][2] and dist[l][3] correspond to the distances normal to the y axis, where y[i-ny]=y[i]-dist[i][2] and y[i+ny]=y[i]+dist[i][3].**gridx : (array of double, dimension nx)**points discretized along the x axis. If xC, yC and zC are not specifies, gridx=xg**gridy : (array of double, dimension ny)**points discretized along the y axis. If xC, yC and zC are not specifies, gridy=yg**swap :****(array of double; dimension Np)**the array needed to map the points belonging to the 2D grid to points belonging to the material where the NEGF equation is solved. Look at Tutorial 04 for an example.**xmin : (double)**minimum of the x-coordinate**xmax : (double)**maximum of the x-coordinate**ymin : (double)**minimum of the y-coordinate**ymax : (double)**maximum of the y-coordinate