From 633f178bfa234a5d5459475fbeab89cfa2b6a22c Mon Sep 17 00:00:00 2001 From: Hans Ekkehard Plesser Date: Wed, 6 Mar 2024 08:56:07 +0100 Subject: [PATCH] astrocyte_lr_1994: Store result of expression evaluation in proper variable. --- models/astrocyte_lr_1994.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/astrocyte_lr_1994.cpp b/models/astrocyte_lr_1994.cpp index 4278bd7a3f..3e448bb5cf 100644 --- a/models/astrocyte_lr_1994.cpp +++ b/models/astrocyte_lr_1994.cpp @@ -83,11 +83,11 @@ astrocyte_lr_1994_dynamics( double time, const double y[], double f[], void* pno // shorthand for state variables const double& ip3 = y[ S::IP3 ]; - // Ca_tot_ corresponds to the c_0 (total [Ca++] in terms of cytosolic vol) - // in De Young & Keizer (1992) and Li & Rinzel (1994) - const double& calc = std::max( 0.0, std::min( y[ S::Ca_astro ], node.P_.Ca_tot_ ) ); // keep calcium within limits const double& h_ip3r = y[ S::h_IP3R ]; + // Ca_tot_ corresponds to the c_0 (total [Ca++] in terms of cytosolic vol) + // in De Young & Keizer (1992) and Li & Rinzel (1994) + const double calc = std::max( 0.0, std::min( y[ S::Ca_astro ], node.P_.Ca_tot_ ) ); // keep calcium within limits const double alpha_h_ip3r = node.P_.k_IP3R_ * node.P_.Kd_inh_ * ( ip3 + node.P_.Kd_IP3_1_ ) / ( ip3 + node.P_.Kd_IP3_2_ ); const double beta_h_ip3r = node.P_.k_IP3R_ * calc;