Skip to content

Commit

Permalink
block unsupported use of set_solve_type (#3117)
Browse files Browse the repository at this point in the history
- Partially solves #1718 in that it blocks attempts to use set_solve_type after nodes have been allocated, which did not work.
- A better solution (still needed) would be to allow reallocating e.g. 1D nodes to 3D or vice-versa.
  • Loading branch information
ramcdougal authored Oct 3, 2024
1 parent 51bb95d commit 19dbd47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions share/lib/python/neuron/rxd/rxd.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ def set_solve_type(domain=None, dimension=None, dx=None, nsubseg=None, method=No
domain -- a section or Python iterable of sections"""

global _dimensions_default, _dimensions

if initializer.is_initialized():
raise RxDException("set_solve_type must be called before any access to nodes.")

setting_default = False
if domain is None:
domain = h.allsec()
Expand Down

0 comments on commit 19dbd47

Please sign in to comment.