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

The sub_model_factory_t type and associated subroutines. More...

Data Types

type  sub_model_factory_t
 Factory type for sub-models. More...
 

Functions/Subroutines

class(sub_model_data_t) function, pointer create (this, type_name)
 Create a new sub-model by type name.
 
class(sub_model_data_t) function, pointer load (this, json, j_obj)
 Load a sub-model based on its type.
 
integer(kind=i_kind) function get_type (this, sub_model)
 Get the sub-model type as a constant.
 
subroutine initialize_update_data (this, sub_model, update_data)
 Initialize an update data object.
 
integer(kind=i_kind) function pack_size (this, sub_model, comm)
 Determine the size of a binary required to pack a sub-model.
 
subroutine bin_pack (this, sub_model, buffer, pos, comm)
 Pack the given value to the buffer, advancing position.
 
class(sub_model_data_t) function, pointer bin_unpack (this, buffer, pos, comm)
 Unpack the given value to the buffer, advancing position.
 

Variables

integer(kind=i_kind), parameter, public sub_model_unifac = 1
 Identifiers for sub-models - used by binary packing/unpacking functions.
 
integer(kind=i_kind), parameter, public sub_model_zsr_aerosol_water = 2
 
integer(kind=i_kind), parameter, public sub_model_pdfite = 3
 

Detailed Description

The sub_model_factory_t type and associated subroutines.

Function/Subroutine Documentation

◆ bin_pack()

subroutine camp_sub_model_factory::bin_pack ( class(sub_model_factory_t), intent(in)  this,
class(sub_model_data_t), intent(in)  sub_model,
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 factory
[in]sub_modelSub-model to pack
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 204 of file sub_model_factory.F90.

Here is the call graph for this function:

◆ bin_unpack()

class(sub_model_data_t) function, pointer camp_sub_model_factory::bin_unpack ( class(sub_model_factory_t), intent(in)  this,
character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  pos,
integer, intent(in)  comm 
)
private

Unpack the given value to the buffer, advancing position.

Returns
Unpacked sub-model
Parameters
[in]thisSub-model factory
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 242 of file sub_model_factory.F90.

Here is the call graph for this function:

◆ create()

class(sub_model_data_t) function, pointer camp_sub_model_factory::create ( class(sub_model_factory_t), intent(in)  this,
character(len=*), intent(in)  type_name 
)

Create a new sub-model by type name.

Returns
A new sub-model
Parameters
[in]thisSub-model factory
[in]type_nameType of the sub-model

Definition at line 70 of file sub_model_factory.F90.

Here is the call graph for this function:

◆ get_type()

integer(kind=i_kind) function camp_sub_model_factory::get_type ( class(sub_model_factory_t), intent(in)  this,
class(sub_model_data_t), intent(in)  sub_model 
)
private

Get the sub-model type as a constant.

Parameters
[in]thisSub-model factory
[in]sub_modelSub-model to get type of

Definition at line 144 of file sub_model_factory.F90.

Here is the call graph for this function:

◆ initialize_update_data()

subroutine camp_sub_model_factory::initialize_update_data ( class(sub_model_factory_t), intent(in)  this,
class(sub_model_data_t), intent(inout)  sub_model,
class(sub_model_update_data_t), intent(out)  update_data 
)
private

Initialize an update data object.

Parameters
[in]thisSub-model factory
[in,out]sub_modelSub-model to be updated
[out]update_dataUpdate data object

Definition at line 168 of file sub_model_factory.F90.

Here is the call graph for this function:

◆ load()

class(sub_model_data_t) function, pointer camp_sub_model_factory::load ( class(sub_model_factory_t), intent(in)  this,
type(json_core), intent(in), pointer  json,
type(json_value), intent(in), pointer  j_obj 
)
private

Load a sub-model based on its type.

Returns
A new sub-model
Parameters
[in]thisSub-model factory
[in]jsonJSON core
[in]j_objJSON object

Definition at line 98 of file sub_model_factory.F90.

Here is the call graph for this function:

◆ pack_size()

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

Determine the size of a binary required to pack a sub-model.

Parameters
thisSub-model factory
[in]sub_modelSub-model to pack
[in]commMPI communicator

Definition at line 187 of file sub_model_factory.F90.

Here is the call graph for this function:

Variable Documentation

◆ sub_model_pdfite

integer(kind=i_kind), parameter, public camp_sub_model_factory::sub_model_pdfite = 3

Definition at line 41 of file sub_model_factory.F90.

◆ sub_model_unifac

integer(kind=i_kind), parameter, public camp_sub_model_factory::sub_model_unifac = 1

Identifiers for sub-models - used by binary packing/unpacking functions.

Definition at line 39 of file sub_model_factory.F90.

◆ sub_model_zsr_aerosol_water

integer(kind=i_kind), parameter, public camp_sub_model_factory::sub_model_zsr_aerosol_water = 2

Definition at line 40 of file sub_model_factory.F90.