Skip to content

Commit

Permalink
Fixed an issue where the mass matrix was not being update when set() …
Browse files Browse the repository at this point in the history
…is used.
  • Loading branch information
zaidmahmood committed Sep 20, 2023
1 parent f161574 commit 3c29ef4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion andes/core/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ def set(self, src, idx, attr, value):
for state in self.states.values():
if (state.t_const is instance) and len(state.a) > 0:
self.system.dae.Tf[state.a[uid]] = instance.v[uid]

uid_int = state.a[uid].item()
self.system.TDS.Teye[uid_int, uid_int] = instance.v[uid]
return True

def alter(self, src, idx, value):
Expand Down

0 comments on commit 3c29ef4

Please sign in to comment.