17#define TEMPERATURE_K_ env_data[0]
18#define PRESSURE_PA_ env_data[1]
20#define RXN_ID_ (int_data[0])
21#define SPECIES_ (int_data[1] - 1)
22#define DERIV_ID_ int_data[2]
23#define SCALING_ float_data[0]
24#define RATE_ (rxn_env_data[0])
25#define BASE_RATE_ (rxn_env_data[1])
26#define NUM_INT_PROP_ 3
27#define NUM_FLOAT_PROP_ 1
28#define NUM_ENV_PARAM_ 2
38 int *int_data = rxn_int_data;
39 double *float_data = rxn_float_data;
54 double *rxn_float_data) {
55 int *int_data = rxn_int_data;
56 double *float_data = rxn_float_data;
83 double *rxn_float_data,
double *rxn_env_data) {
84 int *int_data = rxn_int_data;
85 double *float_data = rxn_float_data;
87 int *rxn_id = (
int *)update_data;
88 double *base_rate = (
double *)&(rxn_id[1]);
110 double *rxn_float_data,
111 double *rxn_env_data) {
112 int *int_data = rxn_int_data;
113 double *float_data = rxn_float_data;
132#ifdef CAMP_USE_SUNDIALS
135 int *rxn_int_data,
double *rxn_float_data,
136 double *rxn_env_data, realtype time_step) {
137 int *int_data = rxn_int_data;
138 double *float_data = rxn_float_data;
159#ifdef CAMP_USE_SUNDIALS
161 int *rxn_int_data,
double *rxn_float_data,
162 double *rxn_env_data, realtype time_step) {
163 int *int_data = rxn_int_data;
164 double *float_data = rxn_float_data;
180 int *int_data = rxn_int_data;
181 double *float_data = rxn_float_data;
183 printf(
"\n\nEmission reaction\n");
193 int *update_data = (
int *)malloc(
sizeof(
int) +
sizeof(double));
194 if (update_data == NULL) {
195 printf(
"\n\nERROR allocating space for emission update data\n\n");
198 return (
void *)update_data;
209 int *new_rxn_id = (
int *)update_data;
210 double *new_base_rate = (
double *)&(new_rxn_id[1]);
211 *new_rxn_id = rxn_id;
212 *new_base_rate = base_rate;
void rxn_emission_get_used_jac_elem(int *rxn_int_data, double *rxn_float_data, Jacobian *jac)
Flag Jacobian elements used by this reaction.
void rxn_emission_calc_deriv_contrib(ModelData *model_data, TimeDerivative time_deriv, int *rxn_int_data, double *rxn_float_data, double *rxn_env_data, realtype time_step)
Calculate contributions to the time derivative from this reaction.
void rxn_emission_update_ids(ModelData *model_data, int *deriv_ids, Jacobian jac, int *rxn_int_data, double *rxn_float_data)
Update the time derivative and Jacbobian array indices.
void rxn_emission_set_rate_update_data(void *update_data, int rxn_id, double base_rate)
Set rate update data.
void rxn_emission_print(int *rxn_int_data, double *rxn_float_data)
Print the reaction parameters.
bool rxn_emission_update_data(void *update_data, int *rxn_int_data, double *rxn_float_data, double *rxn_env_data)
Update reaction data.
void rxn_emission_calc_jac_contrib(ModelData *model_data, Jacobian jac, int *rxn_int_data, double *rxn_float_data, double *rxn_env_data, realtype time_step)
Calculate contributions to the Jacobian from this reaction.
void * rxn_emission_create_rate_update_data()
Create update data for new emission rates.
void rxn_emission_update_env_state(ModelData *model_data, int *rxn_int_data, double *rxn_float_data, double *rxn_env_data)
Update reaction data for new environmental conditions.
void time_derivative_add_value(TimeDerivative time_deriv, unsigned int spec_id, long double rate_contribution)
Add a contribution to the time derivative.