Skip to content

Commit b28164c

Browse files
committed
Small fixes
1 parent 56b848f commit b28164c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

python/sav_solver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def check_sizes(self):
5252
# Check that all matrices and operator provided to describe the
5353
# system are of the right dimensions
5454
x = np.zeros(self.model.N)
55-
u = np.zeros((self.model.N, self.model.Nu))
55+
u = np.zeros((self.model.Nu))
5656
J0x = np.zeros(self.model.N)
5757
try:
5858
J0x = self.model.J0 * x
@@ -245,7 +245,7 @@ def P_ext(self, pnow, pnext, G, u):
245245
number: P_ext^{n+1/2}
246246
"""
247247
mutv = (pnow + pnext) / (2 * self.model.M)
248-
return -mutv.dot(G * u)
248+
return -mutv.dot(G @ u)
249249

250250
def P_tot(self, Enow, Enext, pnow, pnext, Rmid, G, u):
251251
"""Returns the discrete power balance. Should be zero up to

0 commit comments

Comments
 (0)