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

Pad den jac with columns #79

Closed
rzyu45 opened this issue Jun 2, 2024 · 1 comment · Fixed by #87
Closed

Pad den jac with columns #79

rzyu45 opened this issue Jun 2, 2024 · 1 comment · Fixed by #87
Assignees
Labels
bug Something isn't working

Comments

@rzyu45
Copy link
Member

rzyu45 commented Jun 2, 2024

In the m3b9 example, I obtained the following statement

J_[3:6,0:1] += -376.991118430775*Tj[0]*ones(3)/(Tj[0] + Tj[1] + Tj[2])

Since the left hand side is an array with shape (3, 1) while the right hand side has shape (3, 0).
The += operator first adds these two parts for an array with shape (3, 3).
Then the (3, 3) array is assigned to J_[3:6,0:1], which raises the following error

ValueError: non-broadcastable output operand with shape (3,1) doesn't match the broadcast shape (3,3)
@rzyu45 rzyu45 added the bug Something isn't working label Jun 2, 2024
@rzyu45 rzyu45 self-assigned this Jun 2, 2024
rzyu45 added a commit to rzyu45/Solverz-dev that referenced this issue Aug 4, 2024
@rzyu45
Copy link
Member Author

rzyu45 commented Aug 4, 2024

This is resolved by parsing dense variable address of scalar variable to be integer.
Now we have

J_[3:6,1] += -376.991118430775*Tj[0]*ones(3)/(Tj[0] + Tj[1] + Tj[2])

@rzyu45 rzyu45 linked a pull request Aug 5, 2024 that will close this issue
@rzyu54 rzyu54 closed this as completed in 862ac52 Aug 6, 2024
rzyu54 added a commit that referenced this issue Aug 7, 2024
* Enable sicnm and Hessian-vector product (#91)

* To deploy docs only in the default repo

* To deploy docs only in the default repo

* feat: add inline hvp

* feat: fix hvp initializer

* test: add the hvp test.

* feat: add the module printer of hvp

* test: add hvp module generator tests

* fix: to sort jac blocks in lecico order

* fix: simplify the `dae.M` property

Deprecate expr in variable slice

* feat: add the sicnm solver

* fix: resolve typos in sicnm

* fix: resolve typos in scinm

* fix: resolve sicnm typos

* ENH: try spsolve_triangular() in scipy 1.14.0

* feat: add octave code printers

'Mat_Mul', 'Diag' and `Sign`

* feat: add heaviside func

* feat: add event detection in scinm

* feat: add `ln`

* EHN: improve stats of sicnm and nr

* EHN: improve `lm.stats`

* EHN: improve `cnr.stats`

* feat: add __repr__ of `sol` class

* Update doc-deploy.yml

* To deploy docs only in the default repo

* Update doc-deploy.yml

* Update doc-deploy.yml

* update workflow trigger

* Update doc-deploy.yml

* fix: prepare Solverz for numpy 2.0

* fix: resolve issues arose from scipy compabaility

* remove matplotlib requirement

* fix: deprecate explicit call of matplotlib

* Revert "remove matplotlib requirement"

This reverts commit 00bdfd7.

* fix: update fdaesolver

* fix: resolve #79

* doc: add docstring of `sicnm()`

Resolves #86

* docs: add `HVP` in gettingstarted.md

Resolve #77.

* docs: fix typos

---------

Co-authored-by: Ruizhi Yu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant