MONC
Functions/Subroutines
test_monc_mod Module Reference

Functions/Subroutines

subroutine add_component (component_descriptions, single_description)
 
subroutine test_load_model
 
subroutine test_fill_registry_components
 

Function/Subroutine Documentation

◆ add_component()

subroutine test_monc_mod::add_component ( type(list_type), intent(inout)  component_descriptions,
type(component_descriptor_type), intent(in)  single_description 
)

Definition at line 19 of file test_monc.F90.

19  type(list_type), intent(inout) :: component_descriptions
20  type(component_descriptor_type), intent(in) :: single_description
21 
22  class(*), pointer :: raw_data
23  allocate(raw_data, source=single_description)
24  call c_add(component_descriptions, raw_data)

◆ test_fill_registry_components()

subroutine test_monc_mod::test_fill_registry_components ( )

Definition at line 40 of file test_monc.F90.

40  type(model_state_type) :: current_state
41  type(list_type) :: component_descriptions
42  type(map_type) :: registered_components
43 
44  registered_components = get_all_registered_components()
45  call assert_equals(0,c_size(registered_components),"Test there are not components in the registry")
46  ! add the component to the database
47  call add_component(component_descriptions, fftsolver_get_descriptor())
48  call fill_registry_with_components(current_state%options_database, component_descriptions)
49 
50  registered_components = get_all_registered_components()
51  call assert_equals(1,c_size(registered_components),"Test there is only 1 component in the registry")
subroutine add_component(component_descriptions, single_description)
Called by each component to add itself to the registration list_type.
Definition: monc_driver.F90:39
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_load_model()

subroutine test_monc_mod::test_load_model ( )

Definition at line 30 of file test_monc.F90.

30  type(model_state_type) :: current_state
31  real :: z0
32 
33  call load_model_configuration(current_state%options_database)
34  z0 = options_get_real(current_state%options_database, "z0")
35  call assert_equals(2.0e-3,z0,"Test z0 has been read properly")
Here is the call graph for this function:
Here is the caller graph for this function: