loki.transformations.parallel.field_views

Transformation utilities to manage and inject FIELD-API boilerplate code.

Functions

add_field_api_view_updates(routine, ...[, ...])

Adds FIELD API boilerplate calls for view updates.

remove_field_api_view_updates(routine, ...)

Remove FIELD API boilerplate calls for view updates of derived types.

remove_field_api_view_updates(routine, field_group_types, dim_object=None)

Remove FIELD API boilerplate calls for view updates of derived types.

This utility is intended to remove the IFS-specific group type objects that provide block-scope view pointers to deep kernel trees. It will remove all calls to UPDATE_VIEW on derive-type objects with the respective types.

Parameters:
  • routine (Subroutine) – The routine from which to remove FIELD API update calls

  • field_group_types (tuple of str) – List of names of the derived types of “field group” objects to remove

  • dim_object (str, optional) – Optional name of the “dimension” object; if provided it will remove the call to <dim>%UPDATE(...) accordingly.

add_field_api_view_updates(routine, dimension, field_group_types, dim_object=None)

Adds FIELD API boilerplate calls for view updates.

The provided Dimension object describes the local loop variables to pass to the respective update calls. In particular, dimension.indices[1] is used to denote the block loop index that is passed to UPDATE_VIEW() calls on field group object. The list of type names field_group_types is used to identify for which objcets the view update calls get added.

Parameters:
  • routine (Subroutine) – The routine from which to remove FIELD API update calls

  • dimension (Dimension) – The dimension object describing the block loop variables.

  • field_group_types (tuple of str) – List of names of the derived types of “field group” objects to remove

  • dim_object (str, optional) – Optional name of the “dimension” object; if provided it will remove the call to <dim>%UPDATE(...) accordingly.