-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Description
In EP, we can specify different parameters for different domains. This works correctly for the conductivities but not for the conductances in the ionic model, where the conductances of all domains are set to the last domain's conductance.
Reproduction
This mwe.zip is a simple test on a slab split into 3 domains.

I considered a set of "fast" conductances
<G_Na> 29.68 </G_Na>
<G_CaL> 7.96e-5 </G_CaL>
<G_Kr> 0.31 </G_Kr>
and slow conductances
<G_Na> 29.68 </G_Na>
<G_CaL> 7.96e-5 </G_CaL>
<G_Kr> 0.31 </G_Kr>
I ran two problems: one with the fast conductance in domains 1 and 2, and the other with the slow conductance in domains 1 and 2. Domain 3, the last one in the .xml, was assigned the fast conductance in both cases.
The difference between the two simulations is exactly zero, indicating they used the same parameters, even though different parameters were specified.
Expected behavior
The ionic variables should be domain dependent. The issue is in read_files.cpp, in the read_cep_domain function, lines 1004-1008,
if (domain_params->G_Na.defined()) { cep_mod.ttp.G_Na = domain_params->G_Na.value(); }
if (domain_params->G_Kr.defined()) { cep_mod.ttp.G_Kr = domain_params->G_Kr.value(); }
if (domain_params->G_Ks.defined()) { cep_mod.ttp.G_Ks[lDmn.cep.imyo - 1] = domain_params->G_Ks.value(); }
if (domain_params->G_to.defined()) { cep_mod.ttp.G_to[lDmn.cep.imyo - 1] = domain_params->G_to.value(); }
if (domain_params->G_CaL.defined()) { cep_mod.ttp.G_CaL = domain_params->G_CaL.value(); }
where these parameters are assigned to the instance cep_mod.ttp, which is a global instance and not domain-dependent.
A fix would be to create a domain-dependent instance of ttp. Something similar is already done for other EP variables, such as the stimuli and conductivity, see line 971 for example
lDmn.cep.Diso = domain_params->isotropic_conductivity();
Lastly, there should be a test that checks the domain conductances/other domain dependent parameters.
Additional context
This is somewhat related to this issue, but this fix should be more straightforward. I discussed this with @kko27, and we think it's easier to fix this before he does a PR with his changes.
Code of Conduct
- I agree to follow this project's Code of Conduct and Contributing Guidelines