Reference Guide  2.5.0
psyclone.domain.lfric.kernel_interface.KernelInterface Class Reference
Inheritance diagram for psyclone.domain.lfric.kernel_interface.KernelInterface:
Collaboration diagram for psyclone.domain.lfric.kernel_interface.KernelInterface:

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
 

Detailed Description

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.

Member Function Documentation

◆ banded_dofmap()

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.

510  def banded_dofmap(self, function_space, var_accesses=None):
511  '''Not implemented.
512 
513  :param function_space: the function space for this dofmap.
514  :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace`
515  :param var_accesses: an unused optional argument that stores \
516  information about variable accesses.
517  :type var_accesses: :\
518  py:class:`psyclone.core.VariablesAccessInfo`
519 
520  :raises NotImplementedError: as this method is not implemented.
521 
522  '''
523  raise NotImplementedError("TODO #928: banded_dofmap not implemented")
524 
Here is the caller graph for this function:

◆ basis()

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.

544  def basis(self, function_space, var_accesses=None):
545  '''Create an LFRic basis function argument and add it to the symbol
546  table and argument list.
547 
548  :param function_space: the function space for this basis function.
549  :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace`
550  :param var_accesses: an unused optional argument that stores \
551  information about variable accesses.
552  :type var_accesses: :\
553  py:class:`psyclone.core.VariablesAccessInfo`
554 
555  '''
556  basis_name_func = function_space.get_basis_name
557  # This import must be placed here to avoid circular dependencies
558  # pylint: disable=import-outside-toplevel
559  from psyclone.dynamo0p3 import DynBasisFunctions
560  first_dim_value_func = DynBasisFunctions.basis_first_dim_value
561  self._create_basis(function_space, self.basis_mapping,
562  basis_name_func, first_dim_value_func)
563 

References psyclone.domain.lfric.kernel_interface.KernelInterface._create_basis(), and psyclone.domain.lfric.kernel_interface.KernelInterface.basis_mapping.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cell_map()

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.

202  def cell_map(self, var_accesses=None):
203  '''Not implemented.
204 
205  :param var_accesses: an unused optional argument that stores \
206  information about variable accesses.
207  :type var_accesses: :\
208  py:class:`psyclone.core.VariablesAccessInfo`
209 
210  :raises NotImplementedError: as this method is not implemented.
211 
212  '''
213  raise NotImplementedError("TODO #928: cell_map not implemented")
214 
Here is the caller graph for this function:

◆ cell_position()

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.

145  def cell_position(self, var_accesses=None):
146  '''Create an LFRic cell-position object and add it to the symbol table
147  and argument list.
148 
149  :param var_accesses: an unused optional argument that stores \
150  information about variable accesses.
151  :type var_accesses: :\
152  py:class:`psyclone.core.VariablesAccessInfo`
153 
154  '''
155  symbol = self._symtab.find_or_create_tag(
156  "cell", symbol_type=LFRicTypes("CellPositionDataSymbol"),
157  interface=self._read_access)
158  self._arglist.append(symbol)
159 

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cma_operator()

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.

390  def cma_operator(self, arg, var_accesses=None):
391  '''Not implemented.
392 
393  :param arg: the CMA operator argument.
394  :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument`
395  :param var_accesses: an unused optional argument that stores \
396  information about variable accesses.
397  :type var_accesses: :\
398  py:class:`psyclone.core.VariablesAccessInfo`
399 
400  :raises NotImplementedError: as this method is not implemented.
401 
402  '''
403  raise NotImplementedError("TODO #928: cma_operator not implemented")
404 
Here is the caller graph for this function:

◆ diff_basis()

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.

564  def diff_basis(self, function_space, var_accesses=None):
565  '''Create an LFRic differential basis function argument and add it to
566  the symbol table and argument list.
567 
568  :param function_space: the function space for this \
569  differential basis function.
570  :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace`
571  :param var_accesses: an unused optional argument that stores \
572  information about variable accesses.
573  :type var_accesses: :\
574  py:class:`psyclone.core.VariablesAccessInfo`
575 
576  '''
577  basis_name_func = function_space.get_diff_basis_name
578  # This import must be placed here to avoid circular dependencies
579  # pylint: disable=import-outside-toplevel
580  from psyclone.dynamo0p3 import DynBasisFunctions
581  first_dim_value_func = DynBasisFunctions.diff_basis_first_dim_value
582  self._create_basis(function_space, self.diff_basis_mapping,
583  basis_name_func, first_dim_value_func)
584 

References psyclone.domain.lfric.kernel_interface.KernelInterface._create_basis(), and psyclone.domain.lfric.kernel_interface.KernelInterface.diff_basis_mapping.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ field()

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.

256  def field(self, arg, var_accesses=None):
257  '''Create an LFRic field argument and add it to the symbol table and
258  argument list. Also declare the associated "undf" symbol if it
259  has not already been declared so that it can be used to
260  dimension the field argument.
261 
262  :param arg: the field to add.
263  :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument`
264  :param var_accesses: an unused optional argument that stores \
265  information about variable accesses.
266  :type var_accesses: :\
267  py:class:`psyclone.core.VariablesAccessInfo`
268 
269  :raises NotImplementedError: if the datatype of the field is \
270  not supported.
271 
272  '''
273  fs_name = arg.function_space.orig_name
274 
275  undf_symbol = self._symtab.find_or_create_tag(
276  f"undf_{fs_name}",
277  symbol_type=LFRicTypes("NumberOfUniqueDofsDataSymbol"),
278  fs=fs_name, interface=self._read_access)
279 
280  try:
281  type_name = self.field_mapping[arg.intrinsic_type]
282  field_class = LFRicTypes(type_name)
283  except KeyError as info:
284  message = (f"kernel interface does not support a field of type "
285  f"'{arg.intrinsic_type}'.")
286  raise NotImplementedError(message) from info
287  field_data_symbol = self._symtab.find_or_create_tag(
288  arg.name, interface=ArgumentInterface(INTENT_MAPPING[arg.intent]),
289  symbol_type=field_class, dims=[Reference(undf_symbol)], fs=fs_name)
290 
291  self._arg_index_to_metadata_index[len(self._arglist)] = (
292  arg.metadata_index)
293  self._arglist.append(field_data_symbol)
294 

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ field_bcs_kernel()

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.

585  def field_bcs_kernel(self, function_space, var_accesses=None):
586  '''Create the boundary-dofs mask argument required for the
587  enforce_bc_code kernel. Adds it to the symbol table and the argument
588  list.
589 
590  :param function_space: the function space for this boundary condition.
591  :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace`
592  :param var_accesses: an unused optional argument that stores
593  information about variable accesses.
594  :type var_accesses: :py:class:`psyclone.core.VariablesAccessInfo`
595 
596  :raises InternalError: if the kernel does not have a single field as
597  argument.
598  :raises InternalError: if the field argument is not on the
599  'ANY_SPACE_1' function space.
600 
601  '''
602  # Sanity check - expect the enforce_bc_code to have a single argument
603  # that is a field.
604  if (len(self._kern.arguments.args) != 1 or
605  not self._kern.arguments.args[0].is_field):
606  const = LFRicConstants()
607  raise InternalError(
608  f"Kernel '{self._kern.name}' applies boundary conditions to a "
609  f"field and therefore should have a single, field argument "
610  f"(one of {const.VALID_FIELD_NAMES}) but got "
611  f"{[arg.argument_type for arg in self._kern.arguments.args]}")
612  farg = self._kern.arguments.args[0]
613  fspace = farg.function_space
614  # Sanity check - expect the field argument to the enforce_bc_code
615  # kernel to be on the ANY_SPACE_1 space.
616  if fspace.orig_name != "any_space_1":
617  raise InternalError(
618  f"Kernel '{self._kern.name}' applies boundary conditions to a "
619  f"field but the supplied argument, '{farg.name}', is on "
620  f"'{fspace.orig_name}' rather than the expected 'ANY_SPACE_1'")
621 
622  ndf_symbol = self._symtab.find_or_create_tag(
623  f"ndf_{fspace.orig_name}", fs=fspace.orig_name,
624  symbol_type=LFRicTypes("NumberOfDofsDataSymbol"),
625  interface=self._read_access)
626 
627  # Add the boundary-dofs array argument.
628  sym = self._symtab.find_or_create_tag(
629  f"boundary_dofs_{farg.name}",
630  interface=self._read_access,
631  symbol_type=LFRicTypes("VerticalBoundaryDofMaskDataSymbol"),
632  dims=[Reference(ndf_symbol), 2])
633  self._arglist.append(sym)
634 

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ field_vector()

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.

215  def field_vector(self, argvect, var_accesses=None):
216  '''Create LFRic field vector arguments and add them to the symbol
217  table and argument list. Also declare the associated "undf"
218  symbol if it has not already been declared so that it can be
219  used to dimension the field vector arguments.
220 
221  :param argvect: the field vector to add.
222  :type argvect: :py:class:`psyclone.dynamo0p3.DynKernelArgument`
223  :param var_accesses: an unused optional argument that stores \
224  information about variable accesses.
225  :type var_accesses: :\
226  py:class:`psyclone.core.VariablesAccessInfo`
227 
228  :raises NotImplementedError: if the datatype of the vector \
229  field is not supported.
230 
231  '''
232  fs_name = argvect.function_space.orig_name
233  undf_symbol = self._symtab.find_or_create_tag(
234  f"undf_{fs_name}", fs=fs_name,
235  symbol_type=LFRicTypes("NumberOfUniqueDofsDataSymbol"),
236  interface=self._read_access)
237 
238  interface = ArgumentInterface(INTENT_MAPPING[argvect.intent])
239  try:
240  type_name = self.vector_field_mapping[argvect.intrinsic_type]
241  field_class = LFRicTypes(type_name)
242  except KeyError as info:
243  message = (f"kernel interface does not support a vector field of "
244  f"type '{argvect.intrinsic_type}'.")
245  raise NotImplementedError(message) from info
246  for idx in range(argvect.vector_size):
247  tag = f"{argvect.name}_v{idx}"
248  field_data_symbol = self._symtab.find_or_create_tag(
249  tag, symbol_type=field_class, dims=[Reference(undf_symbol)],
250  fs=fs_name, interface=interface)
251 
252  self._arg_index_to_metadata_index[len(self._arglist)] = (
253  argvect.metadata_index)
254  self._arglist.append(field_data_symbol)
255 

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fs_common()

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.

438  def fs_common(self, function_space, var_accesses=None):
439  '''Create any arguments that are common to a particular function
440  space. At this time the only common argument is the number of
441  degrees of freedom. Create the associated LFRic symbol, and
442  add it to the symbol table and argument list.
443 
444  :param function_space: the function space for any common arguments.
445  :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace`
446  :param var_accesses: an unused optional argument that stores \
447  information about variable accesses.
448  :type var_accesses: :\
449  py:class:`psyclone.core.VariablesAccessInfo`
450 
451  '''
452  fs_name = function_space.orig_name
453  ndf_symbol = self._symtab.find_or_create_tag(
454  f"ndf_{fs_name}", fs=fs_name,
455  symbol_type=LFRicTypes("NumberOfDofsDataSymbol"),
456  interface=self._read_access)
457  self._arglist.append(ndf_symbol)
458 

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fs_compulsory_field()

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.

474  def fs_compulsory_field(self, function_space, var_accesses=None):
475  '''Create any arguments that are compulsory for a field on a
476  particular function space. At this time the compulsory
477  arguments are the unique number of degrees of freedom and the
478  dofmap. Create the associated LFRic symbol, and add it to the
479  symbol table and argument list. Also declare the number of
480  degrees of freedom and add to the symbol table if one has not
481  yet been added.
482 
483  :param function_space: the function space for any compulsory arguments.
484  :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace`
485  :param var_accesses: an unused optional argument that stores \
486  information about variable accesses.
487  :type var_accesses: :\
488  py:class:`psyclone.core.VariablesAccessInfo`
489 
490  '''
491  fs_name = function_space.orig_name
492  undf_symbol = self._symtab.find_or_create_tag(
493  f"undf_{fs_name}", fs=fs_name,
494  symbol_type=LFRicTypes("NumberOfUniqueDofsDataSymbol"),
495  interface=self._read_access)
496  self._arglist.append(undf_symbol)
497 
498  fs_name = function_space.orig_name
499  ndf_symbol = self._symtab.find_or_create_tag(
500  f"ndf_{fs_name}", fs=fs_name,
501  symbol_type=LFRicTypes("NumberOfDofsDataSymbol"),
502  interface=self._read_access)
503 
504  dofmap_symbol = self._symtab.find_or_create_tag(
505  f"dofmap_{fs_name}", fs=fs_name,
506  symbol_type=LFRicTypes("DofMapDataSymbol"),
507  dims=[Reference(ndf_symbol)], interface=self._read_access)
508  self._arglist.append(dofmap_symbol)
509 

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fs_intergrid()

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.

459  def fs_intergrid(self, function_space, var_accesses=None):
460  '''Not implemented.
461 
462  :param arg: the CMA operator argument.
463  :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument`
464  :param var_accesses: an unused optional argument that stores \
465  information about variable accesses.
466  :type var_accesses: :\
467  py:class:`psyclone.core.VariablesAccessInfo`
468 
469  :raises NotImplementedError: as this method is not implemented.
470 
471  '''
472  raise NotImplementedError("TODO #928: fs_intergrid not implemented")
473 
Here is the caller graph for this function:

◆ generate()

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.

112  def generate(self, var_accesses=None):
113  '''Call the generate base class then add the argument list as it can't
114  be appended as we go along.
115 
116  :param var_accesses: an unused optional argument that stores \
117  information about variable accesses.
118  :type var_accesses: :\
119  py:class:`psyclone.core.VariablesAccessInfo`
120 
121  '''
122  super().generate(var_accesses=var_accesses)
123  # Set the argument list for the symbol table. This is done at
124  # the end after incrementally adding symbols to the _args
125  # list, as it is not possible to incrementally add symbols to
126  # the symbol table argument list.
127  self._symtab.specify_argument_list(self._arglist)
128  # While data dependence analysis does not use the symbol
129  # table, see #845, we have to provide variable information
130  # separately. This is done by using the base class append()
131  # method. However, this method also adds the variable names to the
132  # internal _arglist list which we do not want as we have
133  # already added our symbols there. Therefore we need to remove
134  # them afterwards.
135  # Map from symbol table accesses to dependence analysis accesses.
136  mapping = {ArgumentInterface.Access.READ: AccessType.READ,
137  ArgumentInterface.Access.READWRITE: AccessType.READWRITE,
138  ArgumentInterface.Access.WRITE: AccessType.WRITE}
139  len_arglist = len(self._arglist)
140  for symbol in self._symtab.symbols:
141  self.append(symbol.name, var_accesses,
142  mode=mapping[symbol.interface.access])
143  self._arglist = self._arglist[:len_arglist]
144 

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().

Here is the call graph for this function:

◆ indirection_dofmap()

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.

526  var_accesses=None):
527  '''Not implemented.
528 
529  :param function_space: the function space for this dofmap.
530  :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace`
531  :param operator: the CMA operator.
532  :type operator: :py:class:`psyclone.dynamo0p3.DynKernelArgument`
533  :param var_accesses: an unused optional argument that stores \
534  information about variable accesses.
535  :type var_accesses: :\
536  py:class:`psyclone.core.VariablesAccessInfo`
537 
538  :raises NotImplementedError: as this method is not implemented.
539 
540  '''
541  raise NotImplementedError(
542  "TODO #928: indirection_dofmap not implemented")
543 
Here is the caller graph for this function:

◆ mesh_height()

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.

160  def mesh_height(self, var_accesses=None):
161  '''Create an LFRic mesh height object and add it to the symbol table
162  and argument list.
163 
164  :param var_accesses: an unused optional argument that stores \
165  information about variable accesses.
166  :type var_accesses: :\
167  py:class:`psyclone.core.VariablesAccessInfo`
168 
169  '''
170  symbol = self._symtab.find_or_create_tag(
171  "nlayers", symbol_type=LFRicTypes("MeshHeightDataSymbol"),
172  interface=self._read_access)
173  self._arglist.append(symbol)
174 

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mesh_properties()

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.

662  def mesh_properties(self, var_accesses=None):
663  ''' Properties associated with the mesh
664 
665  :param var_accesses: an unused optional argument that stores \
666  information about variable accesses.
667  :type var_accesses: :\
668  py:class:`psyclone.core.VariablesAccessInfo`
669 
670  '''
671  # This callback does not contribute any kernel arguments
672 
Here is the caller graph for this function:

◆ operator()

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.

342  def operator(self, arg, var_accesses=None):
343  '''Create an LFRic operator argument and an ncells argument and add
344  them to the symbol table and argument list. Also declare the
345  associated 'fs_from', 'fs_to' symbols if they have not already
346  been declared so that they can be used to dimension the
347  operator symbol (as well as ncells).
348 
349  :param arg: the operator to add.
350  :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument`
351  :param var_accesses: an unused optional argument that stores
352  information about variable accesses.
353  :type var_accesses: :py:class:`psyclone.core.VariablesAccessInfo`
354 
355  :raises NotImplementedError: if the datatype of the field is
356  not supported.
357 
358  '''
359  fs_from_name = arg.function_space_from.orig_name
360 
361  ndf_symbol_from = self._symtab.find_or_create_tag(
362  f"ndf_{fs_from_name}", fs=fs_from_name,
363  symbol_type=LFRicTypes("NumberOfDofsDataSymbol"),
364  interface=self._read_access)
365  fs_to_name = arg.function_space_to.orig_name
366  ndf_symbol_to = self._symtab.find_or_create_tag(
367  f"ndf_{fs_to_name}", fs=fs_to_name,
368  symbol_type=LFRicTypes("NumberOfDofsDataSymbol"),
369  interface=self._read_access)
370 
371  # We may already have a symbol for this argument as we add it for each
372  # operator (TODO #2074).
373  ncells = self._symtab.find_or_create(
374  "ncell_3d",
375  symbol_type=LFRicTypes("NumberOfCellsDataSymbol"),
376  interface=self._read_access)
377  self._arglist.append(ncells)
378 
379  op_arg_symbol = self._symtab.find_or_create_tag(
380  arg.name, symbol_type=LFRicTypes("OperatorDataSymbol"),
381  dims=[Reference(ndf_symbol_from), Reference(ndf_symbol_to),
382  Reference(ncells)],
383  fs_from=fs_from_name, fs_to=fs_to_name,
384  interface=ArgumentInterface(INTENT_MAPPING[arg.intent]))
385 
386  self._arg_index_to_metadata_index[len(self._arglist)] = (
387  arg.metadata_index)
388  self._arglist.append(op_arg_symbol)
389 

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator_bcs_kernel()

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.

635  def operator_bcs_kernel(self, function_space, var_accesses=None):
636  '''Not implemented.
637 
638  :param function_space: the function space for this bcs kernel
639  :type function_space: :py:class:`psyclone.domain.lfric.FunctionSpace`
640  :param var_accesses: an unused optional argument that stores \
641  information about variable accesses.
642  :type var_accesses: :\
643  py:class:`psyclone.core.VariablesAccessInfo`
644 
645  :raises NotImplementedError: as this method is not implemented.
646 
647  '''
648  raise NotImplementedError(
649  "TODO #928: operator_bcs_kernel not implemented")
650 
Here is the caller graph for this function:

◆ quad_rule()

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.

673  def quad_rule(self, var_accesses=None):
674  '''Create LFRic arguments associated with the required quadrature, if
675  they do not already exist, and add them to the symbol table
676  and argument list. The arguments depend on the type of
677  quadrature requested.
678 
679  :param var_accesses: an unused optional argument that stores \
680  information about variable accesses.
681  :type var_accesses: :\
682  py:class:`psyclone.core.VariablesAccessInfo`
683 
684  :raises InternalError: if an unsupported quadrature shape is \
685  found.
686 
687  '''
688  # The kernel captures all the required quadrature shapes
689  for shape in self._kern.qr_rules:
690  if shape == "gh_quadrature_xyoz":
691  nqp_xy = self._symtab.find_or_create_tag(
692  "nqp_xy",
693  symbol_type=LFRicTypes("NumberOfQrPointsInXyDataSymbol"),
694  interface=self._read_access)
695  nqp_z = self._symtab.find_or_create_tag(
696  "nqp_z",
697  symbol_type=LFRicTypes("NumberOfQrPointsInZDataSymbol"),
698  interface=self._read_access)
699  weights_xy = self._symtab.find_or_create_tag(
700  "weights_xy",
701  symbol_type=LFRicTypes("QrWeightsInXyDataSymbol"),
702  dims=[Reference(nqp_xy)], interface=self._read_access)
703  weights_z = self._symtab.find_or_create_tag(
704  "weights_z",
705  symbol_type=LFRicTypes("QrWeightsInZDataSymbol"),
706  dims=[Reference(nqp_z)], interface=self._read_access)
707  self._arglist.extend([nqp_xy, nqp_z, weights_xy, weights_z])
708  elif shape == "gh_quadrature_face":
709  nfaces = self._symtab.find_or_create_tag(
710  "nfaces",
711  symbol_type=LFRicTypes("NumberOfFacesDataSymbol"),
712  interface=self._read_access)
713  nqp = self._symtab.find_or_create_tag(
714  "nqp_faces",
715  symbol_type=LFRicTypes(
716  "NumberOfQrPointsInFacesDataSymbol"),
717  interface=self._read_access)
718  weights = self._symtab.find_or_create_tag(
719  "weights_faces",
720  symbol_type=LFRicTypes("QrWeightsInFacesDataSymbol"),
721  dims=[Reference(nqp)], interface=self._read_access)
722  self._arglist.extend([nfaces, nqp, weights])
723  elif shape == "gh_quadrature_edge":
724  nedges = self._symtab.find_or_create_tag(
725  "nedges",
726  symbol_type=LFRicTypes("NumberOfEdgesDataSymbol"),
727  interface=self._read_access)
728  nqp = self._symtab.find_or_create_tag(
729  "nqp_edges",
730  symbol_type=LFRicTypes(
731  "NumberOfQrPointsInEdgesDataSymbol"),
732  interface=self._read_access)
733  weights = self._symtab.find_or_create_tag(
734  "weights_edges",
735  symbol_type=LFRicTypes("QrWeightsInEdgesDataSymbol"),
736  dims=[Reference(nqp)], interface=self._read_access)
737  self._arglist.extend([nedges, nqp, weights])
738  else:
739  raise InternalError(f"Unsupported quadrature shape '{shape}' "
740  f"found in kernel_interface.")
741 
Here is the caller graph for this function:

◆ ref_element_properties()

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.

651  def ref_element_properties(self, var_accesses=None):
652  ''' Properties associated with the reference element
653 
654  :param var_accesses: an unused optional argument that stores \
655  information about variable accesses.
656  :type var_accesses: :\
657  py:class:`psyclone.core.VariablesAccessInfo`
658 
659  '''
660  # This callback does not contribute any kernel arguments
661 
Here is the caller graph for this function:

◆ scalar()

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.

405  def scalar(self, scalar_arg, var_accesses=None):
406  '''Create an LFRic scalar argument and add it to the symbol table and
407  argument list.
408 
409  :param scalar_arg: the scalar to add.
410  :type scalar_arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument`
411  :param var_accesses: an unused optional argument that stores \
412  information about variable accesses.
413  :type var_accesses: :\
414  py:class:`psyclone.core.VariablesAccessInfo`
415 
416  :raises NotImplementedError: if the datatype of the scalar is \
417  not supported.
418 
419  '''
420  mapping = {
421  "integer": LFRicTypes("LFRicIntegerScalarDataSymbol"),
422  "real": LFRicTypes("LFRicRealScalarDataSymbol"),
423  "logical": LFRicTypes("LFRicLogicalScalarDataSymbol")}
424  try:
425  symbol = self._symtab.find_or_create_tag(
426  scalar_arg.name,
427  symbol_type=mapping[scalar_arg.intrinsic_type],
428  interface=ArgumentInterface(INTENT_MAPPING[scalar_arg.intent]))
429  except KeyError as info:
430  message = (
431  f"scalar of type '{scalar_arg.intrinsic_type}' not implemented"
432  f" in KernelInterface class.")
433  raise NotImplementedError(message) from info
434  self._arg_index_to_metadata_index[len(self._arglist)] = (
435  scalar_arg.metadata_index)
436  self._arglist.append(symbol)
437 

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stencil()

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.

327  def stencil(self, arg, var_accesses=None):
328  '''Not implemented.
329 
330  :param arg: the kernel argument with which the stencil is associated.
331  :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument`
332  :param var_accesses: an unused optional argument that stores \
333  information about variable accesses.
334  :type var_accesses: :\
335  py:class:`psyclone.core.VariablesAccessInfo`
336 
337  :raises NotImplementedError: as this method is not implemented.
338 
339  '''
340  raise NotImplementedError("TODO #928: stencil not implemented")
341 
Here is the caller graph for this function:

◆ stencil_unknown_direction()

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.

311  def stencil_unknown_direction(self, arg, var_accesses=None):
312  '''Not implemented.
313 
314  :param arg: the kernel argument with which the stencil is associated.
315  :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument`
316  :param var_accesses: an unused optional argument that stores \
317  information about variable accesses.
318  :type var_accesses: :\
319  py:class:`psyclone.core.VariablesAccessInfo`
320 
321  :raises NotImplementedError: as this method is not implemented.
322 
323  '''
324  raise NotImplementedError(
325  "TODO #928: stencil_unknown_direction not implemented")
326 
Here is the caller graph for this function:

◆ stencil_unknown_extent()

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.

295  def stencil_unknown_extent(self, arg, var_accesses=None):
296  '''Not implemented.
297 
298  :param arg: the kernel argument with which the stencil is associated.
299  :type arg: :py:class:`psyclone.dynamo0p3.DynKernelArgument`
300  :param var_accesses: an unused optional argument that stores \
301  information about variable accesses.
302  :type var_accesses: :\
303  py:class:`psyclone.core.VariablesAccessInfo`
304 
305  :raises NotImplementedError: as this method is not implemented.
306 
307  '''
308  raise NotImplementedError(
309  "TODO #928: stencil_unknown_extent not implemented")
310 
Here is the caller graph for this function:

Member Data Documentation

◆ basis_mapping

dictionary psyclone.domain.lfric.kernel_interface.KernelInterface.basis_mapping
static
Initial value:
= {
"gh_quadrature_xyoz": "BasisFunctionQrXyozDataSymbol",
"gh_quadrature_face": "BasisFunctionQrFaceDataSymbol",
"gh_quadrature_edge": "BasisFunctionQrEdgeDataSymbol"}

Definition at line 91 of file kernel_interface.py.

◆ diff_basis_mapping

dictionary psyclone.domain.lfric.kernel_interface.KernelInterface.diff_basis_mapping
static
Initial value:
= {
"gh_quadrature_xyoz": "DiffBasisFunctionQrXyozDataSymbol",
"gh_quadrature_face": "DiffBasisFunctionQrFaceDataSymbol",
"gh_quadrature_edge": "DiffBasisFunctionQrEdgeDataSymbol"}

Definition at line 97 of file kernel_interface.py.

◆ field_mapping

dictionary psyclone.domain.lfric.kernel_interface.KernelInterface.field_mapping
static
Initial value:
= {
"integer": "IntegerFieldDataSymbol",
"real": "RealFieldDataSymbol",
"logical": "LogicalFieldDataSymbol"}

Definition at line 79 of file kernel_interface.py.

◆ vector_field_mapping

dictionary psyclone.domain.lfric.kernel_interface.KernelInterface.vector_field_mapping
static
Initial value:
= {
"integer": "IntegerVectorFieldDataSymbol",
"real": "RealVectorFieldDataSymbol",
"logical": "LogicalVectorFieldDataSymbol"}

Definition at line 85 of file kernel_interface.py.


The documentation for this class was generated from the following file: