/* There are a total of 0 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 2 entries in the constant variable array. */ /* * VOI is t in component main (dimensionless). * STATES[0] is y in component main (dimensionless). * CONSTANTS[0] is a in component main (dimensionless). * CONSTANTS[1] is b in component main (dimensionless). * RATES[0] is d/dt y in component main (dimensionless). * There are a total of 0 condition variables. */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 5; CONSTANTS[0] = 1; CONSTANTS[1] = 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[0]*STATES[0]+CONSTANTS[1]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { } 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) { }