CAMP 1.0.0
Chemistry Across Multiple Phases
|
The mechanism_data_t structure and associated subroutines. More...
Data Types | |
type | mechanism_data_ptr |
Pointer type for building arrays. More... | |
interface | mechanism_data_t |
A chemical mechanism. More... | |
Functions/Subroutines | |
type(mechanism_data_t) function, pointer | constructor (mech_name, init_size) |
Constructor for mechanism_data_t. | |
subroutine | ensure_size (this, num_rxn) |
Ensure there is enough room in the reaction dataset to add a specified number of reactions. | |
subroutine | load (this, json, j_obj) |
Load a chemical mechanism from an input file. | |
subroutine | initialize (this, chem_spec_data, aero_rep_data, n_cells) |
Initialize the mechanism. | |
integer(kind=i_kind) function | get_size (this) |
Get the current size of the chemical mechanism. | |
class(rxn_data_t) function, pointer | get_rxn (this, rxn_id) |
Get a reaction by its index. | |
character(len=:) function, allocatable | get_name (this) |
Get the name of the mechanism. | |
integer(kind=i_kind) function | pack_size (this, comm) |
Determine the size of a binary required to pack the mechanism. | |
subroutine | bin_pack (this, buffer, pos, comm) |
Pack the given value to the buffer, advancing position. | |
subroutine | bin_unpack (this, buffer, pos, comm) |
Unpack the given value to the buffer, advancing position. | |
subroutine | do_print (this, file_unit) |
Print the mechanism data. | |
elemental subroutine | finalize (this) |
Finalize the mechanism. | |
elemental subroutine | dereference (this) |
Dereference a pointer to a mechanism. | |
elemental subroutine | ptr_finalize (this) |
Finalize a pointer to mechanism data. | |
Variables | |
integer(kind=i_kind), parameter | realloc_inc = 50 |
Reallocation increment. | |
integer(kind=i_kind), parameter | mech_file_unit = 16 |
Fixed module file unit. | |
The mechanism_data_t structure and associated subroutines.
|
private |
Pack the given value to the buffer, advancing position.
[in] | this | Chemical mechanism |
[in,out] | buffer | Memory buffer |
[in,out] | pos | Current buffer position |
[in] | comm | MPI communicator |
Definition at line 339 of file mechanism_data.F90.
|
private |
Unpack the given value to the buffer, advancing position.
[in,out] | this | Chemical mechanism |
[in,out] | buffer | Memory buffer |
[in,out] | pos | Current buffer position |
[in] | comm | MPI communicator |
Definition at line 370 of file mechanism_data.F90.
type(mechanism_data_t) function, pointer camp_mechanism_data::constructor | ( | character(len=*), intent(in), optional | mech_name, |
integer(i_kind), intent(in), optional | init_size | ||
) |
Constructor for mechanism_data_t.
[in] | mech_name | Name of the mechanism |
[in] | init_size | Number of reactions to allocate space for initially |
Definition at line 118 of file mechanism_data.F90.
|
private |
Dereference a pointer to a mechanism.
[in,out] | this | Pointer to the mechanism |
Definition at line 440 of file mechanism_data.F90.
|
private |
Print the mechanism data.
[in] | this | Chemical mechanism |
file_unit | File unit for output |
Definition at line 401 of file mechanism_data.F90.
|
private |
Ensure there is enough room in the reaction dataset to add a specified number of reactions.
[in,out] | this | Chemical mechanism |
[in] | num_rxn | Number of new reactions to ensure space for |
Definition at line 146 of file mechanism_data.F90.
|
private |
Finalize the mechanism.
[in,out] | this | Mechanism data |
Definition at line 426 of file mechanism_data.F90.
|
private |
Get the name of the mechanism.
[in] | this | Chemical mechanism |
Definition at line 304 of file mechanism_data.F90.
|
private |
Get a reaction by its index.
[in] | this | Mechanism data |
[in] | rxn_id | Reaction index |
Definition at line 284 of file mechanism_data.F90.
|
private |
Get the current size of the chemical mechanism.
[in] | this | Chemical mechanism |
Definition at line 272 of file mechanism_data.F90.
|
private |
Initialize the mechanism.
[in,out] | this | Chemical mechanism |
[in] | chem_spec_data | Chemical species data |
[in] | aero_rep_data | Aerosol representation data |
[in] | n_cells | Number of grid cells to solve simultaneously |
Definition at line 248 of file mechanism_data.F90.
|
private |
Load a chemical mechanism from an input file.
[in,out] | this | Chemical mechanism |
[in] | json | JSON core |
[in] | j_obj | JSON object |
Definition at line 193 of file mechanism_data.F90.
|
private |
Determine the size of a binary required to pack the mechanism.
[in] | this | Chemical mechanism |
[in] | comm | MPI communicator |
Definition at line 318 of file mechanism_data.F90.
|
private |
Finalize a pointer to mechanism data.
[in,out] | this | Pointer to mechanism data |
Definition at line 452 of file mechanism_data.F90.
|
private |
Fixed module file unit.
Definition at line 53 of file mechanism_data.F90.
|
private |
Reallocation increment.
Definition at line 51 of file mechanism_data.F90.