Reference Guide  2.5.0
psyclone.dynamo0p3.DynCMAOperators Class Reference
Inheritance diagram for psyclone.dynamo0p3.DynCMAOperators:
Collaboration diagram for psyclone.dynamo0p3.DynCMAOperators:

Public Member Functions

def __init__ (self, node)
 
def initialise (self, parent)
 
- Public Member Functions inherited from psyclone.domain.lfric.lfric_collection.LFRicCollection
def declarations (self, parent)
 

Static Public Attributes

list cma_same_fs_params
 
list cma_diff_fs_params
 

Detailed Description

Holds all information on the Column-Matrix-Assembly operators
required by an Invoke or Kernel stub.

:param node: either an Invoke schedule or a single Kernel object.
:type node: :py:class:`psyclone.dynamo0p3.DynSchedule` or \
            :py:class:`psyclone.domain.lfric.LFRicKern`

Definition at line 1777 of file dynamo0p3.py.

Member Function Documentation

◆ initialise()

def psyclone.dynamo0p3.DynCMAOperators.initialise (   self,
  parent 
)
Generates the calls to the LFRic infrastructure that look-up
the various components of each CMA operator. Adds these as
children of the supplied parent node.

:param parent: f2pygen node representing the PSy-layer routine.
:type parent: :py:class:`psyclone.f2pygen.SubroutineGen`

Reimplemented from psyclone.domain.lfric.lfric_collection.LFRicCollection.

Definition at line 1867 of file dynamo0p3.py.

1867  def initialise(self, parent):
1868  '''
1869  Generates the calls to the LFRic infrastructure that look-up
1870  the various components of each CMA operator. Adds these as
1871  children of the supplied parent node.
1872 
1873  :param parent: f2pygen node representing the PSy-layer routine.
1874  :type parent: :py:class:`psyclone.f2pygen.SubroutineGen`
1875 
1876  '''
1877  # If we have no CMA operators then we do nothing
1878  if not self._cma_ops:
1879  return
1880 
1881  parent.add(CommentGen(parent, ""))
1882  parent.add(CommentGen(parent,
1883  " Look-up information for each CMA operator"))
1884  parent.add(CommentGen(parent, ""))
1885 
1886  const = LFRicConstants()
1887  suffix = const.ARG_TYPE_SUFFIX_MAPPING["gh_columnwise_operator"]
1888 
1889  for op_name in self._cma_ops:
1890  # First, assign a pointer to the array containing the actual
1891  # matrix.
1892  cma_name = self._symbol_table.lookup_with_tag(
1893  f"{op_name}:{suffix}").name
1894  parent.add(AssignGen(parent, lhs=cma_name, pointer=True,
1895  rhs=self._cma_ops[op_name]["arg"].
1896  proxy_name_indexed+"%columnwise_matrix"))
1897  # Then make copies of the related integer parameters
1898  for param in self._cma_ops[op_name]["params"]:
1899  param_name = self._symbol_table.find_or_create_tag(
1900  f"{op_name}:{param}:{suffix}").name
1901  parent.add(AssignGen(parent, lhs=param_name,
1902  rhs=self._cma_ops[op_name]["arg"].
1903  proxy_name_indexed+"%"+param))
1904 

References psyclone.dynamo0p3.DynCMAOperators._cma_ops, psyclone.domain.lfric.lfric_collection.LFRicCollection._invoke, psyclone.nemo.NemoInvokeSchedule._invoke, psyclone.psyGen.InvokeSchedule._invoke, psyclone.domain.lfric.lfric_collection.LFRicCollection._symbol_table, psyclone.dynamo0p3.DynMeshes._symbol_table, psyclone.dynamo0p3.HaloDepth._symbol_table, psyclone.psyGen.HaloExchange._symbol_table, psyclone.psyir.backend.sympy_writer.SymPyWriter._symbol_table, and psyclone.psyir.nodes.scoping_node.ScopingNode._symbol_table.

Member Data Documentation

◆ cma_diff_fs_params

list psyclone.dynamo0p3.DynCMAOperators.cma_diff_fs_params
static
Initial value:
= ["nrow", "ncol", "bandwidth", "alpha",
"beta", "gamma_m", "gamma_p"]

Definition at line 1793 of file dynamo0p3.py.

◆ cma_same_fs_params

list psyclone.dynamo0p3.DynCMAOperators.cma_same_fs_params
static
Initial value:
= ["nrow", "bandwidth", "alpha",
"beta", "gamma_m", "gamma_p"]

Definition at line 1789 of file dynamo0p3.py.


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