MONC
Data Types | Functions/Subroutines
operator_mod Module Reference

Operator federator which manages the different operators which are available. Operators take in any number of scalar reals and output a single scalar real. More...

Data Types

interface  get_operator_required_fields_interface
 
interface  perform_activity
 

Functions/Subroutines

subroutine, public initialise_operators ()
 Initialises any operators that require initialisation. More...
 
subroutine, public finalise_operators ()
 Finalises any operators that require finalisation. More...
 
procedure(perform_activity) function, pointer, public get_operator_perform_procedure (operator_name)
 Retrieves the operator execution procedure of an operator with a specific name. More...
 
type(list_type) function, public get_operator_required_fields (operator_name, action_attributes)
 Retrieves the list of fields required by an operator before it can run. More...
 
integer function, public get_operator_auto_size (io_configuration, operator_name, auto_dimension, action_attributes)
 

Detailed Description

Operator federator which manages the different operators which are available. Operators take in any number of scalar reals and output a single scalar real.

Function/Subroutine Documentation

◆ finalise_operators()

subroutine, public operator_mod::finalise_operators ( )

Finalises any operators that require finalisation.

Definition at line 48 of file operator.F90.

48  call finalise_arithmetic_operator()
Here is the caller graph for this function:

◆ get_operator_auto_size()

integer function, public operator_mod::get_operator_auto_size ( type(io_configuration_type), intent(inout)  io_configuration,
character(len=*), intent(in)  operator_name,
character(len=*), intent(in)  auto_dimension,
type(map_type), intent(inout)  action_attributes 
)

Definition at line 96 of file operator.F90.

96  type(io_configuration_type), intent(inout) :: io_configuration
97  character(len=*), intent(in) :: operator_name, auto_dimension
98  type(map_type), intent(inout) :: action_attributes
99 
100  if (trim(operator_name) .eq. "field_coarsener") then
101  get_operator_auto_size=fieldcoarsener_operator_get_auto_size(io_configuration, auto_dimension, action_attributes)
102  else
103  get_operator_auto_size=-1
104  end if
Here is the caller graph for this function:

◆ get_operator_perform_procedure()

procedure(perform_activity) function, pointer, public operator_mod::get_operator_perform_procedure ( character(len=*), intent(in)  operator_name)

Retrieves the operator execution procedure of an operator with a specific name.

Parameters
operator_nameThe name of the operator to retrieve the execution procedure of
Returns
The execution procedure which can be called to run the operator

Definition at line 55 of file operator.F90.

55  character(len=*), intent(in) :: operator_name
56  procedure(perform_activity), pointer :: get_operator_perform_procedure
57 
58  if (trim(operator_name) .eq. "arithmetic") then
59  get_operator_perform_procedure=>perform_arithmetic_operator
60  else if (trim(operator_name) .eq. "localreduce") then
61  get_operator_perform_procedure=>perform_localreduce_operator
62  else if (trim(operator_name) .eq. "reductionlocation") then
63  get_operator_perform_procedure=>perform_reductionlocation_operator
64  else if (trim(operator_name) .eq. "field_slicer") then
65  get_operator_perform_procedure=>perform_fieldslicer_operator
66  else if (trim(operator_name) .eq. "field_coarsener") then
67  get_operator_perform_procedure=>perform_fieldcoarsener_operator
68  else
69  call log_log(log_error, "Operator '"//trim(operator_name)//"' not found so ignoring")
70  end if
Here is the caller graph for this function:

◆ get_operator_required_fields()

type(list_type) function, public operator_mod::get_operator_required_fields ( character(len=*), intent(in)  operator_name,
type(map_type), intent(inout)  action_attributes 
)

Retrieves the list of fields required by an operator before it can run.

Parameters
operator_nameThe name of the operator to retrieve the execution procedure of
action_attributesThe attributes of the action as defined by the configuration

Definition at line 77 of file operator.F90.

77  character(len=*), intent(in) :: operator_name
78  type(map_type), intent(inout) :: action_attributes
79 
80  if (trim(operator_name) .eq. "arithmetic") then
81  get_operator_required_fields=arithmetic_operator_get_required_fields(action_attributes)
82  else if (trim(operator_name) .eq. "localreduce") then
83  get_operator_required_fields=localreduce_operator_get_required_fields(action_attributes)
84  else if (trim(operator_name) .eq. "reductionlocation") then
85  get_operator_required_fields=reductionlocation_operator_get_required_fields(action_attributes)
86  else if (trim(operator_name) .eq. "field_slicer") then
87  get_operator_required_fields=fieldslicer_operator_get_required_fields(action_attributes)
88  else if (trim(operator_name) .eq. "field_coarsener") then
89  get_operator_required_fields=fieldcoarsener_operator_get_required_fields(action_attributes)
90  else
91  call log_log(log_error, "Operator '"//trim(operator_name)//"' not found so ignoring")
92  end if
Here is the caller graph for this function:

◆ initialise_operators()

subroutine, public operator_mod::initialise_operators ( )

Initialises any operators that require initialisation.

Definition at line 43 of file operator.F90.

43  call initialise_arithmetic_operator()
Here is the caller graph for this function: