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

The abstract sub_model_data_t structure and associated subroutines. More...

Data Types

interface  initialize
 Initialize the sub-model data, validating input parameters and loading any required information form the sub_model_data_t::property_set. This routine should be called once for each sub-model at the beginning of the model run after all the input files have been read in. It ensures all data required during the model run are included in the condensed data arrays. More...
 
interface  internal_bin_pack
 Extending-type binary pack function (Internal use only) More...
 
interface  internal_bin_unpack
 Extending-type binary unpack function (Internal use only) More...
 
interface  internal_pack_size
 Extending-type binary pack size (internal use only) More...
 
interface  priority
 Return a real number representing the priority of the sub model calculations. Low priority sub models may use the results of higher priority sub models. Lower numbers indicate higher priority. More...
 
type  sub_model_data_ptr
 Pointer to sub_model_data_t extending types. More...
 
type  sub_model_data_t
 Abstract sub-model data type. More...
 
type  sub_model_update_data_t
 Update cookie. More...
 

Functions/Subroutines

character(len=:) function, allocatable get_name (this)
 Get the name of the sub-model.
 
subroutine load (this, json, j_obj)
 Load a sub-model from an input file.
 
integer(kind=i_kind) function pack_size (this, comm)
 Determine the size of a binary required to pack the reaction data.
 
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 from the buffer, advancing position.
 
subroutine do_print (this, file_unit)
 Print the sub-model data.
 
elemental subroutine dereference (this)
 Dereference a pointer to a sub-model.
 
elemental subroutine ptr_finalize (this)
 Finalize a pointer to a sub-model.
 
integer(kind=c_int) function sub_model_update_data_get_type (this)
 Get the update data sub-model type.
 
integer(kind=c_int) function sub_model_update_data_get_cell_id (this)
 Get the grid cell id to update.
 
type(c_ptr) function sub_model_update_data_get_data (this)
 Get the update data.
 
integer(kind=i_kind) function sub_model_update_data_pack_size (this, comm)
 Determine the size of a binary required to pack the reaction data.
 
subroutine sub_model_update_data_bin_pack (this, buffer, pos, comm)
 Pack the given value to the buffer, advancing position.
 
subroutine sub_model_update_data_bin_unpack (this, buffer, pos, comm)
 Unpack the given value from the buffer, advancing position.
 
subroutine do_sub_model_update_data_print (this, file_unit)
 Print the update data.
 

Detailed Description

The abstract sub_model_data_t structure and associated subroutines.

Function/Subroutine Documentation

◆ bin_pack()

subroutine camp_sub_model_data::bin_pack ( class(sub_model_data_t), intent(in)  this,
character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  pos,
integer, intent(in)  comm 
)
private

Pack the given value to the buffer, advancing position.

Parameters
[in]thisSub model data
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 362 of file sub_model_data.F90.

Here is the call graph for this function:

◆ bin_unpack()

subroutine camp_sub_model_data::bin_unpack ( class(sub_model_data_t), intent(out)  this,
character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  pos,
integer, intent(in)  comm 
)
private

Unpack the given value from the buffer, advancing position.

Parameters
[out]thisSub model data
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 389 of file sub_model_data.F90.

Here is the call graph for this function:

◆ dereference()

elemental subroutine camp_sub_model_data::dereference ( class(sub_model_data_ptr), intent(inout)  this)
private

Dereference a pointer to a sub-model.

Parameters
[in,out]thisPointer to a sub-model

Definition at line 442 of file sub_model_data.F90.

◆ do_print()

subroutine camp_sub_model_data::do_print ( class(sub_model_data_t), intent(in)  this,
integer(kind=i_kind), optional  file_unit 
)
private

Print the sub-model data.

Parameters
[in]thisSub model data
file_unitFile unit for output

Definition at line 417 of file sub_model_data.F90.

◆ do_sub_model_update_data_print()

subroutine camp_sub_model_data::do_sub_model_update_data_print ( class(sub_model_update_data_t), intent(in)  this,
integer(kind=i_kind), optional  file_unit 
)
private

Print the update data.

Parameters
[in]thisSub model update data
file_unitFile unit for output

Definition at line 612 of file sub_model_data.F90.

◆ get_name()

character(len=:) function, allocatable camp_sub_model_data::get_name ( class(sub_model_data_t), intent(in)  this)
private

Get the name of the sub-model.

Returns
Sub model name
Parameters
[in]thisSub model data

Definition at line 246 of file sub_model_data.F90.

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

◆ load()

subroutine camp_sub_model_data::load ( class(sub_model_data_t), intent(inout)  this,
type(json_core), intent(in), pointer  json,
type(json_value), intent(in), pointer  j_obj 
)
private

Load a sub-model from an input file.

Parameters
[in,out]thisSub model data
[in]jsonJSON core
[in]j_objJSON object

Definition at line 294 of file sub_model_data.F90.

◆ pack_size()

integer(kind=i_kind) function camp_sub_model_data::pack_size ( class(sub_model_data_t), intent(in)  this,
integer, intent(in)  comm 
)
private

Determine the size of a binary required to pack the reaction data.

Parameters
[in]thisSub model data
[in]commMPI communicator

Definition at line 345 of file sub_model_data.F90.

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

◆ ptr_finalize()

elemental subroutine camp_sub_model_data::ptr_finalize ( type(sub_model_data_ptr), intent(inout)  this)
private

Finalize a pointer to a sub-model.

Parameters
[in,out]thisPointer to a sub-model

Definition at line 454 of file sub_model_data.F90.

Here is the caller graph for this function:

◆ sub_model_update_data_bin_pack()

subroutine camp_sub_model_data::sub_model_update_data_bin_pack ( class(sub_model_update_data_t), intent(in)  this,
character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  pos,
integer, intent(in), optional  comm 
)
private

Pack the given value to the buffer, advancing position.

Parameters
[in]thisSub model update data
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 540 of file sub_model_data.F90.

Here is the call graph for this function:

◆ sub_model_update_data_bin_unpack()

subroutine camp_sub_model_data::sub_model_update_data_bin_unpack ( class(sub_model_update_data_t), intent(out)  this,
character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  pos,
integer, intent(in), optional  comm 
)
private

Unpack the given value from the buffer, advancing position.

Parameters
[out]thisSub model update data
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 576 of file sub_model_data.F90.

Here is the call graph for this function:

◆ sub_model_update_data_get_cell_id()

integer(kind=c_int) function camp_sub_model_data::sub_model_update_data_get_cell_id ( class(sub_model_update_data_t), intent(in)  this)
private

Get the grid cell id to update.

Returns
Grid cell id
Parameters
[in]thisUpdate data

Definition at line 480 of file sub_model_data.F90.

◆ sub_model_update_data_get_data()

type(c_ptr) function camp_sub_model_data::sub_model_update_data_get_data ( class(sub_model_update_data_t), intent(in)  this)
private

Get the update data.

Returns
Update data ptr
Parameters
[in]thisUpdate data

Definition at line 494 of file sub_model_data.F90.

◆ sub_model_update_data_get_type()

integer(kind=c_int) function camp_sub_model_data::sub_model_update_data_get_type ( class(sub_model_update_data_t), intent(in)  this)
private

Get the update data sub-model type.

Returns
Sub-model type
Parameters
[in]thisUpdate data

Definition at line 466 of file sub_model_data.F90.

◆ sub_model_update_data_pack_size()

integer(kind=i_kind) function camp_sub_model_data::sub_model_update_data_pack_size ( class(sub_model_update_data_t), intent(in)  this,
integer, intent(in), optional  comm 
)
private

Determine the size of a binary required to pack the reaction data.

Parameters
[in]thisSub model update data
[in]commMPI communicator

Definition at line 508 of file sub_model_data.F90.

Here is the call graph for this function: