Skip to content
Snippets Groups Projects
Commit fa7d99b6 authored by Ben Cumming's avatar Ben Cumming Committed by Sam Yates
Browse files

support ion species concentration updates (#398)

* Add querying methods to modcc ion species type to simplify code generation.
* Add `WriteBack` type that records per-mechanism ion usage metadata.
* Add `write_back` implementation for C and CUDA printers that adds weighted concentration
  contributions to global concentration fields.
* Extend `uses_ion` interface to provide information about which concentration fields are modified by mechanisms.
* Update `update_ion_symbols` lambda that is responsible for adding metadata about interactions between mechanism fields and external ion species fields, creating a write-back when the mechanism field is a state variable or an indexed variable if it is a current/reversal potential, or else an error.
* Add `test_ca.mod` mechanism that writes calcium ion concentration for testing purposes.
* Add back-end callbacks that initialize concentration values.
* Update `mechanism::uses_ion()` to return information regarding mechanism ion concentration updates.
* Add `mechanism::write_back()` method.
* Update stimulus mechanism specialization to use new mechanism interface.
* Update `ion` type to calculate default concentration contributions in CVs where the concentration is only partially determined by mechanisms.
* Update `fvm_multicell` to calculate the default ion concentration weights.
* Add unit test for ion concentration weight determination.

Fixes #373 
parent 998ee724
No related branches found
No related tags found
No related merge requests found
Showing
with 525 additions and 243 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment