CAMP 1.0.0
Chemistry Across Multiple Phases
sub_models.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 sub model calculations
6 */
7/** \file
8 * \brief Header file for sub model functions
9 */
10#ifndef SUB_MODELS_H
11#define SUB_MODELS_H
12#include "Jacobian.h"
13#include "camp_common.h"
14
15// PD-FiTE activity
16void sub_model_PDFiTE_get_used_jac_elem(int *sub_model_int_data,
17 double *sub_model_float_data,
18 Jacobian *jac);
19void sub_model_PDFiTE_update_ids(int *sub_model_int_data,
20 double *sub_model_float_data, int *deriv_ids,
21 Jacobian jac);
22void sub_model_PDFiTE_update_env_state(int *sub_model_int_data,
23 double *sub_model_float_data,
24 double *sub_model_env_data,
25 ModelData *model_data);
26void sub_model_PDFiTE_calculate(int *sub_model_int_data,
27 double *sub_model_float_data,
28 double *sub_model_env_data,
29 ModelData *model_data);
30#ifdef CAMP_USE_SUNDIALS
31void sub_model_PDFiTE_get_jac_contrib(int *sub_model_int_data,
32 double *sub_model_float_data,
33 double *sub_model_env_data,
34 ModelData *model_data, realtype *J,
35 double time_step);
36#endif
37void sub_model_PDFiTE_print(int *sub_model_int_data,
38 double *sub_model_float_data);
39
40// UNIFAC
41void sub_model_UNIFAC_get_used_jac_elem(int *sub_model_int_data,
42 double *sub_model_float_data,
43 Jacobian *jac);
44void sub_model_UNIFAC_update_ids(int *sub_model_int_data,
45 double *sub_model_float_data, int *deriv_ids,
46 Jacobian jac);
47void sub_model_UNIFAC_update_env_state(int *sub_model_int_data,
48 double *sub_model_float_data,
49 double *sub_model_env_data,
50 ModelData *model_data);
51void sub_model_UNIFAC_calculate(int *sub_model_int_data,
52 double *sub_model_float_data,
53 double *sub_model_env_data,
54 ModelData *model_data);
55#ifdef CAMP_USE_SUNDIALS
56void sub_model_UNIFAC_get_jac_contrib(int *sub_model_int_data,
57 double *sub_model_float_data,
58 double *sub_model_env_data,
59 ModelData *model_data, realtype *J,
60 double time_step);
61#endif
62void sub_model_UNIFAC_print(int *sub_model_int_data,
63 double *sub_model_float_data);
64
65// ZSR_aerosol_water
66void sub_model_ZSR_aerosol_water_get_used_jac_elem(int *sub_model_int_data,
67 double *sub_model_float_data,
68 Jacobian *jac);
69void sub_model_ZSR_aerosol_water_update_ids(int *sub_model_int_data,
70 double *sub_model_float_data,
71 int *deriv_ids, Jacobian jac);
72void sub_model_ZSR_aerosol_water_update_env_state(int *sub_model_int_data,
73 double *sub_model_float_data,
74 double *sub_model_env_data,
75 ModelData *model_data);
76void sub_model_ZSR_aerosol_water_calculate(int *sub_model_int_data,
77 double *sub_model_float_data,
78 double *sub_model_env_data,
79 ModelData *model_data);
80#ifdef CAMP_USE_SUNDIALS
81void sub_model_ZSR_aerosol_water_get_jac_contrib(int *sub_model_int_data,
82 double *sub_model_float_data,
83 double *sub_model_env_data,
84 ModelData *model_data,
85 realtype *J, double time_step);
86#endif
87void sub_model_ZSR_aerosol_water_print(int *sub_model_int_data,
88 double *sub_model_float_data);
89
90#endif
Header for the Jacobian structure and related functions.
Header file for common constants and structures.
void sub_model_UNIFAC_get_jac_contrib(int *sub_model_int_data, double *sub_model_float_data, double *sub_model_env_data, ModelData *model_data, realtype *J, double time_step)
Add contributions to the Jacobian from derivates calculated using the output of this sub model.
void sub_model_ZSR_aerosol_water_get_used_jac_elem(int *sub_model_int_data, double *sub_model_float_data, Jacobian *jac)
Flag Jacobian elements used by this sub model.
void sub_model_PDFiTE_get_used_jac_elem(int *sub_model_int_data, double *sub_model_float_data, Jacobian *jac)
Flag Jacobian elements used by this sub model.
void sub_model_UNIFAC_update_ids(int *sub_model_int_data, double *sub_model_float_data, int *deriv_ids, Jacobian jac)
Update stored ids for elements used within a row of the Jacobian matrix.
void sub_model_PDFiTE_calculate(int *sub_model_int_data, double *sub_model_float_data, double *sub_model_env_data, ModelData *model_data)
Perform the sub-model calculations for the current model state.
void sub_model_UNIFAC_update_env_state(int *sub_model_int_data, double *sub_model_float_data, double *sub_model_env_data, ModelData *model_data)
Update sub-model data for new environmental conditions.
void sub_model_PDFiTE_get_jac_contrib(int *sub_model_int_data, double *sub_model_float_data, double *sub_model_env_data, ModelData *model_data, realtype *J, double time_step)
Add contributions to the Jacobian from derivates calculated using the output of this sub model.
void sub_model_PDFiTE_print(int *sub_model_int_data, double *sub_model_float_data)
Print the PDFiTE Activity sub model parameters.
void sub_model_ZSR_aerosol_water_calculate(int *sub_model_int_data, double *sub_model_float_data, double *sub_model_env_data, ModelData *model_data)
Do pre-derivative calculations.
void sub_model_UNIFAC_get_used_jac_elem(int *sub_model_int_data, double *sub_model_float_data, Jacobian *jac)
Get the Jacobian elements used for a particular row of the matrix.
void sub_model_ZSR_aerosol_water_print(int *sub_model_int_data, double *sub_model_float_data)
Print the ZSR Aerosol Water sub model parameters.
void sub_model_ZSR_aerosol_water_update_env_state(int *sub_model_int_data, double *sub_model_float_data, double *sub_model_env_data, ModelData *model_data)
Update sub model data for new environmental conditions.
void sub_model_UNIFAC_calculate(int *sub_model_int_data, double *sub_model_float_data, double *sub_model_env_data, ModelData *model_data)
Perform the sub-model calculations for the current model state.
void sub_model_ZSR_aerosol_water_get_jac_contrib(int *sub_model_int_data, double *sub_model_float_data, double *sub_model_env_data, ModelData *model_data, realtype *J, double time_step)
Add contributions to the Jacobian from derivates calculated using the output of this sub model.
void sub_model_UNIFAC_print(int *sub_model_int_data, double *sub_model_float_data)
Print the sub model data.
void sub_model_PDFiTE_update_ids(int *sub_model_int_data, double *sub_model_float_data, int *deriv_ids, Jacobian jac)
Update the time derivative and Jacbobian array indices.
void sub_model_PDFiTE_update_env_state(int *sub_model_int_data, double *sub_model_float_data, double *sub_model_env_data, ModelData *model_data)
Update sub model data for new environmental conditions.
void sub_model_ZSR_aerosol_water_update_ids(int *sub_model_int_data, double *sub_model_float_data, int *deriv_ids, Jacobian jac)
Update the time derivative and Jacbobian array indices.