本文整理汇总了Python中pyNastran.bdf.bdf.BDF.fill_dmigs方法的典型用法代码示例。如果您正苦于以下问题:Python BDF.fill_dmigs方法的具体用法?Python BDF.fill_dmigs怎么用?Python BDF.fill_dmigs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyNastran.bdf.bdf.BDF
的用法示例。
在下文中一共展示了BDF.fill_dmigs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_dmig_09
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import fill_dmigs [as 别名]
def test_dmig_09(self):
cards = [
['DMIG, A, 0, 9, 1, 1, , , 1'],
['DMIG, A, 1, , , 2, 1, 1.0,'],
['DMIG, A, 1, , , 2, 2, 1.0,'],
['DMIG, A, 1, , , 2, 3, 1.0,'],
]
model = BDF(debug=False)
for card_lines in cards:
model.add_card(card_lines, 'DMIG', is_list=False)
model.fill_dmigs()
a_matrix = model.dmigs['A']
assert len(a_matrix.GCi) == 3, 'len(GCi)=%s GCi=%s matrix=\n%s' % (len(a_matrix.GCi), a_matrix.GCi, a_matrix)
assert len(a_matrix.GCj) == 3, 'len(GCj)=%s GCj=%s matrix=\n%s' % (len(a_matrix.GCj), a_matrix.GCj, a_matrix)
示例2: test_dmig_10
# 需要导入模块: from pyNastran.bdf.bdf import BDF [as 别名]
# 或者: from pyNastran.bdf.bdf.BDF import fill_dmigs [as 别名]
def test_dmig_10(self):
"""symmetric"""
cards = [
['DMIG,AMTRXX,0,6,1,0'],
['DMIG,AMTRXX,2,1, ,2,1,201.0, ,+DM1',
'+DM1,2,3,203.0'],
['DMIG,AMTRXX,3,1, ,3,1,301.0, ,+DM2',
'+DM2,3,3,303.0'],
]
model = BDF(debug=False)
for card_lines in cards:
model.add_card(card_lines, 'DMIG', is_list=False)
model.fill_dmigs()
a_matrix = model.dmigs['AMTRXX']
assert len(a_matrix.GCi) == 4, 'len(GCi)=%s GCi=%s matrix=\n%s' % (len(a_matrix.GCi), a_matrix.GCi, a_matrix)
assert len(a_matrix.GCj) == 4, 'len(GCj)=%s GCj=%s matrix=\n%s' % (len(a_matrix.GCj), a_matrix.GCj, a_matrix)
assert a_matrix.shape == (4, 4), 'shape=%s' % str(a_matrix.shape)
a_matrix.get_matrix()