This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was just experimenting this morning and made a few changes to get
python3-eispice
to build and run the demo code:I thought it might be useful for others. Although I must say what I did is pretty kludgey, so do feel free to do it better if you prefer.
Update: I have also fixed a bug that prevented repeated solving from working when there were nonlinear sources.
This is what I was trying to do:
The second solve was failing because of a missing initialization in the nonlinear current source code.
Basically when the device code (e.g. nonlinear current source) wants to update the MNA matrix (MNA = Modified Node Analysis), instead of overwriting a cell it always adds / subtracts something to the cell, that's because it doesn't know if another device might be manipulating the same cell, so it needs to be transparent in that case. Therefore, it always remembers what it last "wrote" to the cell and if it wants to "write" a new value to the cell, it adds the difference between new and old values.
What the extra initialization does is to zero the saved copy of what was last "written" to the cell -- since matrix was also zeroed.