orthopoly.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:pyballd 作者: Yurlungur 项目源码 文件源码
def __init__(self,
                 orderx,xmin,xmax,
                 ordery,ymin,ymax):
        "Constructor. Needs order and domain in x and y"
        self.orderx,self.ordery = orderx,ordery
        self.stencils = [PseudoSpectralDiscretization1D(orderx,xmin,xmax),
                         PseudoSpectralDiscretization1D(ordery,ymin,ymax)]
        self.stencil_x,self.stencil_y = self.stencils
        self.quads = [s.quads for s in self.stencils]
        self.colocs = [s.colocation_points for s in self.stencils]
        self.x,self.y = self.colocs
        self.colocs2d = np.meshgrid(*self.colocs,indexing='ij')
        self.X,self.Y = self.colocs2d
        self.weights = [s.weights for s in self.stencils]
        self.weights_x,self.weights_y = self.weights
        self.weights2D = np.tensordot(*self.weights,axes=0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号