test_utils.py 文件源码

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

项目:opensbli 作者: opensbli 项目源码 文件源码
def test_get_indexed_variables(mass, grid):
    """ Ensure that all of the Indexed grid variables are returned. """

    variables, count = get_indexed_variables([mass.expanded])

    rho = IndexedBase("rho")
    rhou0 = IndexedBase("rhou0")
    rhou1 = IndexedBase("rhou1")
    x0 = EinsteinTerm("x0")
    x1 = EinsteinTerm("x1")
    t = EinsteinTerm("t")

    assert variables == [rho[x0, x1, t], rhou0[x0, x1, t], rhou1[x0, x1, t]]

    return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号