/* There are a total of 1 entries in the algebraic variable array. There are a total of 1 entries in each of the rate and state variable arrays. There are a total of 6 entries in the constant variable array. */ /* * VOI is t in component y_channel (millisecond). * STATES[0] is y in component y_channel (dimensionless). * CONSTANTS[0] is V in component y_channel (millivolt). * CONSTANTS[1] is E_y in component y_channel (millivolt). * ALGEBRAIC[0] is i_y in component y_channel (microA_per_cm2). * CONSTANTS[2] is g_y in component y_channel (milliS_per_cm2). * CONSTANTS[3] is gamma in component y_channel (dimensionless). * CONSTANTS[4] is alpha_y in component y_channel (per_millisecond). * CONSTANTS[5] is beta_y in component y_channel (per_millisecond). * RATES[0] is d/dt y in component y_channel (dimensionless). * There are a total of 0 condition variables. */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 0; CONSTANTS[0] = 0; CONSTANTS[1] = -85; CONSTANTS[2] = 36; CONSTANTS[3] = 4; CONSTANTS[4] = 1; CONSTANTS[5] = 2; RATES[0] = 0.1001; } void computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { resid[0] = RATES[0] - CONSTANTS[4]*(1.00000 - STATES[0]) - CONSTANTS[5]*STATES[0]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[0] = CONSTANTS[2]*pow(STATES[0], CONSTANTS[3])*(CONSTANTS[0] - CONSTANTS[1]); } void computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { } void getStateInformation(double* SI) { SI[0] = 1.0; } void computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { }