36 '''Module containing the OperatesOnMetadata class which captures
37 the values for the LFRic kernel OPERATES_ON metadata.
42 CommonDeclarationMetadata
46 '''Class to capture the values of the LFRic kernel
47 OPERATES_ON metadata. This class supports the creation,
48 modification and Fortran output of this metadata.
50 OPERATES_ON metadata specifies that the Kernel has been written to
51 expect data in the specified form, i.e. 'cell_column' means a column
52 of cells and 'domain' means all cells.
54 :param str operates_on: the value of operates_on.
57 def __init__(self, operates_on):
63 :returns: the operates_on metadata as Fortran.
66 return OperatesOnMetadata.scalar_declaration_string(
71 '''Create an instance of OperatesOnMetadata from an fparser2
74 :param fparser2_tree: fparser2 tree capturing the operates_on \
76 :type fparser2_tree: :py:class:`fparser.two.Fortran2003.\
77 Data_Component_Def_Stmt`
79 LFRic operates_on metadata is in scalar form:
81 integer :: operates_on = cell_column
83 :returns: an instance of OperatesOnMetadata.
84 :rtype: :py:class:`psyclone.domain.lfric.kernel.\
89 valid_values = const.USER_KERNEL_ITERATION_SPACES
90 value = OperatesOnMetadata.get_intrinsic_scalar_declaration(
91 fparser2_tree,
"INTEGER",
"OPERATES_ON", valid_values)
95 def operates_on(self):
97 :returns: the operates_on value.
103 def operates_on(self, value):
105 :param str value: sets the operates_on metadata to the \
109 OperatesOnMetadata.validate_scalar_value(
110 value, const.VALID_ITERATION_SPACES,
"OPERATES_ON")
114 __all__ = [
"OperatesOnMetadata"]
def create_from_fparser2(fparser2_tree)
def operates_on(self, value)