Ejemplo n.º 1
0
 def RegularGrid(self,nx,ny):
     x = np.linspace(0.,self.Lx,nx,endpoint=False)
     y = np.linspace(0.,self.Ly,ny,endpoint=False)
     if self.imode == 'linear':
         return SpIR.EvaluateOnGrid2D(x,y,self.pgrids,self.mgrids,self.dxp,self.dyp)
     else:
         return SpIR.EvaluateOnGrid2Dbicubic(x,y,self.pgrids,self.mgrids,self.dxp,self.dyp)
Ejemplo n.º 2
0
 def RegularGrid(self,nx,ny,nz):
     g = np.zeros((nx,ny,nz))
     x = np.linspace(0.,self.Lengths[0],nx,endpoint=False)
     y = np.linspace(0.,self.Lengths[1],ny,endpoint=False)
     z = np.linspace(0.,self.Lengths[2],nz,endpoint=False)
     #for i in range(y.shape[0]):
     #    for j in range(z.shape[0]):
     #        X = np.column_stack((x,y[i]*np.ones(x.shape[0]),z[j]*np.ones(x.shape[0])))
     #        g[:,i,j] = self.EvaluateAt(X)
     if self.imode == 'linear':
         g = SpIR.EvaluateOnGrid3D(x,y,z,self.np2grids,self.np1grids,self.ngrids,self.ncnp2,self.ncnp1,self.ncn,self.Lengths)
     else:
         g = SpIR.EvaluateOnGrid3Dbicubic(x,y,z,self.np2grids,self.np1grids,self.ngrids,self.ncnp2,self.ncnp1,self.ncn,self.Lengths)
     
     return g
Ejemplo n.º 3
0
 def RegularGridBicubic(self,nx,ny):
     x = np.linspace(0.,self.Lx,nx,endpoint=False)
     y = np.linspace(0.,self.Ly,ny,endpoint=False)
     return SpIR.EvaluateOnGrid2Dbicubic(x,y,self.pgrids,self.mgrids,self.dxp,self.dyp)
Ejemplo n.º 4
0
 def EvaluateAtBicubic(self,x):
     return SpIR.EvaluateAtBicubic(x,self.pgrids,self.mgrids,self.dxp,self.dyp)
Ejemplo n.º 5
0
 def EvaluateAt(self,x):
     if self.imode == 'cubic':
         return SpIR.EvaluateAtBicubic(x,self.pgrids,self.mgrids,self.dxp,self.dyp)
     else:
         return SpIR.EvaluateAt(x,self.pgrids,self.mgrids,self.dxp,self.dyp)
Ejemplo n.º 6
0
 def EvaluateAt(self,x):
     return SpIR.EvaluateAt3D(x,self.np2grids,self.np1grids,self.ngrids,self.ncnp2,self.ncnp1,self.ncn,self.Lengths)
Ejemplo n.º 7
0
 def InterpolateData(self,x,v):
     SpIR.InterpSparseGrid3D(x,v,self.np2grids,self.np1grids,self.ngrids,self.ncnp2,self.ncnp1,self.ncn,self.Lengths)
Ejemplo n.º 8
0
 def InterpolateDataBicubic(self,x,vee):
     SpIR.InterpSparseGrid2Dbicubic(x,vee,self.pgrids,self.mgrids,self.dxp,self.dyp)
Ejemplo n.º 9
0
 def InterpolateData(self,x,vee):
     if self.smode == 'linear':
         SpIR.InterpSparseGrid2DOther(x,vee,self.pgrids,self.mgrids,self.dxp,self.dyp)
     else:
         SpIR.InterpSparseGrid2Dbicubic(x,vee,self.pgrids,self.mgrids,self.dxp,self.dyp)
Ejemplo n.º 10
0
 def InterpolateData(self,x,vee):
     SpIR.InterpSparseGrid2DOther(x,vee,self.pgrids,self.mgrids,self.dxp,self.dyp)