(self, eid, kV, I, J, M)
| 92 | # }}} |
| 93 | #pythran export add_element(str, int, float list, int list, int list) |
| 94 | def add_element(self, eid, kV, I, J, M): # {{{ |
| 95 | E = self.elem[eid] |
| 96 | nAx = 2*E.node_a.id; nAy = nAx + 1 |
| 97 | nBx = 2*E.node_b.id; nBy = nBx + 1 |
| 98 | |
| 99 | I.append(nAx); J.append(nAx) |
| 100 | I.append(nAx); J.append(nAy) |
| 101 | I.append(nAx); J.append(nBx) |
| 102 | I.append(nAx); J.append(nBy) |
| 103 | |
| 104 | I.append(nAy); J.append(nAx) |
| 105 | I.append(nAy); J.append(nAy) |
| 106 | I.append(nAy); J.append(nBx) |
| 107 | I.append(nAy); J.append(nBy) |
| 108 | |
| 109 | I.append(nBx); J.append(nAx) |
| 110 | I.append(nBx); J.append(nAy) |
| 111 | I.append(nBx); J.append(nBx) |
| 112 | I.append(nBx); J.append(nBy) |
| 113 | |
| 114 | I.append(nBy); J.append(nAx) |
| 115 | I.append(nBy); J.append(nAy) |
| 116 | I.append(nBy); J.append(nBx) |
| 117 | I.append(nBy); J.append(nBy) |
| 118 | |
| 119 | kV.extend(E.stiffness_matrix().ravel()) |
| 120 | dof = np.array([2*E.node_a.id, 2*E.node_a.id+1, |
| 121 | 2*E.node_b.id, 2*E.node_b.id+1,]) |
| 122 | M[np.ix_(dof)] += E.mass_matrix() |
| 123 | # }}} |
| 124 | def __str__(self): # {{{ |
| 125 | S = self.print_summary(str=True) |
no test coverage detected