plasma.py 文件源码

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

项目:Codes 作者: SP2RC-Coding-Club 项目源码 文件源码
def energy(self, energy: u.J/u.m**3):
        """Sets the simulation's total energy density profile to the specified array.
        Other arrays which depend on the energy values, such as the kinetic
        pressure, are then redefined automatically.

        Parameters
        ----------

        energy : ndarray
            Array of energy values. Shape must be (x, y, z), where x, y, and z
            are the grid sizes of the simulation in the x, y, and z dimensions.
            Must have units of energy.

        """

        assert energy.shape == self.domain_shape, """
            Specified density array shape {} does not match simulation grid {}.
            """.format(energy.shape, self.domain_shape)
        self._energy = energy

    # Magnetic field
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号