fdtd.py 文件源码

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

项目:gmes 作者: aitatanit 项目源码 文件源码
def init_material_ez(self):
        """Set up the update mechanism for Ez field.

        Set up the update mechanism for Ez field and stores the result
        at self.pw_material[Ez].

        """
        self.pw_material[Ez] = {}
        shape = self.ez.shape
        for idx in ndindex(shape):
            spc = self.space.ez_index_to_space(*idx)
            mat_obj, underneath = self.geom_tree.material_of_point(spc)
            if idx[0] == shape[0] - 1 or idx[1] == shape[1] - 1:
                mat_obj = Dummy(mat_obj.eps_inf, mat_obj.mu_inf)
            pw_obj = mat_obj.get_pw_material_ez(idx, spc, underneath, self.cmplx)

            if self.pw_material[Ez].has_key(type(pw_obj)):
                self.pw_material[Ez][type(pw_obj)].merge(pw_obj)
            else:
                self.pw_material[Ez][type(pw_obj)] = pw_obj
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号