Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed convertJacobian #371

Merged
merged 4 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyoptsparse/pyOpt_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@
self._jac_map_csr_to_csc = mapToCSC(gcon_csr)
gcon = gcon_csr["csr"][IDATA][self._jac_map_csr_to_csc[IDATA]]
elif self.jacType == "csr":
pass
gcon = gcon_csr["csr"][IDATA]

Check warning on line 668 in pyoptsparse/pyOpt_optimizer.py

View check run for this annotation

Codecov / codecov/patch

pyoptsparse/pyOpt_optimizer.py#L668

Added line #L668 was not covered by tests
elif self.jacType == "coo":
gcon = convertToCOO(gcon_csr)
gcon = gcon["coo"][IDATA]
Expand Down
2 changes: 2 additions & 0 deletions pyoptsparse/pyParOpt/ParOpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ def evalObjConGradient(self, x, g, A):
# are switch since ParOpt uses a formulation with c(x) >= 0, while pyOpt
# uses g(x) = -c(x) <= 0. Therefore the multipliers are reversed.
sol_inform = {}
sol_inform["value"] = None
sol_inform["text"] = None

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