Skip to content

Commit

Permalink
postproc
Browse files Browse the repository at this point in the history
  • Loading branch information
e-dub committed May 8, 2020
1 parent a36deba commit f1590a4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions DesOptPy/MainDesOpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,11 +794,14 @@ def gradient(self, x):
gLUActive = gLU[gLUActiveIndex]
gLUNablaActive = gLUNabla[gLUActiveIndex, :]
gLUActiveType = np.asarray(["Bound"]*np.size(gLUActive))

if np.size(gc) > 0:
gMaxIt = np.zeros([nIt])
for ii in range(len(gIt)):
gMaxIt[ii] = max(gIt[ii])
# THIS IS A STUPID FIX!!!!
for ii in range(nIt):
try:
gMaxIt[ii] = max(gIt[ii])
except:
gMaxIt[ii] = 0
gOpt = gIt[:, -1]
gActiveIndex = gOpt > -epsActive
gActive = gOpt[gActiveIndex]
Expand Down

0 comments on commit f1590a4

Please sign in to comment.