test_fields.py 文件源码

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

项目:pyfds 作者: emtpb 项目源码 文件源码
def test_field_component_boundary_1():
    fc = fls.FieldComponent(100)
    fc.values = np.random.rand(100)
    fc.boundaries = [reg.Boundary(reg.LineRegion([5, 6, 7], [0, 0.2], 'test boundary'))]
    fc.boundaries[0].value = 23
    fc.apply_bounds(step=0)
    assert np.allclose(fc.values[[5, 6, 7]], [23, 23, 23])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号