CAMP 1.0.0
Chemistry Across Multiple Phases
Data Types | Functions/Subroutines | Variables
camp_camp_solver_data Module Reference

The camp_solver_data_t structure and associated subroutines. More...

Data Types

interface  aero_phase_add_condensed_data
 Add condensed aerosol phase data to the solver data block. More...
 
interface  aero_phase_print_data
 Print the solver data. More...
 
interface  aero_rep_add_condensed_data
 Add condensed aerosol representation data to the solver data block. More...
 
interface  aero_rep_print_data
 Print the aerosol representation data. More...
 
interface  aero_rep_update_data
 Update aerosol representation data. More...
 
interface  camp_solver_data_t
 Solver data. More...
 
interface  rxn_add_condensed_data
 Add condensed reaction data to the solver data block. More...
 
interface  rxn_print_data
 Print the solver data. More...
 
interface  rxn_update_data
 Update reaction data. More...
 
interface  solver_free
 Free the memory associated with a solver. More...
 
interface  solver_get_statistics
 Get the solver statistics. More...
 
interface  solver_initialize
 Solver initialization. More...
 
interface  solver_new
 Interface to c ODE solver functions. More...
 
interface  solver_reset_timers
 Reset the solver function timers. More...
 
interface  solver_run
 Run the solver. More...
 
interface  sub_model_add_condensed_data
 Add condensed sub model data to the solver data block. More...
 
interface  sub_model_print_data
 Print the solver data. More...
 
interface  sub_model_update_data
 Update reaction data. More...
 

Functions/Subroutines

type(camp_solver_data_t) function, pointer constructor ()
 Constructor for camp_solver_data_t.
 
subroutine initialize (this, var_type, abs_tol, mechanisms, aero_phases, aero_reps, sub_models, rxn_phase, n_cells)
 Initialize the solver.
 
subroutine update_sub_model_data (this, update_data)
 Update sub-model data.
 
subroutine update_rxn_data (this, update_data)
 Update reaction data.
 
subroutine update_aero_rep_data (this, update_data)
 Update aerosol representation data based on data passed from the host model related to aerosol properties.
 
subroutine solve (this, camp_state, t_initial, t_final, solver_stats)
 Solve the mechanism(s) for a specified timestep.
 
subroutine reset_timers (this)
 Reset the solver function timers.
 
subroutine get_solver_stats (this, solver_stats)
 Get solver statistics.
 
logical function is_solver_available (this)
 Check whether a solver is available for the integration.
 
subroutine do_print (this)
 Print the solver data.
 
elemental subroutine finalize (this)
 Finalize the solver data.
 

Variables

real(kind=dp), parameter camp_solver_default_rel_tol = 1.0D-8
 Default relative tolerance for integration.
 
integer(kind=i_kind), parameter camp_solver_default_max_steps = 10000
 Default max number of integration steps.
 
integer(kind=i_kind), parameter camp_solver_default_max_conv_fails = 1000
 Default maximum number of integration convergence failures.
 
integer, parameter camp_solver_success = 0
 Result code indicating successful completion.
 

Detailed Description

The camp_solver_data_t structure and associated subroutines.

Function/Subroutine Documentation

◆ constructor()

type(camp_solver_data_t) function, pointer camp_camp_solver_data::constructor
private

Constructor for camp_solver_data_t.

Returns
New solver variable

Allocate space for the new object

Definition at line 417 of file camp_solver_data.F90.

◆ do_print()

subroutine camp_camp_solver_data::do_print ( class(camp_solver_data_t), intent(in)  this)
private

Print the solver data.

Parameters
[in]thisSolver data

Definition at line 984 of file camp_solver_data.F90.

◆ finalize()

elemental subroutine camp_camp_solver_data::finalize ( type(camp_solver_data_t), intent(inout)  this)
private

Finalize the solver data.

Parameters
[in,out]thisSolver data

Definition at line 999 of file camp_solver_data.F90.

Here is the caller graph for this function:

◆ get_solver_stats()

subroutine camp_camp_solver_data::get_solver_stats ( class(camp_solver_data_t), intent(inout)  this,
type(solver_stats_t), intent(inout), target  solver_stats 
)
private

Get solver statistics.

Parameters
[in,out]thisSolver data
[in,out]solver_statsSolver statistics

Definition at line 936 of file camp_solver_data.F90.

◆ initialize()

subroutine camp_camp_solver_data::initialize ( class(camp_solver_data_t), intent(inout)  this,
integer(kind=i_kind), dimension(:), intent(in), allocatable  var_type,
real(kind=dp), dimension(:), intent(in), allocatable  abs_tol,
type(mechanism_data_ptr), dimension(:), intent(in), pointer  mechanisms,
type(aero_phase_data_ptr), dimension(:), intent(in), pointer  aero_phases,
type(aero_rep_data_ptr), dimension(:), intent(in), pointer  aero_reps,
type(sub_model_data_ptr), dimension(:), intent(in), pointer  sub_models,
integer(kind=i_kind), intent(in)  rxn_phase,
integer(kind=i_kind), optional  n_cells 
)
private

Initialize the solver.

Parameters
[in,out]thisSolver data
[in]var_typeVariable type for each species in the state array. This array must be of the same length as the state array.
[in]abs_tolAbsolute tolerance for each species in the state array. This array must be of the same length as the state array. Values for CONST and PSSA species will be ignored by the solver.
[in]mechanismsMechanisms to include in solver
[in]aero_phasesAerosol phases to include
[in]aero_repsAerosol representations to include
[in]sub_modelsSub models to include
[in]rxn_phaseReactions phase to solve – gas, aerosol, or both (default) Use parameters in camp_rxn_data to specify phase: GAS_RXN, AERO_RXN, GAS_AERO_RXN
n_cellsNumber of cells to compute

Definition at line 430 of file camp_solver_data.F90.

◆ is_solver_available()

logical function camp_camp_solver_data::is_solver_available ( class(camp_solver_data_t), intent(in)  this)
private

Check whether a solver is available for the integration.

Parameters
[in]thisSolver data

Definition at line 968 of file camp_solver_data.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_timers()

subroutine camp_camp_solver_data::reset_timers ( class(camp_solver_data_t), intent(inout)  this)
private

Reset the solver function timers.

Parameters
[in,out]thisSolver data

Definition at line 924 of file camp_solver_data.F90.

◆ solve()

subroutine camp_camp_solver_data::solve ( class(camp_solver_data_t), intent(inout)  this,
type(camp_state_t), intent(inout), target  camp_state,
real(kind=dp), intent(in)  t_initial,
real(kind=dp), intent(in)  t_final,
type(solver_stats_t), intent(inout), optional, target  solver_stats 
)
private

Solve the mechanism(s) for a specified timestep.

Parameters
[in,out]thisSolver data
[in,out]camp_stateModel state
[in]t_initialStart time (s)
[in]t_finalEnd time (s)
[in,out]solver_statsSolver statistics

Definition at line 853 of file camp_solver_data.F90.

◆ update_aero_rep_data()

subroutine camp_camp_solver_data::update_aero_rep_data ( class(camp_solver_data_t), intent(inout)  this,
class(aero_rep_update_data_t), intent(in)  update_data 
)
private

Update aerosol representation data based on data passed from the host model related to aerosol properties.

Parameters
[in,out]thisSolver data
[in]update_dataUpdate data

Definition at line 833 of file camp_solver_data.F90.

◆ update_rxn_data()

subroutine camp_camp_solver_data::update_rxn_data ( class(camp_solver_data_t), intent(inout)  this,
class(rxn_update_data_t), intent(in)  update_data 
)
private

Update reaction data.

Parameters
[in,out]thisSolver data
[in]update_dataUpdate data

Definition at line 812 of file camp_solver_data.F90.

◆ update_sub_model_data()

subroutine camp_camp_solver_data::update_sub_model_data ( class(camp_solver_data_t), intent(inout)  this,
class(sub_model_update_data_t), intent(in)  update_data 
)
private

Update sub-model data.

Parameters
[in,out]thisSolver data
[in]update_dataUpdate data

Definition at line 792 of file camp_solver_data.F90.

Variable Documentation

◆ camp_solver_default_max_conv_fails

integer(kind=i_kind), parameter camp_camp_solver_data::camp_solver_default_max_conv_fails = 1000
private

Default maximum number of integration convergence failures.

Definition at line 37 of file camp_solver_data.F90.

◆ camp_solver_default_max_steps

integer(kind=i_kind), parameter camp_camp_solver_data::camp_solver_default_max_steps = 10000
private

Default max number of integration steps.

Definition at line 35 of file camp_solver_data.F90.

◆ camp_solver_default_rel_tol

real(kind=dp), parameter camp_camp_solver_data::camp_solver_default_rel_tol = 1.0D-8
private

Default relative tolerance for integration.

Definition at line 33 of file camp_solver_data.F90.

◆ camp_solver_success

integer, parameter camp_camp_solver_data::camp_solver_success = 0
private

Result code indicating successful completion.

Definition at line 40 of file camp_solver_data.F90.