Skip to content

Commit 8d43112

Browse files
gjkennedyewu63marcomangano
authored
fixed convertJacobian (#371)
* fixed the convertJacobian call when jacType == "csr" so that it returns CSR data instead of passing through * added inform values to the ParOpt wrapper --------- Co-authored-by: Ella Wu <[email protected]> Co-authored-by: Marco Mangano <[email protected]>
1 parent 5fef213 commit 8d43112

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pyoptsparse/pyOpt_optimizer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ def _convertJacobian(self, gcon_csr_in):
665665
self._jac_map_csr_to_csc = mapToCSC(gcon_csr)
666666
gcon = gcon_csr["csr"][IDATA][self._jac_map_csr_to_csc[IDATA]]
667667
elif self.jacType == "csr":
668-
pass
668+
gcon = gcon_csr["csr"][IDATA]
669669
elif self.jacType == "coo":
670670
gcon = convertToCOO(gcon_csr)
671671
gcon = gcon["coo"][IDATA]

pyoptsparse/pyParOpt/ParOpt.py

+2
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ def evalObjConGradient(self, x, g, A):
243243
# are switch since ParOpt uses a formulation with c(x) >= 0, while pyOpt
244244
# uses g(x) = -c(x) <= 0. Therefore the multipliers are reversed.
245245
sol_inform = {}
246+
sol_inform["value"] = None
247+
sol_inform["text"] = None
246248

247249
# If number of constraints is zero, ParOpt returns z as None.
248250
# Thus if there is no constraints, should pass an empty list

0 commit comments

Comments
 (0)