# grid nx = 30 ny = 30 nh = 20 nv = 20 fdmesh = fdmesh.FDMesh(L, W, nx, ny) # Surounding oxide vsp = 3.0 hsp = 3.0 pgaa_zoner = zoner.pGAAZoner(L, W, fdmesh, vsp, hsp, nh, nv, IL=IL) mesh = FVM.FVMMesh( pgaa_zoner.getXMesh(), pgaa_zoner.getYMesh(), pgaa_zoner.zoner_func, pgaa_zoner.prop_dict ) mesh.assignContact( lambda x, y: x < -hsp + 1e-8, 'Left' ) mesh.assignContact( lambda x, y: x > L+hsp-1e-8, 'Right') #print(mesh) #exit() poisson = pois.FVMPoisson(mesh) #print 'Lap mat:' pmat = poisson.Lap_mat #print pmat.toarray()
nx = 20 ny = 20 fdmesh = fdmesh.FDMesh(L, W, nx, ny) vsp = 3.0 hsp = 3.0 # Build a mesh using uniform x and y-spacing # (uniformtity not required) # Simple zoner function makes left half Silicon, right half Oxide # Properties dictionary defines permittivities for the two materials mesh = FVM.FVMMesh(np.linspace(0.0, L, nx), np.linspace(0.0, W, ny), lambda x, y: 'Silicon' if x < 0.5 * L else 'Oxide', { 'Silicon': { 'eps': 11.9 }, 'Oxide': { 'eps': 3.9 } }) # Assign contacts (Dirichlet BCs) to left and right edges mesh.assignContact(lambda x, y: x < 1e-8, 'Left') mesh.assignContact(lambda x, y: L - x < 1e-8, 'Right') print(mesh) poisson = pois.FVMPoisson(mesh) #print 'Lap mat:' pmat = poisson.Lap_mat