Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self, kern) |
def | generate (self, var_accesses=None) |
def | cell_position (self, var_accesses=None) |
def | mesh_height (self, var_accesses=None) |
def | cell_map (self, var_accesses=None) |
def | field_vector (self, argvect, var_accesses=None) |
def | field (self, arg, var_accesses=None) |
def | stencil_unknown_extent (self, arg, var_accesses=None) |
def | stencil_unknown_direction (self, arg, var_accesses=None) |
def | stencil (self, arg, var_accesses=None) |
def | operator (self, arg, var_accesses=None) |
def | cma_operator (self, arg, var_accesses=None) |
def | scalar (self, scalar_arg, var_accesses=None) |
def | fs_common (self, function_space, var_accesses=None) |
def | fs_intergrid (self, function_space, var_accesses=None) |
def | fs_compulsory_field (self, function_space, var_accesses=None) |
def | banded_dofmap (self, function_space, var_accesses=None) |
def | indirection_dofmap (self, function_space, operator=None, var_accesses=None) |
def | basis (self, function_space, var_accesses=None) |
def | diff_basis (self, function_space, var_accesses=None) |
def | field_bcs_kernel (self, function_space, var_accesses=None) |
def | operator_bcs_kernel (self, function_space, var_accesses=None) |
def | ref_element_properties (self, var_accesses=None) |
def | mesh_properties (self, var_accesses=None) |
def | quad_rule (self, var_accesses=None) |
Public Member Functions inherited from psyclone.domain.lfric.arg_ordering.ArgOrdering | |
def | psyir_append (self, node) |
def | append (self, var_name, var_accesses=None, var_access_name=None, mode=AccessType.READ, metadata_posn=None) |
def | extend (self, list_var_name, var_accesses=None, mode=AccessType.READ, list_metadata_posn=None) |
def | append_integer_reference (self, name, tag=None) |
def | get_array_reference (self, array_name, indices, intrinsic_type, tag=None, symbol=None) |
def | append_array_reference (self, array_name, indices, intrinsic_type, tag=None, symbol=None) |
def | num_args (self) |
def | arglist (self) |
def | psyir_arglist (self) |
def | metadata_index_from_actual_index (self, idx) |
def | stencil_2d_unknown_extent (self, arg, var_accesses=None) |
def | stencil_2d_max_extent (self, arg, var_accesses=None) |
def | stencil_2d (self, arg, var_accesses=None) |
Static Public Attributes | |
dictionary | field_mapping |
dictionary | vector_field_mapping |
dictionary | basis_mapping |
dictionary | diff_basis_mapping |
Create the kernel arguments for the supplied kernel as specified by the associated kernel metadata and the kernel ordering rules encoded in the ArgOrdering base class as method callbacks. A PSyIR symbol table is created containing appropriate LFRic PSyIR symbols to specify the arguments. If an argument is an array with one or more dimension sizes specified by another argument, then the associated array symbol is created so that it references the appropriate symbol. Related arguments - e.g. a field has an associated dofmap - are not directly connected, they must be inferred from the function space names. It is not yet clear whether this would be useful or not. TODO #928: This class should replace the current kernel stub generation code when all of its methods are implemented. :param kern: the kernel for which to create arguments. :type kern: :py:class:`psyclone.domain.lfric.LFRicKern`
Definition at line 54 of file kernel_interface.py.
def psyclone.domain.lfric.kernel_interface.KernelInterface.banded_dofmap | ( | self, | |
function_space, | |||
var_accesses = None |
|||
) |
Not implemented. :param function_space: the function space for this dofmap. :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: as this method is not implemented.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 510 of file kernel_interface.py.
def psyclone.domain.lfric.kernel_interface.KernelInterface.basis | ( | self, | |
function_space, | |||
var_accesses = None |
|||
) |
Create an LFRic basis function argument and add it to the symbol table and argument list. :param function_space: the function space for this basis function. :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo`
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 544 of file kernel_interface.py.
References psyclone.domain.lfric.kernel_interface.KernelInterface._create_basis(), and psyclone.domain.lfric.kernel_interface.KernelInterface.basis_mapping.
def psyclone.domain.lfric.kernel_interface.KernelInterface.cell_map | ( | self, | |
var_accesses = None |
|||
) |
Not implemented. :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: as this method is not implemented.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 202 of file kernel_interface.py.
def psyclone.domain.lfric.kernel_interface.KernelInterface.cell_position | ( | self, | |
var_accesses = None |
|||
) |
Create an LFRic cell-position object and add it to the symbol table and argument list. :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo`
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 145 of file kernel_interface.py.
References psyclone.domain.lfric.arg_ordering.ArgOrdering._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._read_access, psyclone.domain.lfric.arg_ordering.ArgOrdering._symtab(), and psyclone.domain.lfric.arg_ordering.ArgOrdering.append().
def psyclone.domain.lfric.kernel_interface.KernelInterface.cma_operator | ( | self, | |
arg, | |||
var_accesses = None |
|||
) |
Not implemented. :param arg: the CMA operator argument. :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: as this method is not implemented.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 390 of file kernel_interface.py.
def psyclone.domain.lfric.kernel_interface.KernelInterface.diff_basis | ( | self, | |
function_space, | |||
var_accesses = None |
|||
) |
Create an LFRic differential basis function argument and add it to the symbol table and argument list. :param function_space: the function space for this \ differential basis function. :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo`
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 564 of file kernel_interface.py.
References psyclone.domain.lfric.kernel_interface.KernelInterface._create_basis(), and psyclone.domain.lfric.kernel_interface.KernelInterface.diff_basis_mapping.
def psyclone.domain.lfric.kernel_interface.KernelInterface.field | ( | self, | |
arg, | |||
var_accesses = None |
|||
) |
Create an LFRic field argument and add it to the symbol table and argument list. Also declare the associated "undf" symbol if it has not already been declared so that it can be used to dimension the field argument. :param arg: the field to add. :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: if the datatype of the field is \ not supported.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 256 of file kernel_interface.py.
References psyclone.domain.lfric.arg_ordering.ArgOrdering._arg_index_to_metadata_index, psyclone.domain.lfric.arg_ordering.ArgOrdering._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._read_access, psyclone.domain.lfric.arg_ordering.ArgOrdering._symtab(), psyclone.domain.lfric.arg_ordering.ArgOrdering.append(), and psyclone.domain.lfric.kernel_interface.KernelInterface.field_mapping.
def psyclone.domain.lfric.kernel_interface.KernelInterface.field_bcs_kernel | ( | self, | |
function_space, | |||
var_accesses = None |
|||
) |
Create the boundary-dofs mask argument required for the enforce_bc_code kernel. Adds it to the symbol table and the argument list. :param function_space: the function space for this boundary condition. :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace` :param var_accesses: an unused optional argument that stores information about variable accesses. :type var_accesses: :py:class:`psyclone.core.VariablesAccessInfo` :raises InternalError: if the kernel does not have a single field as argument. :raises InternalError: if the field argument is not on the 'ANY_SPACE_1' function space.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 585 of file kernel_interface.py.
References psyclone.domain.lfric.arg_ordering.ArgOrdering._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._arglist, psyclone.domain.common.psylayer.psyloop.PSyLoop._kern, psyclone.domain.lfric.arg_ordering.ArgOrdering._kern, psyclone.domain.lfric.lfric_loop.LFRicLoop._kern, psyclone.domain.lfric.kernel_interface.KernelInterface._read_access, psyclone.domain.lfric.arg_ordering.ArgOrdering._symtab(), and psyclone.domain.lfric.arg_ordering.ArgOrdering.append().
def psyclone.domain.lfric.kernel_interface.KernelInterface.field_vector | ( | self, | |
argvect, | |||
var_accesses = None |
|||
) |
Create LFRic field vector arguments and add them to the symbol table and argument list. Also declare the associated "undf" symbol if it has not already been declared so that it can be used to dimension the field vector arguments. :param argvect: the field vector to add. :type argvect: :py:class:`psyclone.dynamo0p3.DynKernelArgument` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: if the datatype of the vector \ field is not supported.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 215 of file kernel_interface.py.
References psyclone.domain.lfric.arg_ordering.ArgOrdering._arg_index_to_metadata_index, psyclone.domain.lfric.arg_ordering.ArgOrdering._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._read_access, psyclone.domain.lfric.arg_ordering.ArgOrdering._symtab(), psyclone.domain.lfric.arg_ordering.ArgOrdering.append(), and psyclone.domain.lfric.kernel_interface.KernelInterface.vector_field_mapping.
def psyclone.domain.lfric.kernel_interface.KernelInterface.fs_common | ( | self, | |
function_space, | |||
var_accesses = None |
|||
) |
Create any arguments that are common to a particular function space. At this time the only common argument is the number of degrees of freedom. Create the associated LFRic symbol, and add it to the symbol table and argument list. :param function_space: the function space for any common arguments. :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo`
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 438 of file kernel_interface.py.
References psyclone.domain.lfric.arg_ordering.ArgOrdering._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._read_access, psyclone.domain.lfric.arg_ordering.ArgOrdering._symtab(), and psyclone.domain.lfric.arg_ordering.ArgOrdering.append().
def psyclone.domain.lfric.kernel_interface.KernelInterface.fs_compulsory_field | ( | self, | |
function_space, | |||
var_accesses = None |
|||
) |
Create any arguments that are compulsory for a field on a particular function space. At this time the compulsory arguments are the unique number of degrees of freedom and the dofmap. Create the associated LFRic symbol, and add it to the symbol table and argument list. Also declare the number of degrees of freedom and add to the symbol table if one has not yet been added. :param function_space: the function space for any compulsory arguments. :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo`
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 474 of file kernel_interface.py.
References psyclone.domain.lfric.arg_ordering.ArgOrdering._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._read_access, psyclone.domain.lfric.arg_ordering.ArgOrdering._symtab(), and psyclone.domain.lfric.arg_ordering.ArgOrdering.append().
def psyclone.domain.lfric.kernel_interface.KernelInterface.fs_intergrid | ( | self, | |
function_space, | |||
var_accesses = None |
|||
) |
Not implemented. :param arg: the CMA operator argument. :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: as this method is not implemented.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 459 of file kernel_interface.py.
def psyclone.domain.lfric.kernel_interface.KernelInterface.generate | ( | self, | |
var_accesses = None |
|||
) |
Call the generate base class then add the argument list as it can't be appended as we go along. :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo`
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 112 of file kernel_interface.py.
References psyclone.domain.lfric.arg_ordering.ArgOrdering._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._arglist, psyclone.domain.lfric.arg_ordering.ArgOrdering._symtab(), psyclone.psyir.nodes.node.ChildrenList.append(), psyclone.gocean1p0.GOKernelArguments.append(), psyclone.psyGen.Arguments.append(), and psyclone.domain.lfric.arg_ordering.ArgOrdering.append().
def psyclone.domain.lfric.kernel_interface.KernelInterface.indirection_dofmap | ( | self, | |
function_space, | |||
operator = None , |
|||
var_accesses = None |
|||
) |
Not implemented. :param function_space: the function space for this dofmap. :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace` :param operator: the CMA operator. :type operator: :py:class:`psyclone.dynamo0p3.DynKernelArgument` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: as this method is not implemented.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 525 of file kernel_interface.py.
def psyclone.domain.lfric.kernel_interface.KernelInterface.mesh_height | ( | self, | |
var_accesses = None |
|||
) |
Create an LFRic mesh height object and add it to the symbol table and argument list. :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo`
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 160 of file kernel_interface.py.
References psyclone.domain.lfric.arg_ordering.ArgOrdering._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._read_access, psyclone.domain.lfric.arg_ordering.ArgOrdering._symtab(), and psyclone.domain.lfric.arg_ordering.ArgOrdering.append().
def psyclone.domain.lfric.kernel_interface.KernelInterface.mesh_properties | ( | self, | |
var_accesses = None |
|||
) |
Properties associated with the mesh :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo`
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 662 of file kernel_interface.py.
def psyclone.domain.lfric.kernel_interface.KernelInterface.operator | ( | self, | |
arg, | |||
var_accesses = None |
|||
) |
Create an LFRic operator argument and an ncells argument and add them to the symbol table and argument list. Also declare the associated 'fs_from', 'fs_to' symbols if they have not already been declared so that they can be used to dimension the operator symbol (as well as ncells). :param arg: the operator to add. :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument` :param var_accesses: an unused optional argument that stores information about variable accesses. :type var_accesses: :py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: if the datatype of the field is not supported.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 342 of file kernel_interface.py.
References psyclone.domain.lfric.arg_ordering.ArgOrdering._arg_index_to_metadata_index, psyclone.domain.lfric.arg_ordering.ArgOrdering._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._read_access, psyclone.domain.lfric.arg_ordering.ArgOrdering._symtab(), and psyclone.domain.lfric.arg_ordering.ArgOrdering.append().
def psyclone.domain.lfric.kernel_interface.KernelInterface.operator_bcs_kernel | ( | self, | |
function_space, | |||
var_accesses = None |
|||
) |
Not implemented. :param function_space: the function space for this bcs kernel :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: as this method is not implemented.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 635 of file kernel_interface.py.
def psyclone.domain.lfric.kernel_interface.KernelInterface.quad_rule | ( | self, | |
var_accesses = None |
|||
) |
Create LFRic arguments associated with the required quadrature, if they do not already exist, and add them to the symbol table and argument list. The arguments depend on the type of quadrature requested. :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises InternalError: if an unsupported quadrature shape is \ found.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 673 of file kernel_interface.py.
def psyclone.domain.lfric.kernel_interface.KernelInterface.ref_element_properties | ( | self, | |
var_accesses = None |
|||
) |
Properties associated with the reference element :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo`
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 651 of file kernel_interface.py.
def psyclone.domain.lfric.kernel_interface.KernelInterface.scalar | ( | self, | |
scalar_arg, | |||
var_accesses = None |
|||
) |
Create an LFRic scalar argument and add it to the symbol table and argument list. :param scalar_arg: the scalar to add. :type scalar_arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: if the datatype of the scalar is \ not supported.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 405 of file kernel_interface.py.
References psyclone.domain.lfric.arg_ordering.ArgOrdering._arg_index_to_metadata_index, psyclone.domain.lfric.arg_ordering.ArgOrdering._arglist, psyclone.domain.lfric.kernel_interface.KernelInterface._arglist, psyclone.domain.lfric.arg_ordering.ArgOrdering._symtab(), and psyclone.domain.lfric.arg_ordering.ArgOrdering.append().
def psyclone.domain.lfric.kernel_interface.KernelInterface.stencil | ( | self, | |
arg, | |||
var_accesses = None |
|||
) |
Not implemented. :param arg: the kernel argument with which the stencil is associated. :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: as this method is not implemented.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 327 of file kernel_interface.py.
def psyclone.domain.lfric.kernel_interface.KernelInterface.stencil_unknown_direction | ( | self, | |
arg, | |||
var_accesses = None |
|||
) |
Not implemented. :param arg: the kernel argument with which the stencil is associated. :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: as this method is not implemented.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 311 of file kernel_interface.py.
def psyclone.domain.lfric.kernel_interface.KernelInterface.stencil_unknown_extent | ( | self, | |
arg, | |||
var_accesses = None |
|||
) |
Not implemented. :param arg: the kernel argument with which the stencil is associated. :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument` :param var_accesses: an unused optional argument that stores \ information about variable accesses. :type var_accesses: :\ py:class:`psyclone.core.VariablesAccessInfo` :raises NotImplementedError: as this method is not implemented.
Reimplemented from psyclone.domain.lfric.arg_ordering.ArgOrdering.
Definition at line 295 of file kernel_interface.py.
|
static |
Definition at line 91 of file kernel_interface.py.
|
static |
Definition at line 97 of file kernel_interface.py.
|
static |
Definition at line 79 of file kernel_interface.py.
|
static |
Definition at line 85 of file kernel_interface.py.