CAMP 1.0.0
Chemistry Across Multiple Phases
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
camp_mechanism_data::mechanism_data_t Interface Reference

A chemical mechanism. More...

Collaboration diagram for camp_mechanism_data::mechanism_data_t:
Collaboration graph
[legend]

Public Member Functions

procedure load (this, json, j_obj)
 Load reactions from an input file.
 
procedure initialize (this, chem_spec_data, aero_rep_data, n_cells)
 Initialize the mechanism.
 
procedure name (this)
 Get the mechanism name.
 
procedure size (this)
 Get the size of the reaction database.
 
procedure get_rxn (this, rxn_id)
 Get a reaction by its index.
 
procedure pack_size (this, comm)
 Determine the number of bytes required to pack the given value.
 
procedure bin_pack (this, buffer, pos, comm)
 Packs the given value into the buffer, advancing position.
 
procedure bin_unpack (this, buffer, pos, comm)
 Unpacks the given value from the buffer, advancing position.
 
procedure print (this, file_unit)
 Print the mechanism data.
 
final finalize (this)
 Finalize the mechanism.
 

Public Attributes

character(len=:), allocatable mech_name
 Mechanism name.
 
character(len=:), allocatable fixed_file_prefix
 Path and prefix for fixed module output.
 
type(rxn_data_ptr), dimension(:), pointer rxn_ptr => null()
 Reactions.
 

Private Member Functions

procedure, private ensure_size (this, num_rxn)
 Ensure there is enough room in the reaction dataset to add a specified number of reactions.
 

Private Attributes

integer(kind=i_kind) num_rxn = 0
 Number of reactions.
 

Detailed Description

A chemical mechanism.

Instances of mechanism_data_t represent complete CAMP: Chemical Mechanism chemical mechanism. Multiple mechanisms may be used during one model run and will be solved simultaneously.

Definition at line 60 of file mechanism_data.F90.

Constructor & Destructor Documentation

◆ finalize()

final camp_mechanism_data::mechanism_data_t::finalize ( type(mechanism_data_t), intent(inout)  this)
final

Finalize the mechanism.

Parameters
[in,out]thisMechanism data

Definition at line 90 of file mechanism_data.F90.

Here is the call graph for this function:

Member Function/Subroutine Documentation

◆ bin_pack()

procedure camp_mechanism_data::mechanism_data_t::bin_pack ( class(mechanism_data_t), intent(in)  this,
character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  pos,
integer, intent(in)  comm 
)

Packs the given value into the buffer, advancing position.

Parameters
[in]thisChemical mechanism
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 84 of file mechanism_data.F90.

◆ bin_unpack()

procedure camp_mechanism_data::mechanism_data_t::bin_unpack ( class(mechanism_data_t), intent(inout)  this,
character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  pos,
integer, intent(in)  comm 
)

Unpacks the given value from the buffer, advancing position.

Parameters
[in,out]thisChemical mechanism
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 86 of file mechanism_data.F90.

◆ ensure_size()

procedure, private camp_mechanism_data::mechanism_data_t::ensure_size ( class(mechanism_data_t), intent(inout)  this,
integer(i_kind), intent(in)  num_rxn 
)
private

Ensure there is enough room in the reaction dataset to add a specified number of reactions.

Parameters
[in,out]thisChemical mechanism
[in]num_rxnNumber of new reactions to ensure space for

Definition at line 95 of file mechanism_data.F90.

◆ get_rxn()

procedure camp_mechanism_data::mechanism_data_t::get_rxn ( class(mechanism_data_t), intent(in)  this,
integer(kind=i_kind), intent(in)  rxn_id 
)

Get a reaction by its index.

Returns
Pointer to the reaction
Parameters
[in]thisMechanism data
[in]rxn_idReaction index

Definition at line 80 of file mechanism_data.F90.

◆ initialize()

procedure camp_mechanism_data::mechanism_data_t::initialize ( class(mechanism_data_t), intent(inout)  this,
type(chem_spec_data_t), intent(in)  chem_spec_data,
type(aero_rep_data_ptr), dimension(:), intent(in), pointer  aero_rep_data,
integer(kind=i_kind), intent(in)  n_cells 
)

Initialize the mechanism.

Parameters
[in,out]thisChemical mechanism
[in]chem_spec_dataChemical species data
[in]aero_rep_dataAerosol representation data
[in]n_cellsNumber of grid cells to solve simultaneously

Definition at line 74 of file mechanism_data.F90.

◆ load()

procedure camp_mechanism_data::mechanism_data_t::load ( class(mechanism_data_t), intent(inout)  this,
type(json_core), intent(in), pointer  json,
type(json_value), intent(in), pointer  j_obj 
)

Load reactions from an input file.

Parameters
[in,out]thisChemical mechanism
[in]jsonJSON core
[in]j_objJSON object

Definition at line 72 of file mechanism_data.F90.

◆ name()

procedure camp_mechanism_data::mechanism_data_t::name ( class(mechanism_data_t), intent(in)  this)

Get the mechanism name.

Returns
Name of the mechanism
Parameters
[in]thisChemical mechanism

Definition at line 76 of file mechanism_data.F90.

◆ pack_size()

procedure camp_mechanism_data::mechanism_data_t::pack_size ( class(mechanism_data_t), intent(in)  this,
integer, intent(in)  comm 
)

Determine the number of bytes required to pack the given value.

Parameters
[in]thisChemical mechanism
[in]commMPI communicator

Definition at line 82 of file mechanism_data.F90.

◆ print()

procedure camp_mechanism_data::mechanism_data_t::print ( class(mechanism_data_t), intent(in)  this,
integer(kind=i_kind), optional  file_unit 
)

Print the mechanism data.

Parameters
[in]thisChemical mechanism
file_unitFile unit for output

Definition at line 88 of file mechanism_data.F90.

◆ size()

procedure camp_mechanism_data::mechanism_data_t::size ( class(mechanism_data_t), intent(in)  this)

Get the size of the reaction database.

Parameters
[in]thisChemical mechanism

Definition at line 78 of file mechanism_data.F90.

Member Data Documentation

◆ fixed_file_prefix

character(len=:), allocatable camp_mechanism_data::mechanism_data_t::fixed_file_prefix

Path and prefix for fixed module output.

Definition at line 67 of file mechanism_data.F90.

◆ mech_name

character(len=:), allocatable camp_mechanism_data::mechanism_data_t::mech_name

Mechanism name.

Definition at line 65 of file mechanism_data.F90.

◆ num_rxn

integer(kind=i_kind) camp_mechanism_data::mechanism_data_t::num_rxn = 0
private

Number of reactions.

Definition at line 63 of file mechanism_data.F90.

◆ rxn_ptr

type(rxn_data_ptr), dimension(:), pointer camp_mechanism_data::mechanism_data_t::rxn_ptr => null()

Reactions.

Definition at line 69 of file mechanism_data.F90.


The documentation for this interface was generated from the following file: