CAMP 1.0.0
Chemistry Across Multiple Phases
rxn_solver.h
Go to the documentation of this file.
1/* Copyright (C) 2021 Barcelona Supercomputing Center and University of
2 * Illinois at Urbana-Champaign
3 * SPDX-License-Identifier: MIT
4 *
5 * Header file for rxn_solver.c
6 *
7 */
8/** \file
9 * \brief Header file for abstract reaction functions
10 */
11#ifndef RXN_SOLVER_H
12#define RXN_SOLVER_H
13#include "Jacobian.h"
14#include "camp_common.h"
15
16/** Public reaction functions **/
17
18/* Solver functions */
19void rxn_get_used_jac_elem(ModelData *model_data, Jacobian *jac);
20void rxn_update_ids(ModelData *model_data, int *deriv_ids, Jacobian jac);
21void rxn_update_env_state(ModelData *model_data);
23void rxn_adjust_state(ModelData *model_data);
24void rxn_print_data(void *solver_data);
25#ifdef CAMP_USE_SUNDIALS
26void rxn_calc_deriv(ModelData *model_data, TimeDerivative time_deriv,
27 double time_step);
29 TimeDerivative time_deriv, double time_step);
30void rxn_calc_jac(ModelData *model_data, Jacobian jac, double time_step);
32 double time_step);
33// void rxn_calc_jac_specific_types(ModelData *model_data, double *J_data,
34// double time_step)
35#endif
36
37/* Setup functions */
38void rxn_add_condensed_data(int rxn_type, int n_int_param, int n_float_param,
39 int n_env_param, int *int_param,
40 double *float_param, void *solver_data);
41
42/* Update data functions */
43void rxn_update_data(int cell_id, int *rxn_id, int update_rxn_type,
44 void *update_data, void *solver_data);
45void rxn_free_update_data(void *update_data);
46
47#endif
Header for the Jacobian structure and related functions.
Header file for common constants and structures.
void rxn_update_ids(ModelData *model_data, int *deriv_ids, Jacobian jac)
Update the time derivative and Jacobian array ids.
Definition rxn_solver.c:131
void rxn_calc_deriv_specific_types(ModelData *model_data, TimeDerivative time_deriv, double time_step)
void rxn_reset_state_adjustments(ModelData *model_data)
void rxn_add_condensed_data(int rxn_type, int n_int_param, int n_float_param, int n_env_param, int *int_param, double *float_param, void *solver_data)
Add condensed data to the condensed data block of memory.
Definition rxn_solver.c:658
void rxn_calc_deriv(ModelData *model_data, TimeDerivative time_deriv, double time_step)
void rxn_print_data(void *solver_data)
Print the reaction data.
Definition rxn_solver.c:769
void rxn_free_update_data(void *update_data)
Free an update data object.
Definition rxn_solver.c:851
void rxn_get_used_jac_elem(ModelData *model_data, Jacobian *jac)
Get the Jacobian elements used by a particular reaction.
Definition rxn_solver.c:42
void rxn_calc_jac(ModelData *model_data, Jacobian jac, double time_step)
void rxn_update_env_state(ModelData *model_data)
Update reaction data for new environmental state.
Definition rxn_solver.c:224
void rxn_update_data(int cell_id, int *rxn_id, int update_rxn_type, void *update_data, void *solver_data)
Update reaction data.
Definition rxn_solver.c:708
void rxn_calc_jac_specific_types(ModelData *model_data, Jacobian jac, double time_step)
void rxn_adjust_state(ModelData *model_data)