Classes to be split from dynamo0p3.py
Umbrella issue for the splitting of dynamo0p3.py into separate files in domain/lfric/. Smaller, more detailed issues to be made and linked back to this issue - PRs should only move one class out each.
LFRicLoopBounds: appears in domain/lfric/lfric_invoke.py and tests/domain/lfric/lfric_loop_bounds_test.py, no name change needed - uses LFRicCollection, so unlikely to have a circular dependency
Others unlikely to have circular dependencies:
LFRicScalarArgs: appears in two files and two test files (grep -rwn LFRicScalarArgs)
DynStencil: only appears in dynamo0p3.py
DynamoInvokes: three files inc dynamo0p3.py
in pylint: disable=import-outside-toplevel markers
DynReferenceElement
DynStencils - lots of places to change this, but only 7 different files
DynCMAOperators
LFRicMeshProperties
DynBasisFunctions
DynLoop
FSDescriptors, DynKernelArguments
DynInvokeSchedule
LFRicBuiltIn
(LFRicScalarArgs, DynFunctionSpaces, DynDofmaps, LFRicFields, DynLMAOperators,
DynMeshes, DynBoundaryConditions, DynProxies, LFRicRunTimeChecks,
DynCellIterators, DynReferenceElement, LFRicLoopBounds, DynGlobalSum)
Table of each class in dynamo0p3.py and info relating to ease of splitting them
| Class | rename | called under a disable=import-outside-toplevel |
number of files | test file situation | actioned |
|---|---|---|---|---|---|
| DynFuncDescriptor03 | yes | 4 | split | ||
| RefElementMetaData | ? | 3 | move | ||
| MeshProperty | ? | 2 | good | ||
| MeshPropertiesMetaData | ? | 2 | |||
| DynamoPSy | yes | 9 | move? | #2460 | |
| LFRicMeshProperties | yes - 4 | 6 | good | ||
| DynReferenceElement | yes | yes - 3 | 5 | move | |
| DynDofmaps | yes | yes - 2 | 4 | #2455 | |
| DynFunctionSpaces | yes | yes - 2 | 3 | ||
| DynProxies | yes | yes - 1 | 3 | split | |
| DynCellIterators | yes | yes - 2 | 4 | split | |
| DynLMAOperators | yes | yes - 2 | 3 | ||
| DynCMAOperators | yes | yes - 3 | 4 | ||
| DynMeshes | yes | yes - 1 | 3 | move | |
| DynInterGrid | yes | 1 | |||
| DynBasisFunctions | yes | yes - 4 | 6 | move | |
| DynBoundaryConditions | yes | yes - 2 | 4 | split | |
| DynInvokeSchedule | yes | yes - 2 | 11 | #2451 | |
| DynGlobalSum | yes | yes - 1 | 5 | split? | |
| 12 | move + l6045 untested | #2279 | |||
| 6 | |||||
| 3 | |||||
| HaloDepth | ? | 2 | |||
| HaloWriteAccess | ? | 1 | |||
| HaloReadAccess | ? | 3 | |||
| FSDescriptor | ? | 3 | |||
| FSDescriptors | ? | yes - 2 | 4 | split | |
| 1 | #2265 | ||||
| DynKernelArguments | yes | yes - 3 | 8 | split + l7995 untested | |
| DynKernelArgument | yes | 22 | split + l8196 untested | ||
| DynACCEnterDataDirective | yes | 3 | split |
Keeping track of circular dependencies to untangle:
Circle one
- src/psyclone/domain/lfric/lfric_collection.py:
from psyclone.domain.lfric import (LFRicSymbolTable, LFRicInvoke, - src/psyclone/domain/lfric/lfric_loop_bounds.py
from psyclone.domain.lfric import LFRicCollection - src/psyclone/domain/lfric/lfric_invoke.py
from psyclone.domain.lfric import LFRicLoopBounds
Circle Two
- LFRicRunTimeChecks requires LFRicCollection.
- LFRicCollection requires LFRicInvoke.
- LFRicInvoke requires LFRicRunTimeChecks.
init.py
RTC needs to be imported after Collection and before Constants Collection needs to be imported after Constants Collection and Constants don't need RTC Therefore RTC has been imported in LFRicInvoke