def IPVec(self, EE): F = np.zeros_like(self.x) F[:, 0] = IR.InterpPar2D(self.x, EE[:, :, 0], self.dx, self.dy, self.ncelx, self.ncely) F[:, 1] = IR.InterpPar2D(self.x, EE[:, :, 1], self.dx, self.dy, self.ncelx, self.ncely) return F
def IGVec(self, vee): F = np.zeros((self.ncelx, self.ncely, 2)) F[:, :, 0] = IR.InterpGrid2D(self.x, vee[:, 0], self.dx, self.dy, self.ncelx, self.ncely) F[:, :, 1] = IR.InterpGrid2D(self.x, vee[:, 1], self.dx, self.dy, self.ncelx, self.ncely) return F
def IPVec(self,EE): Fe = np.zeros_like(self.xe) Fe = IR.InterpPar(self.xe,EE,self.dx,self.ncel) Fi = np.zeros_like(self.xi) Fi = IR.InterpPar(self.xi,EE,self.dx,self.ncel) return Fe, Fi
def IPVec(self,EE): Fe = np.zeros_like(self.xe) Fe[:,0] = IR.InterpPar2D(self.xe,EE[:,:,0],self.dx,self.dy,self.ncelx,self.ncely) Fe[:,1] = IR.InterpPar2D(self.xe,EE[:,:,1],self.dx,self.dy,self.ncelx,self.ncely) Fi = np.zeros_like(self.xi) Fi[:,0] = IR.InterpPar2D(self.xi,EE[:,:,0],self.dx,self.dy,self.ncelx,self.ncely) Fi[:,1] = IR.InterpPar2D(self.xi,EE[:,:,1],self.dx,self.dy,self.ncelx,self.ncely) return Fe, Fi
def IG(self,wte,wti): ## Grid interpolation wrapper function print('T=' + str(self.time)) F = self.chrgi*IR.InterpGrid2D(self.xi,wti,self.dx,self.dy,self.ncelx,self.ncely) # print('Fi') # print(F) F = self.chrge*IR.InterpGrid2D(self.xe,wte,self.dx,self.dy,self.ncelx,self.ncely) # print('Fe') # print(F) F = F + self.chrgi*IR.InterpGrid2D(self.xi,wti,self.dx,self.dy,self.ncelx,self.ncely) # print('F') # print(F) # print('Sum(F)') # print(np.sum(F)) return F
def IGVec(self,vee): F = np.zeros((self.ncelx,self.ncely,self.ncelz,3)) F[:,:,:,0] = IR.InterpGrid3D(self.x,vee[:,0],self.dx,self.dy,self.dz,self.ncelx,self.ncely,self.ncelz) F[:,:,:,1] = IR.InterpGrid3D(self.x,vee[:,1],self.dx,self.dy,self.dz,self.ncelx,self.ncely,self.ncelz) F[:,:,:,2] = IR.InterpGrid3D(self.v,vee[:,2],self.dx,self.dy,self.dz,self.ncelx,self.ncely,self.ncelz) return F
def IG(self,vee): ## Grid interpolation wrapper function F = IR.InterpGrid3D(self.x,vee,self.dx,self.dy,self.dz,self.ncelx,self.ncely,self.ncelz) return F
def IG(self,wte,wti): ## Grid interpolation wrapper function F = self.chrgi*IR.InterpGrid(self.xi,wti,self.dx,self.ncel) F = self.chrge*IR.InterpGrid(self.xe,wte,self.dx,self.ncel) F = F + self.chrgi*IR.InterpGrid(self.xi,wti,self.dx,self.ncel) return F