Skip to content

Commit

Permalink
Print already has a newline
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlarson1 committed Oct 28, 2024
1 parent 3da3ae9 commit e12c6f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pounders/py/pounders.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def pounders(Ffun, X_0, n, nf_max, g_tol, delta_0, m, Low, Upp, Prior=None, Opti
eps = np.finfo(float).eps # Define machine epsilon
if printf:
print(" nf delta fl np f0 g0 ierror")
progstr = "%4i %9.2e %2i %3i %11.5e %12.4e %11.3e\n" # Line-by-line
progstr = "%4i %9.2e %2i %3i %11.5e %12.4e %11.3e" # Line-by-line
if Prior["nfs"] == 0:
X = np.vstack((X_0, np.zeros((nf_max - 1, n))))
F = np.zeros((nf_max, m))
Expand All @@ -176,7 +176,7 @@ def pounders(Ffun, X_0, n, nf_max, g_tol, delta_0, m, Low, Upp, Prior=None, Opti
X, F, hF, flag = prepare_outputs_before_return(X, F, hF, nf, -3)
return X, F, hF, flag, xk_in
if printf:
print("%4i Initial point %11.5e\n" % (nf, hfun(F[nf, :])))
print("%4i Initial point %11.5e" % (nf, hfun(F[nf, :])))
else:
X = np.vstack((Prior["X_init"], np.zeros((nf_max, n))))
F = np.vstack((Prior["F_init"], np.zeros((nf_max, m))))
Expand Down Expand Up @@ -205,7 +205,7 @@ def pounders(Ffun, X_0, n, nf_max, g_tol, delta_0, m, Low, Upp, Prior=None, Opti
return X, F, hF, flag, xk_in
hF[nf] = hfun(F[nf])
if printf:
print("%4i Geometry point %11.5e\n" % (nf, hF[nf]))
print("%4i Geometry point %11.5e" % (nf, hF[nf]))
D = Mdir[i, :]
Res[nf, :] = (F[nf, :] - Cres) - 0.5 * D @ np.tensordot(D.T, Hres, 1)
if nf + 1 >= nf_max:
Expand Down Expand Up @@ -256,7 +256,7 @@ def pounders(Ffun, X_0, n, nf_max, g_tol, delta_0, m, Low, Upp, Prior=None, Opti
return X, F, hF, flag, xk_in
hF[nf] = hfun(F[nf])
if printf:
print("%4i Critical point %11.5e\n" % (nf, hF[nf]))
print("%4i Critical point %11.5e" % (nf, hF[nf]))
if nf + 1 >= nf_max:
break
# Recalculate gradient based on a MFN model
Expand Down Expand Up @@ -376,7 +376,7 @@ def pounders(Ffun, X_0, n, nf_max, g_tol, delta_0, m, Low, Upp, Prior=None, Opti
return X, F, hF, flag, xk_in
hF[nf] = hfun(F[nf])
if printf:
print("%4i Model point %11.5e\n" % (nf, hF[nf]))
print("%4i Model point %11.5e" % (nf, hF[nf]))
if hF[nf] < hF[xk_in]: # ! Eventually check stuff decrease here
if printf:
print("**improvement from model point****")
Expand Down

0 comments on commit e12c6f0

Please sign in to comment.