psyclone.domain.lfric.lfric_collection#
This module implements PSyclone LFRic API by specialising the base class for managing the declaration and initialisation of a group of related entities within an Invoke or Kernel stub.
Classes#
LFRicCollection: Base class for managing the declaration and initialisation of a
- class psyclone.domain.lfric.lfric_collection.LFRicCollection(node)[source]#
Base class for managing the declaration and initialisation of a group of related entities within an Invoke or Kernel stub
- Parameters:
node (
psyclone.domain.lfric.LFRicInvokeorpsyclone.domain.lfric.LFRicKern) – the Kernel or Invoke for which to manage variable declarations and initialisation.- Raises:
InternalError – if the supplied node is not an LFRicInvoke or an LFRicKern.
Inheritance

- abstractmethod initialise(cursor)[source]#
Add code to initialise the entities being managed by this class. We do nothing by default - it is up to the sub-class to override this method if initialisation is required.
- Parameters:
cursor (
int) – position where to add the next initialisation statements.- Return type:
int- Returns:
Updated cursor value.
- invoke_declarations()[source]#
Add necessary Invoke declarations for this Collection.
By default we just sanity check that the class is appropriately initialised - it is up to the sub-class to add required declarations.
- Raises:
InternalError – if the class has been instantiated for a kernel and not an invoke.
- stub_declarations()[source]#
Add necessary Kernel Stub declarations for this Collection.
By default we just sanity check that the class is appropriately initialised - it is up to the sub-class to add required declarations.
- Raises:
InternalError – if the class has been instantiated for an invoke and not a kernel.
- property symtab#
- Returns:
associated symbol table.
- Return type: