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

Allow custom jaxley solvers to have different nseg per branch #426

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

michaeldeistler
Copy link
Contributor

@michaeldeistler michaeldeistler commented Sep 19, 2024

Following #418, this will also allow different nseg per branch for the jaxley.thomas solver. This works by masking the tridiagonal system in every branch.

In addition, it also uses more invasively .comp_edges to build the conductances of the custom solver more easily. Before this PR, .comp_edges had only been used for the jax.sparse solver.

Replaces #425 which was closed due to difficult merge conflicts.

In addition, this contains a bugfix and closes #429.

@michaeldeistler michaeldeistler changed the title copy over code from new version of different-nseg Allow custom jaxley solvers to have different nseg per branch Sep 19, 2024
Base automatically changed from different-nseg to main September 20, 2024 00:22
@michaeldeistler michaeldeistler force-pushed the different-nseg-for-custom2 branch 9 times, most recently from c668807 to 9e782e3 Compare September 20, 2024 18:05
@michaeldeistler michaeldeistler force-pushed the different-nseg-for-custom2 branch 6 times, most recently from c501d08 to ff736a3 Compare September 23, 2024 22:01
Copy link
Contributor

@jnsbck jnsbck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactor. I like the line diff! 🗡️ Left a few comments. If tests pass and there are no issues, good to go from my side.

jaxley/modules/base.py Show resolved Hide resolved
jaxley/modules/base.py Show resolved Hide resolved
jaxley/modules/cell.py Show resolved Hide resolved
jaxley/modules/compartment.py Show resolved Hide resolved
jaxley/modules/base.py Show resolved Hide resolved
jaxley/modules/base.py Show resolved Hide resolved
jaxley/solver_voltage.py Show resolved Hide resolved
jaxley/solver_voltage.py Show resolved Hide resolved
jaxley/utils/cell_utils.py Outdated Show resolved Hide resolved
jaxley/utils/solver_utils.py Outdated Show resolved Hide resolved
@michaeldeistler michaeldeistler force-pushed the different-nseg-for-custom2 branch 2 times, most recently from 8d449de to dfdc887 Compare September 23, 2024 23:07
@michaeldeistler michaeldeistler merged commit e1338a5 into main Sep 23, 2024
1 check passed
@michaeldeistler michaeldeistler deleted the different-nseg-for-custom2 branch September 23, 2024 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The change in capacitance takes effect only at the branch(0), when len(parents) >1.
2 participants