calc_charge_centers
- static ThomasFermi.calc_charge_centers(physics, n, islands)
Calculates the center of each charge island.
This is done by summing
n * xover the region defined by each island, and dividing by the sum ofnover the region (similar to a center of mass calculation).- Parameters:
physics (PhysicsParameters) – The physical device parameters.
n (ndarray[float]) – A 1D array containing the particle density (in 1/nm).
islands (ndarray[int]) – An array with shape
(num_islands, 2)giving the islands, whereislands[i]is a length-2 integer array[begin_index, end_index + 1]giving the indeces ofphysics.xcorresponding to the island.
- Returns:
An array with length equal to
len[islands]which gives the center of the charge distribution over each island.- Return type:
ndarray[float]