stfc / PSyclone

Domain-specific compiler and code transformation system for Finite Difference/Volume/Element Earth-system models in Fortran
BSD 3-Clause "New" or "Revised" License
104 stars 27 forks source link

PSyAd to not assume kernel name from module name #2652

Closed MatthewHambley closed 2 months ago

MatthewHambley commented 2 months ago

Currently PSyAd assumes that the name of the kernel metadata type will be the name of the module with the _mod replaced with _type. This will not always be the case.

The function psyclone.domain.lfric.utils.metadata_name_from_module_name() does this.

It probably needs to be replaced with a get_metadata_name_from_module() which parses the module source and identifies types extending kernel_type.