Conversion Utilties for Normalized and Difficulty Steppers¤
exponax.normalized.normalize_coefficients
¤
normalize_coefficients(
coefficients: tuple[float, ...],
*,
domain_extent: float,
dt: float
) -> tuple[float, ...]
Normalize the coefficients to a linear time stepper to be used with the normalized linear stepper.
Arguments:
- coefficients
: coefficients for the linear operator, coefficients[i]
is
the coefficient for the i
-th derivative
- domain_extent
: extent of the domain
- dt
: time step
Source code in exponax/normalized/_utils.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
exponax.normalized.denormalize_coefficients
¤
denormalize_coefficients(
normalized_coefficients: tuple[float, ...],
*,
domain_extent: float,
dt: float
) -> tuple[float, ...]
Denormalize the coefficients as they were used in the normalized linear to then be used again in a regular linear stepper.
Arguments:
- normalized_coefficients
: coefficients for the linear operator,
normalized_coefficients[i]
is the coefficient for the i
-th
derivative
- domain_extent
: extent of the domain
- dt
: time step
Source code in exponax/normalized/_utils.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
exponax.normalized.normalize_convection_scale
¤
normalize_convection_scale(
convection_scale: float,
*,
domain_extent: float,
dt: float
) -> float
Source code in exponax/normalized/_utils.py
49 50 51 52 53 54 55 56 |
|
exponax.normalized.denormalize_convection_scale
¤
denormalize_convection_scale(
normalized_convection_scale: float,
*,
domain_extent: float,
dt: float
) -> float
Source code in exponax/normalized/_utils.py
59 60 61 62 63 64 65 66 |
|
exponax.normalized.normalize_gradient_norm_scale
¤
normalize_gradient_norm_scale(
gradient_norm_scale: float,
*,
domain_extent: float,
dt: float
)
Source code in exponax/normalized/_utils.py
69 70 71 72 73 74 75 76 77 78 |
|
exponax.normalized.denormalize_gradient_norm_scale
¤
denormalize_gradient_norm_scale(
normalized_gradient_norm_scale: float,
*,
domain_extent: float,
dt: float
)
Source code in exponax/normalized/_utils.py
81 82 83 84 85 86 87 88 89 90 |
|
exponax.normalized.normalize_polynomial_scales
¤
normalize_polynomial_scales(
polynomial_scales: tuple[float],
*,
domain_extent: float = None,
dt: float
) -> tuple[float]
Normalize the polynomial scales to be used with the normalized polynomial stepper.
Arguments:
- polynomial_scales
: scales for the polynomial operator,
polynomial_scales[i]
is the scale for the i
-th derivative
- domain_extent
: extent of the domain (not needed, kept for
compatibility with other normalization APIs)
- dt
: time step
Source code in exponax/normalized/_utils.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
exponax.normalized.denormalize_polynomial_scales
¤
denormalize_polynomial_scales(
normalized_polynomial_scales: tuple[float, ...],
*,
domain_extent: float = None,
dt: float
) -> tuple[float, ...]
Denormalize the polynomial scales as they were used in the normalized polynomial to then be used again in a regular polynomial stepper.
Arguments:
- normalized_polynomial_scales
: scales for the polynomial operator,
normalized_polynomial_scales[i]
is the scale for the i
-th
derivative
- domain_extent
: extent of the domain (not needed, kept for
compatibility with other normalization APIs)
- dt
: time step
Source code in exponax/normalized/_utils.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
exponax.normalized.reduce_normalized_coefficients_to_difficulty
¤
reduce_normalized_coefficients_to_difficulty(
normalized_coefficients: tuple[float, ...],
*,
num_spatial_dims: int,
num_points: int
)
Source code in exponax/normalized/_utils.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
exponax.normalized.extract_normalized_coefficients_from_difficulty
¤
extract_normalized_coefficients_from_difficulty(
difficulty_coefficients: tuple[float, ...],
*,
num_spatial_dims: int,
num_points: int
)
Source code in exponax/normalized/_utils.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
|
exponax.normalized.reduce_normalized_convection_scale_to_difficulty
¤
reduce_normalized_convection_scale_to_difficulty(
normalized_convection_scale: float,
*,
num_spatial_dims: int,
num_points: int,
maximum_absolute: float
)
Source code in exponax/normalized/_utils.py
168 169 170 171 172 173 174 175 176 177 178 |
|
exponax.normalized.extract_normalized_convection_scale_from_difficulty
¤
extract_normalized_convection_scale_from_difficulty(
difficulty_convection_scale: float,
*,
num_spatial_dims: int,
num_points: int,
maximum_absolute: float
)
Source code in exponax/normalized/_utils.py
181 182 183 184 185 186 187 188 189 190 191 |
|
exponax.normalized.reduce_normalized_gradient_norm_scale_to_difficulty
¤
reduce_normalized_gradient_norm_scale_to_difficulty(
normalized_gradient_norm_scale: float,
*,
num_spatial_dims: int,
num_points: int,
maximum_absolute: float
)
Source code in exponax/normalized/_utils.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
|
exponax.normalized.extract_normalized_gradient_norm_scale_from_difficulty
¤
extract_normalized_gradient_norm_scale_from_difficulty(
difficulty_gradient_norm_scale: float,
*,
num_spatial_dims: int,
num_points: int,
maximum_absolute: float
)
Source code in exponax/normalized/_utils.py
210 211 212 213 214 215 216 217 218 219 220 |
|