exceptions#
Module: fridom.framework.exceptions
Exceptions
|
Raise when attempting to perform an operation on a field in the wrong space. |
|
Raise when an operation is attempted before the module is set up. |
|
Raise when an operation is attempted on a field that is not fully extended. |
|
Raise when too many arguments are provided. |
exceptions.py - Custom exceptions for the framework.
- exception fridom.framework.exceptions.TooManyArgumentsError(max_args: int, **provided_args: any)[source]#
Bases:
ExceptionRaise when too many arguments are provided.
- exception fridom.framework.exceptions.PartialDomainError(topo: tuple[bool])[source]#
Bases:
NotImplementedErrorRaise when an operation is attempted on a field that is not fully extended.
Description#
Fields in the computational framework are marked with a topo attribute, which is a tuple of booleans indicating whether the field is extended in each spatial direction. For example, a field with topo=(True, True, False) depends on x and y, but not on z.
Certain operations require the field to be fully extended in all directions (i.e., topo=(True, True, True)). If an unsupported operation is attempted on a field that is not fully extended, this exception is raised.
- exception fridom.framework.exceptions.FieldSpaceError(is_spectral: bool)[source]#
Bases:
NotImplementedErrorRaise when attempting to perform an operation on a field in the wrong space.
Description#
Fields in the computational framework have an is_spectral attribute, which is a boolean indicating whether the field is in spectral space.
Certain operations require the field to be either in spectral space (is_spectral=True) or physical space (is_spectral=False). If an unsupported operation is attempted on a field in the wrong state, this exception is raised.
Parameters#
- is_spectralbool
The is_spectral attribute of the field.