Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, datatype, access, function_space, stencil=None) |
def | get_stencil (cls, fparser2_tree) |
def | fortran_string (self) |
def | function_space (self) |
def | function_space (self, value) |
def | stencil (self) |
def | stencil (self, value) |
Public Member Functions inherited from psyclone.domain.lfric.kernel.common_meta_arg_metadata.CommonMetaArgMetadata | |
def | __init__ (self, datatype, access) |
def | create_from_fparser2 (cls, fparser2_tree) |
def | check_first_arg (cls, fparser2_tree) |
def | check_remaining_args (cls, fparser2_tree, *metadata_args) |
def | check_nargs (cls, fparser2_tree) |
def | get_vector_length (cls, fparser2_tree) |
def | datatype (self) |
def | datatype (self, value) |
def | access (self) |
def | access (self, value) |
Public Member Functions inherited from psyclone.domain.lfric.kernel.common_arg_metadata.CommonArgMetadata | |
def | check_fparser2_arg (cls, fparser2_tree, type_name) |
Public Member Functions inherited from psyclone.domain.lfric.kernel.common_metadata.CommonMetadata | |
def | create_from_fortran_string (cls, fortran_string) |
Static Public Member Functions | |
def | check_datatype (value) |
def | check_access (value) |
Static Public Member Functions inherited from psyclone.domain.lfric.kernel.common_arg_metadata.CommonArgMetadata | |
def | check_boolean (value, name) |
def | get_nargs (fparser2_tree) |
def | get_arg (fparser2_tree, index) |
Static Public Member Functions inherited from psyclone.domain.lfric.kernel.common_metadata.CommonMetadata | |
def | check_fparser2 (fparser2_tree, encoding) |
def | validate_scalar_value (value, valid_values, name) |
def | create_fparser2 (fortran_string, encoding) |
def | create_from_fparser2 (fparser2_tree) |
Public Attributes | |
function_space | |
stencil | |
Public Attributes inherited from psyclone.domain.lfric.kernel.common_meta_arg_metadata.CommonMetaArgMetadata | |
datatype | |
access | |
Static Public Attributes | |
string | form = "gh_field" |
int | form_arg_index = 0 |
int | datatype_arg_index = 1 |
int | access_arg_index = 2 |
int | function_space_arg_index = 3 |
int | stencil_arg_index = 4 |
string | check_name = "field" |
tuple | nargs = (4, 5) |
Static Public Attributes inherited from psyclone.domain.lfric.kernel.scalar_arg_metadata.ScalarArgMetadata | |
string | form = "gh_scalar" |
int | form_arg_index = 0 |
int | datatype_arg_index = 1 |
int | access_arg_index = 2 |
string | check_name = "scalar" |
int | nargs = 3 |
Static Public Attributes inherited from psyclone.domain.lfric.kernel.common_meta_arg_metadata.CommonMetaArgMetadata | |
bool | vector = False |
int | form_arg_index = 0 |
int | vector_length_arg_index = 0 |
int | datatype_arg_index = 1 |
int | access_arg_index = 2 |
int | function_space_arg_index = 3 |
string | form = "" |
string | check_name = "" |
int | nargs = 1 |
Static Public Attributes inherited from psyclone.domain.lfric.kernel.common_arg_metadata.CommonArgMetadata | |
fparser2_class = Fortran2003.Part_Ref | |
Static Public Attributes inherited from psyclone.domain.lfric.kernel.common_metadata.CommonMetadata | |
fparser2_class = None | |
Class to capture LFRic kernel metadata information for a field argument. :param str datatype: the datatype of this field (GH_INTEGER, ...). :param str access: the way the kernel accesses this field (GH_WRITE, ...). :param str function_space: the function space that this field is \ on (W0, ...). :param Optional[str] stencil: the type of stencil used by the \ kernel when accessing this field.
Definition at line 46 of file field_arg_metadata.py.
|
static |
:param str value: the access descriptor to validate.
Reimplemented from psyclone.domain.lfric.kernel.scalar_arg_metadata.ScalarArgMetadata.
Definition at line 156 of file field_arg_metadata.py.
|
static |
:param str value: the datatype to check for validity. :raises ValueError: if the provided value is not a valid \ datatype descriptor.
Reimplemented from psyclone.domain.lfric.kernel.scalar_arg_metadata.ScalarArgMetadata.
Definition at line 143 of file field_arg_metadata.py.
def psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata.fortran_string | ( | self | ) |
:returns: the metadata represented by this class as Fortran. :rtype: str
Reimplemented from psyclone.domain.lfric.kernel.scalar_arg_metadata.ScalarArgMetadata.
Reimplemented in psyclone.domain.lfric.kernel.inter_grid_vector_arg_metadata.InterGridVectorArgMetadata, psyclone.domain.lfric.kernel.inter_grid_arg_metadata.InterGridArgMetadata, and psyclone.domain.lfric.kernel.field_vector_arg_metadata.FieldVectorArgMetadata.
Definition at line 131 of file field_arg_metadata.py.
References psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.FieldArg.stencil(), psyclone.dynamo0p3.DynKernelArgument.stencil(), psyclone.parse.kernel.Descriptor.stencil(), psyclone.psyGen.KernelArgument.stencil(), psyclone.domain.lfric.arg_ordering.ArgOrdering.stencil(), psyclone.domain.lfric.kern_call_acc_arg_list.KernCallAccArgList.stencil(), psyclone.domain.lfric.kern_call_arg_list.KernCallArgList.stencil(), psyclone.domain.lfric.kern_call_invoke_arg_list.KernCallInvokeArgList.stencil(), psyclone.domain.lfric.kern_stub_arg_list.KernStubArgList.stencil(), psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata.stencil, psyclone.domain.lfric.kernel_interface.KernelInterface.stencil(), and psyclone.domain.lfric.lfric_invoke.LFRicInvoke.stencil.
def psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata.function_space | ( | self | ) |
:returns: the function space for this field argument. :rtype: str
Definition at line 165 of file field_arg_metadata.py.
References psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata._function_space, psyclone.domain.lfric.kernel.meta_funcs_arg_metadata.MetaFuncsArgMetadata._function_space, and psyclone.domain.lfric.lfric_arg_descriptor.LFRicArgDescriptor._function_space.
def psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata.function_space | ( | self, | |
value | |||
) |
:param str value: set the function space to the \ specified value.
Definition at line 173 of file field_arg_metadata.py.
References psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata._function_space, psyclone.domain.lfric.kernel.meta_funcs_arg_metadata.MetaFuncsArgMetadata._function_space, and psyclone.domain.lfric.lfric_arg_descriptor.LFRicArgDescriptor._function_space.
def psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata.get_stencil | ( | cls, | |
fparser2_tree | |||
) |
Retrieves the stencil metadata value found within the supplied fparser2 tree (if there is one) and checks that it is valid. :param fparser2_tree: fparser2 tree capturing the required metadata. :type fparser2_tree: :py:class:`fparser.two.Fortran2003.Part_Ref` :returns: the stencil value extracted from the fparser2 tree \ if there is one, or None if not. :rtype: Optional[str] :raises TypeError: if the stencil metadata is not in the \ expected form.
Definition at line 104 of file field_arg_metadata.py.
References psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata.stencil_arg_index, and psyclone.domain.lfric.kernel.inter_grid_arg_metadata.InterGridArgMetadata.stencil_arg_index.
def psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata.stencil | ( | self | ) |
:returns: the stencil for this field argument, or None if there isn't one. :rtype: Optional[str]
Definition at line 184 of file field_arg_metadata.py.
References psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.FieldArg._stencil, psyclone.domain.lfric.arg_index_to_metadata_index.ArgIndexToMetadataIndex._stencil(), psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata._stencil, psyclone.domain.lfric.lfric_arg_descriptor.LFRicArgDescriptor._stencil, psyclone.domain.lfric.metadata_to_arguments_rules.MetadataToArgumentsRules._stencil(), psyclone.dynamo0p3.DynKernelArgument._stencil, psyclone.gocean1p0.GOStencil._stencil, and psyclone.parse.kernel.Descriptor._stencil.
def psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata.stencil | ( | self, | |
value | |||
) |
:param str value: set the stencil to the specified value.
Definition at line 194 of file field_arg_metadata.py.
References psyclone.domain.gocean.kernel.psyir.GOceanKernelMetadata.FieldArg._stencil, psyclone.domain.lfric.arg_index_to_metadata_index.ArgIndexToMetadataIndex._stencil(), psyclone.domain.lfric.kernel.field_arg_metadata.FieldArgMetadata._stencil, psyclone.domain.lfric.lfric_arg_descriptor.LFRicArgDescriptor._stencil, psyclone.domain.lfric.metadata_to_arguments_rules.MetadataToArgumentsRules._stencil(), psyclone.dynamo0p3.DynKernelArgument._stencil, psyclone.gocean1p0.GOStencil._stencil, and psyclone.parse.kernel.Descriptor._stencil.