Reference Guide  2.5.0
psyclone.dynamo0p3.FSDescriptors Class Reference

Public Member Functions

def __init__ (self, descriptors)
 
def exists (self, fspace)
 
def get_descriptor (self, fspace)
 
def descriptors (self)
 

Detailed Description

 Contains a collection of FSDescriptor objects and methods
that provide information across these objects. We have one
FSDescriptor for each meta-funcs entry in the kernel
metadata.
# TODO #274 this should actually be named something like
BasisFuncDescriptors as it holds information describing the
basis/diff-basis functions required by a kernel.

:param descriptors: list of objects describing the basis/diff-basis \
                    functions required by a kernel, as obtained from \
                    metadata.
:type descriptors: list of :py:class:`psyclone.DynFuncDescriptor03`.

Definition at line 4920 of file dynamo0p3.py.

Member Function Documentation

◆ descriptors()

def psyclone.dynamo0p3.FSDescriptors.descriptors (   self)
:return: the list of Descriptors, one for each of the meta-funcs
         entries in the kernel metadata.
:rtype: List of :py:class:`psyclone.dynamo0p3.FSDescriptor`

Definition at line 4963 of file dynamo0p3.py.

4963  def descriptors(self):
4964  '''
4965  :return: the list of Descriptors, one for each of the meta-funcs
4966  entries in the kernel metadata.
4967  :rtype: List of :py:class:`psyclone.dynamo0p3.FSDescriptor`
4968  '''
4969  return self._descriptors
4970 
4971 

References psyclone.dynamo0p3.FSDescriptors._descriptors.

◆ exists()

def psyclone.dynamo0p3.FSDescriptors.exists (   self,
  fspace 
)
 Return True if a descriptor with the specified function
space exists, otherwise return False. 

Definition at line 4941 of file dynamo0p3.py.

4941  def exists(self, fspace):
4942  ''' Return True if a descriptor with the specified function
4943  space exists, otherwise return False. '''
4944  for descriptor in self._descriptors:
4945  # FS descriptors hold information taken from the kernel
4946  # metadata and therefore it is the original name of
4947  # the supplied function space that we must look at
4948  if descriptor.fs_name == fspace.orig_name:
4949  return True
4950  return False
4951 

References psyclone.dynamo0p3.FSDescriptors._descriptors.

◆ get_descriptor()

def psyclone.dynamo0p3.FSDescriptors.get_descriptor (   self,
  fspace 
)
 Return the descriptor with the specified function space
name. If it does not exist raise an error.

Definition at line 4952 of file dynamo0p3.py.

4952  def get_descriptor(self, fspace):
4953  ''' Return the descriptor with the specified function space
4954  name. If it does not exist raise an error.'''
4955  for descriptor in self._descriptors:
4956  if descriptor.fs_name == fspace.orig_name:
4957  return descriptor
4958  raise GenerationError(
4959  f"FSDescriptors:get_descriptor: there is no descriptor for "
4960  f"function space {fspace.orig_name}")
4961 

References psyclone.dynamo0p3.FSDescriptors._descriptors.


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