Reference Guide
2.5.0
|
Public Member Functions | |
def | __init__ (self) |
def | precision_for_type (self, data_type) |
Static Public Member Functions | |
def | specific_function_space (name) |
Static Public Attributes | |
bool | HAS_BEEN_INITIALISED = False |
This class stores all LFRic constants. Note that some constants depend on values in the config file, so this class can only be used after the config file has been read. It stores all values in class variables (to avoid re-evaluating them).
Definition at line 50 of file lfric_constants.py.
def psyclone.domain.lfric.lfric_constants.LFRicConstants.precision_for_type | ( | self, | |
data_type | |||
) |
This function returns the precision required for the various LFRic types. :param str data_type: the name of the data type. :returns: the precision as defined in domain.lfric.lfric_types (one of R_SOLVER, R_TRAN, R_DEF). :rtype: :py:class:`psyclone.psyir.symbols.DataSymbol` :raises InternalError: if an unknown data_type is specified.
Definition at line 503 of file lfric_constants.py.
|
static |
Maps from a valid kernel metadata function-space name to one that exists within the LFRic infrastructure. This is necessary because meta-data can contain 'generic' names such as 'any_w2' but, when generating code, we need the name of a specific function space that is recognised by the LFRic infrastructure. :param str name: the name of the function space in metadata. :returns: the name of a specific function space. :rtype: str :raises ValueError: if the supplied name is not a valid LFRic \ function-space name. :raises InternalError: if an unrecognised wildcard function-space \ name is supplied.
Definition at line 465 of file lfric_constants.py.