GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
vort Namespace Reference

Classes

class  Vortex
 
class  VtxList
 

Functions

def __init__ (self, uid, x, y, isOn, sign=1)
 
def update_uid (self, uid)
 
def update_on (self, isOn)
 
def update_next (self, next)
 
def dist (self, vtx)
 
def __init__ (self)
 
def element (self, pos)
 
def vtx_uid (self, uid)
 
def max_uid (self)
 
def add (self, Vtx, index=None)
 
def as_np (self)
 
def write_out (self, time, data)
 
def idx_min_dist (self, vortex, isSelf=False)
 
def remove (self, pos)
 
def swap_uid (self, uid_i, uid_f)
 
def vort_decrease (self, positions, vorts_p)
 
def vort_increase (self, positions, vorts_p)
 
def run (start, fin, incr)
 

Variables

string data_dir = "../" + sys.argv[1] + "/"
 
 c = ConfigParser.ConfigParser()
 
 xDim = int(c.getfloat('Params','xDim'))
 
 yDim = int(c.getfloat('Params','yDim'))
 
 gndMaxVal = int(c.getfloat('Params','gsteps'))
 
 evMaxVal = int(c.getfloat('Params','esteps'))
 
 incr = int(c.getfloat('Params','printSteps'))
 
tuple dx = (c.getfloat('Params','dx'))
 
tuple dt = (c.getfloat('Params','dt'))
 
tuple xMax = (c.getfloat('Params','xMax'))
 
tuple yMax = (c.getfloat('Params','yMax'))
 
 uid
 
 x
 
 y
 
 sign
 
 isOn
 
 next
 
 r = m.sqrt((self.x - vtx.x)**2 + (self.y - vtx.y)**2)
 
 head
 
 tail
 
 length
 
int pos_l = 0
 
 vtx = self.head
 
int pos = 0
 
int val = 0
 
list dtype = [('x',float),('y',float),('sign',int),('uid',int),('isOn',int)]
 
list data = []
 
int i = 0
 
 fmt
 
 delimiter
 
int counter = 0
 
int ret_idx = counter
 
def current = self.element(pos-1).next
 
def vtx_pos = self.vtx_uid(uid_i)
 
 index
 
def max_uid = vorts_p.max_uid()
 
 v_arr_p = genfromtxt(data_dir+'vort_arr_' + str(incr),delimiter=',')
 
 vorts_p = VtxList()
 
 vorts_c = VtxList()
 
 v_arr_c = genfromtxt(data_dir+'vort_arr_' + str(i), delimiter=',')
 
 v_arr_p_coords = np.array([a for a in v_arr_p[:,[1,3]]])
 
 v_arr_c_coords = np.array([a for a in v_arr_c[:,[1,3]]])
 
 v_arr_p_sign = np.array([a for a in v_arr_p[:,4]])
 
 v_arr_c_sign = np.array([a for a in v_arr_c[:,4]])
 
 vtx_p = Vortex(i1,v_arr_p_coords[i1][0],v_arr_p_coords[i1][1],True,sign=v_arr_p_sign[i1])
 
 vtx_c = Vortex(-1-i2,v_arr_c_coords[i2][0],v_arr_c_coords[i2][1],True,sign=v_arr_c_sign[i2])
 
def index_r = vorts_c.idx_min_dist(vorts_p.element(i3))
 
def v0c = vorts_c.element(index_r[0]).sign
 
def v0p = vorts_p.element(i3).sign
 
def v1c = vorts_c.element(index_r[0]).uid
 
list uid_c = [[a for a in b][3] for b in vorts_c.as_np()]
 
list uid_p = [[a for a in b][3] for b in vorts_p.as_np()]
 
 dpc = set(uid_p).difference(set(uid_c))
 
 dcp = set(uid_c).difference(set(uid_p))
 
list vtx_pos_p = []
 
list vtx_pos_c = []
 
 vorts_c_update = sorted(vorts_c.as_np(),key=lambda vtx: vtx[3])
 

Function Documentation

◆ __init__() [1/2]

def vort.__init__ (   self,
  uid,
  x,
  y,
  isOn,
  sign = 1 
)

Definition at line 37 of file vort.py.

Referenced by __init__().

37  def __init__(self,uid,x,y,isOn,sign=1):
def __init__(self, uid, x, y, isOn, sign=1)
Definition: vort.py:37
Here is the caller graph for this function:

◆ __init__() [2/2]

def vort.__init__ (   self)

Definition at line 71 of file vort.py.

References __init__().

71  def __init__(self):
def __init__(self, uid, x, y, isOn, sign=1)
Definition: vort.py:37
Here is the call graph for this function:

◆ add()

def vort.add (   self,
  Vtx,
  index = None 
)

Definition at line 119 of file vort.py.

119  def add(self,Vtx,index=None): #Add a vtx at index, otherwise end
def add(self, Vtx, index=None)
Definition: vort.py:119

◆ as_np()

def vort.as_np (   self)

Definition at line 135 of file vort.py.

135  def as_np(self): #Return numpy array with format x,y,sign,uid,isOn
def as_np(self)
Definition: vort.py:135

◆ dist()

def vort.dist (   self,
  vtx 
)

Definition at line 62 of file vort.py.

Referenced by main().

62  def dist(self,vtx): #Distance between self and vtx
def dist(self, vtx)
Definition: vort.py:62
Here is the caller graph for this function:

◆ element()

def vort.element (   self,
  pos 
)

Definition at line 78 of file vort.py.

78  def element(self,pos): #Get vtx at position pos
def element(self, pos)
Definition: vort.py:78

◆ idx_min_dist()

def vort.idx_min_dist (   self,
  vortex,
  isSelf = False 
)

Definition at line 153 of file vort.py.

153  def idx_min_dist(self,vortex, isSelf=False): #Closest vtx to self
def idx_min_dist(self, vortex, isSelf=False)
Definition: vort.py:153

◆ max_uid()

def vort.max_uid (   self)

Definition at line 102 of file vort.py.

References max_uid.

102  def max_uid(self): #Return position and value of largest uid
def max_uid
Definition: vort.py:208

◆ remove()

def vort.remove (   self,
  pos 
)

Definition at line 169 of file vort.py.

169  def remove(self,pos): #Remove vortices outside artificial boundary
def remove(self, pos)
Definition: vort.py:169

◆ run()

def vort.run (   start,
  fin,
  incr 
)

Definition at line 215 of file vort.py.

215 def run(start,fin,incr): #Performs the tracking
def run(start, fin, incr)
Definition: vort.py:215

◆ swap_uid()

def vort.swap_uid (   self,
  uid_i,
  uid_f 
)

Definition at line 188 of file vort.py.

188  def swap_uid(self,uid_i,uid_f): #Swap uid between vtx
def swap_uid(self, uid_i, uid_f)
Definition: vort.py:188

◆ update_next()

def vort.update_next (   self,
  next 
)

Definition at line 57 of file vort.py.

57  def update_next(self,next): #Get next vortex
def update_next(self, next)
Definition: vort.py:57

◆ update_on()

def vort.update_on (   self,
  isOn 
)

Definition at line 52 of file vort.py.

52  def update_on(self,isOn): #Vortex is trackable
def update_on(self, isOn)
Definition: vort.py:52

◆ update_uid()

def vort.update_uid (   self,
  uid 
)

Definition at line 47 of file vort.py.

47  def update_uid(self,uid):
def update_uid(self, uid)
Definition: vort.py:47

◆ vort_decrease()

def vort.vort_decrease (   self,
  positions,
  vorts_p 
)

Definition at line 195 of file vort.py.

195  def vort_decrease(self,positions,vorts_p): #Turn off vortex timeline
def vort_decrease(self, positions, vorts_p)
Definition: vort.py:195

◆ vort_increase()

def vort.vort_increase (   self,
  positions,
  vorts_p 
)

Definition at line 205 of file vort.py.

205  def vort_increase(self,positions,vorts_p): #Add new vtx to tracking
def vort_increase(self, positions, vorts_p)
Definition: vort.py:205

◆ vtx_uid()

def vort.vtx_uid (   self,
  uid 
)

Definition at line 92 of file vort.py.

92  def vtx_uid(self,uid): #Get vtx with identifier uid
def vtx_uid(self, uid)
Definition: vort.py:92

◆ write_out()

def vort.write_out (   self,
  time,
  data 
)

Definition at line 148 of file vort.py.

148  def write_out(self,time,data): #Write out CSV file as x,y,sign,uid,isOn
def write_out(self, time, data)
Definition: vort.py:148

Variable Documentation

◆ c

vort.c = ConfigParser.ConfigParser()

Definition at line 15 of file vort.py.

◆ counter

int vort.counter = 0

Definition at line 155 of file vort.py.

◆ current

vort.current = self.element(pos-1).next

Definition at line 172 of file vort.py.

◆ data

vort.data = []

Definition at line 138 of file vort.py.

◆ data_dir

string vort.data_dir = "../" + sys.argv[1] + "/"

Definition at line 12 of file vort.py.

◆ dcp

vort.dcp = set(uid_c).difference(set(uid_p))

Definition at line 262 of file vort.py.

◆ delimiter

vort.delimiter

Definition at line 150 of file vort.py.

◆ dpc

vort.dpc = set(uid_p).difference(set(uid_c))

Definition at line 261 of file vort.py.

◆ dt

tuple vort.dt = (c.getfloat('Params','dt'))

Definition at line 24 of file vort.py.

◆ dtype

list vort.dtype = [('x',float),('y',float),('sign',int),('uid',int),('isOn',int)]

Definition at line 137 of file vort.py.

◆ dx

tuple vort.dx = (c.getfloat('Params','dx'))

Definition at line 23 of file vort.py.

◆ evMaxVal

vort.evMaxVal = int(c.getfloat('Params','esteps'))

Definition at line 21 of file vort.py.

◆ fmt

vort.fmt

Definition at line 150 of file vort.py.

◆ gndMaxVal

vort.gndMaxVal = int(c.getfloat('Params','gsteps'))

Definition at line 20 of file vort.py.

◆ head

vort.head

Definition at line 73 of file vort.py.

◆ i

int vort.i = 0

Definition at line 139 of file vort.py.

◆ incr

vort.incr = int(c.getfloat('Params','printSteps'))

Definition at line 22 of file vort.py.

◆ index

vort.index

Definition at line 192 of file vort.py.

◆ index_r

def vort.index_r = vorts_c.idx_min_dist(vorts_p.element(i3))

Definition at line 243 of file vort.py.

◆ isOn

vort.isOn

Definition at line 43 of file vort.py.

◆ length

vort.length

Definition at line 75 of file vort.py.

Referenced by sepAvg().

◆ max_uid

def vort.max_uid = vorts_p.max_uid()

Definition at line 208 of file vort.py.

Referenced by max_uid().

◆ next

vort.next

Definition at line 44 of file vort.py.

◆ pos

int vort.pos = 0

Definition at line 95 of file vort.py.

◆ pos_l

int vort.pos_l = 0

Definition at line 80 of file vort.py.

◆ r

def vort.r = m.sqrt((self.x - vtx.x)**2 + (self.y - vtx.y)**2)

Definition at line 64 of file vort.py.

◆ ret_idx

int vort.ret_idx = counter

Definition at line 156 of file vort.py.

◆ sign

vort.sign

Definition at line 42 of file vort.py.

◆ tail

vort.tail

Definition at line 74 of file vort.py.

◆ uid

vort.uid

Definition at line 39 of file vort.py.

◆ uid_c

list vort.uid_c = [[a for a in b][3] for b in vorts_c.as_np()]

Definition at line 258 of file vort.py.

◆ uid_p

list vort.uid_p = [[a for a in b][3] for b in vorts_p.as_np()]

Definition at line 259 of file vort.py.

◆ v0c

def vort.v0c = vorts_c.element(index_r[0]).sign

Definition at line 245 of file vort.py.

◆ v0p

def vort.v0p = vorts_p.element(i3).sign

Definition at line 246 of file vort.py.

◆ v1c

def vort.v1c = vorts_c.element(index_r[0]).uid

Definition at line 247 of file vort.py.

◆ v_arr_c

vort.v_arr_c = genfromtxt(data_dir+'vort_arr_' + str(i), delimiter=',')

Definition at line 221 of file vort.py.

◆ v_arr_c_coords

vort.v_arr_c_coords = np.array([a for a in v_arr_c[:,[1,3]]])

Definition at line 225 of file vort.py.

◆ v_arr_c_sign

vort.v_arr_c_sign = np.array([a for a in v_arr_c[:,4]])

Definition at line 227 of file vort.py.

◆ v_arr_p

vort.v_arr_p = genfromtxt(data_dir+'vort_arr_' + str(incr),delimiter=',')

Definition at line 217 of file vort.py.

◆ v_arr_p_coords

vort.v_arr_p_coords = np.array([a for a in v_arr_p[:,[1,3]]])

Definition at line 224 of file vort.py.

◆ v_arr_p_sign

vort.v_arr_p_sign = np.array([a for a in v_arr_p[:,4]])

Definition at line 226 of file vort.py.

◆ val

vort.val = 0

Definition at line 104 of file vort.py.

◆ vorts_c

vort.vorts_c = VtxList()

Definition at line 220 of file vort.py.

◆ vorts_c_update

vort.vorts_c_update = sorted(vorts_c.as_np(),key=lambda vtx: vtx[3])

Definition at line 275 of file vort.py.

◆ vorts_p

vort.vorts_p = VtxList()

Definition at line 219 of file vort.py.

◆ vtx

vort.vtx = self.head

Definition at line 82 of file vort.py.

◆ vtx_c

vort.vtx_c = Vortex(-1-i2,v_arr_c_coords[i2][0],v_arr_c_coords[i2][1],True,sign=v_arr_c_sign[i2])

Definition at line 239 of file vort.py.

◆ vtx_p

vort.vtx_p = Vortex(i1,v_arr_p_coords[i1][0],v_arr_p_coords[i1][1],True,sign=v_arr_p_sign[i1])

Definition at line 235 of file vort.py.

◆ vtx_pos

def vort.vtx_pos = self.vtx_uid(uid_i)

Definition at line 190 of file vort.py.

◆ vtx_pos_c

vort.vtx_pos_c = []

Definition at line 264 of file vort.py.

◆ vtx_pos_p

vort.vtx_pos_p = []

Definition at line 263 of file vort.py.

◆ x

vort.x

Definition at line 40 of file vort.py.

◆ xDim

vort.xDim = int(c.getfloat('Params','xDim'))

Definition at line 18 of file vort.py.

◆ xMax

tuple vort.xMax = (c.getfloat('Params','xMax'))

Definition at line 25 of file vort.py.

◆ y

vort.y

Definition at line 41 of file vort.py.

◆ yDim

vort.yDim = int(c.getfloat('Params','yDim'))

Definition at line 19 of file vort.py.

◆ yMax

tuple vort.yMax = (c.getfloat('Params','yMax'))

Definition at line 26 of file vort.py.