Reference Guide  2.5.0
psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata Class Reference
Inheritance diagram for psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata:
Collaboration diagram for psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata:

Public Member Functions

def __init__ (self, ast, name=None)
 
def func_descriptors (self)
 
def cma_operation (self)
 
def eval_shapes (self)
 
def eval_targets (self)
 
def is_intergrid (self)
 
- Public Member Functions inherited from psyclone.parse.kernel.KernelType
def name (self)
 
def iterates_over (self)
 
def procedure (self)
 
def nargs (self)
 
def arg_descriptors (self)
 
def __repr__ (self)
 
def get_integer_variable (self, name)
 
def get_integer_array (self, name)
 

Public Attributes

 reference_element
 
 mesh
 

Detailed Description

Captures the Kernel subroutine code and metadata describing
the subroutine for the LFRic API.

:param ast: fparser1 AST for the kernel.
:type ast: :py:class:`fparser.block_statements.BeginSource`
:param str name: the name of this kernel.

:raises ParseError: if the metadata does not conform to the
                    rules for the LFRic API.

Definition at line 56 of file lfric_kern_metadata.py.

Member Function Documentation

◆ cma_operation()

def psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata.cma_operation (   self)
Returns the type of CMA operation identified from the kernel
metadata (one of 'assembly', 'apply' or 'matrix-matrix') or
None if the kernel does not involve CMA operators 

Definition at line 629 of file lfric_kern_metadata.py.

629  def cma_operation(self):
630  '''
631  Returns the type of CMA operation identified from the kernel
632  metadata (one of 'assembly', 'apply' or 'matrix-matrix') or
633  None if the kernel does not involve CMA operators '''
634  return self._cma_operation
635 

References psyclone.domain.lfric.lfric_kern.LFRicKern._cma_operation, and psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata._cma_operation.

◆ eval_shapes()

def psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata.eval_shapes (   self)
Returns the shape(s) of evaluator required by this kernel or an
empty string if none.

:return: the shape(s) of the evaluator (one of VALID_EVALUATOR_SHAPES)
         or an empty list if the kernel does not require one.
:rtype: list

Definition at line 637 of file lfric_kern_metadata.py.

637  def eval_shapes(self):
638  '''
639  Returns the shape(s) of evaluator required by this kernel or an
640  empty string if none.
641 
642  :return: the shape(s) of the evaluator (one of VALID_EVALUATOR_SHAPES)
643  or an empty list if the kernel does not require one.
644  :rtype: list
645 
646  '''
647  return self._eval_shapes
648 

References psyclone.domain.lfric.lfric_kern.LFRicKern._eval_shapes, and psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata._eval_shapes.

◆ eval_targets()

def psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata.eval_targets (   self)
Returns the list of function spaces upon which any evaluator must be
provided. This list is obtained from the GH_EVALUATOR_TARGETS metadata
entry (if present). If this is not specified in the metadata then
we default to providing evaluators on all of the function spaces
associated with the arguments which this kernel updates.

:return: list of the names of the function spaces (as they appear in
         kernel metadata) upon which any evaluator must be provided.
:rtype: list of str

Definition at line 650 of file lfric_kern_metadata.py.

650  def eval_targets(self):
651  '''
652  Returns the list of function spaces upon which any evaluator must be
653  provided. This list is obtained from the GH_EVALUATOR_TARGETS metadata
654  entry (if present). If this is not specified in the metadata then
655  we default to providing evaluators on all of the function spaces
656  associated with the arguments which this kernel updates.
657 
658  :return: list of the names of the function spaces (as they appear in
659  kernel metadata) upon which any evaluator must be provided.
660  :rtype: list of str
661  '''
662  return self._eval_targets
663 

References psyclone.domain.lfric.lfric_kern.LFRicKern._eval_targets, psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata._eval_targets, and psyclone.dynamo0p3.DynBasisFunctions._eval_targets.

◆ func_descriptors()

def psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata.func_descriptors (   self)
Returns metadata about the function spaces within a
Kernel. This metadata is provided within Kernel code via the
meta_funcs variable. Information is returned as a list of
DynFuncDescriptor03 objects, one for each function space. 

Definition at line 620 of file lfric_kern_metadata.py.

620  def func_descriptors(self):
621  '''
622  Returns metadata about the function spaces within a
623  Kernel. This metadata is provided within Kernel code via the
624  meta_funcs variable. Information is returned as a list of
625  DynFuncDescriptor03 objects, one for each function space. '''
626  return self._func_descriptors
627 

References psyclone.domain.lfric.lfric_builtins.LFRicBuiltIn._func_descriptors, psyclone.domain.lfric.lfric_kern.LFRicKern._func_descriptors, psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata._func_descriptors, and psyclone.psyGen.BuiltIn._func_descriptors.

◆ is_intergrid()

def psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata.is_intergrid (   self)
Returns whether or not this is an inter-grid kernel.

:return: True if kernel is an inter-grid kernel, False otherwise
:rtype: bool

Definition at line 665 of file lfric_kern_metadata.py.

665  def is_intergrid(self):
666  '''
667  Returns whether or not this is an inter-grid kernel.
668 
669  :return: True if kernel is an inter-grid kernel, False otherwise
670  :rtype: bool
671  '''
672  return self._is_intergrid
673 
674 
675 # ---------- Documentation utils -------------------------------------------- #
676 # The list of module members that we wish AutoAPI to generate
677 # documentation for. (See https://psyclone-ref.readthedocs.io)

References psyclone.domain.lfric.lfric_kern_metadata.LFRicKernMetadata._is_intergrid.

Here is the caller graph for this function:

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