我用scipy.sparse.diags
函数找到了两个矩阵(质量和刚度),并将其中一个从另一个(质量-刚度)中拿走。当尝试用一个向量U0
乘以这个新矩阵时,我得到了以下结果
[ <6x6 sparse matrix of type '<type 'numpy.float64'>'
with 16 stored elements in Compressed Sparse Row format>
<6x6 sparse matrix of type '<type 'numpy.float64'>'
with 16 stored elements in Compressed Sparse Row format>
<6x6 sparse matrix of type '<type 'numpy.float64'>'
with 16 stored elements in Compressed Sparse Row format>
<6x6 sparse matrix of type '<type 'numpy.float64'>'
with 16 stored elements in Compressed Sparse Row format>
<6x6 sparse matrix of type '<type 'numpy.float64'>'
with 16 stored elements in Compressed Sparse Row format>
<6x6 sparse matrix of type '<type 'numpy.float64'>'
with 16 stored elements in Compressed Sparse Row format>]
我真的不明白这个结果-我得到的是一个由6个矩阵组成的一维数组吗?如果是这样,为什么我得到这个而不是一个简单的向量?在
下面是创建质量/刚度矩阵的代码,找到U0
,然后得到点积
我会很感激你的帮助,因为我已经被困在这几个小时了。在
编辑:一些附加信息
顶部的6x6矩阵在我打电话后收到 时间步进([0,0.2,0.5,0.6,0.9,1],1,1,5)
也就是说,x0只是域0到1的一个分区。θ,T和m都是无关的,因为我还没有把它添加到函数中。在
目前没有回答
相关问题 更多 >
编程相关推荐