Required
reference_frequency| Type: | salvus._core.types.float_ |
| Description: | Reference frequency at which to compute the local wavelengths. |
class Dim(enum.Enum):
def __init__(self): ...- [(1.0, 2.0), (2.0, 4.0)] to request, in the first layer, 1.0 element per wavelength in the horizontal direction and 2.0 in the vertical direction, and in the second layer, 2.0 elements per wavelength in the horizontal direction and 4.0 in the vertical direction.
- [(1.0, 1.0, 2.0), (2.0, 2.0, 4.0)] to request, in the first layer, 1.0 element per wavelength in _both_ horizontal directions and 2.0 in the vertical direction, and in the second layer, 2.0 elements per wavelength in _both_ horizontal directions and 4.0 in the vertical direction.
- 1.0 => 1.0 elements per wavelength in all dimensions for all layers. - (1.0, 2.0) => 1.0 elements per wavelength in the horizontal direction, 2.0 in the vertical direction, for all layers. - [(1.0, 2.0), (2.0, 4.0)] => That which is described in the 2-D example above, with the additional comment that the last entry (2.0, 4.0) will be used for all subsequent layers beyond 2.
- in 2-D: x, y - in 3-D: x, y, z - in 2-D spherical: latitude, radius - in 3-D spherical: latitude, longitude, radius
class MeshResolution(builtins.object):
def __init__(
self,
reference_frequency: salvus._core.types.float_,
elements_per_wavelength: (
salvus._core.types.float_ | tuple[salvus._core.types.float_, ...]
) = 1.5,
model_order: salvus._core.types.int_ = 1,
model_precision: type[np.number] = numpy.float64,
): ...| Type: | salvus._core.types.float_ |
| Description: | Reference frequency at which to compute the local wavelengths. |
| Type: | salvus._core.types.float_ | tuple[salvus._core.types.float_, ...] |
| Default value: | 1.5 |
| Description: | The number of elements per wavelength, specified according to the description above. |
| Type: | salvus._core.types.int_ |
| Default value: | 1 |
| Description: | The polynomial order of the model representation on each element. |
| Type: | type[np.number] |
| Default value: | numpy.float64 |
| Description: | The numerical precision of the model parameters in the mesh. Defaults to np.float64 for double precision. |
tuple[float, ...])-Return the elements per wavelength as a tuple of at least length 1.
The elements per wavelength parameter can be specified differently in
different dimensions. Since the `MeshResolution` object has no concept
of dimension itself, for a scalar _epw parameter is upcast to a
1-element tuple so it can easily be repeated where necessary in an
iterable context.
Returns:
A tuple of the number of elements per length in each dimension. A
1-element tuple return implies that the elements_per_wavelength
parameter is constant in all dimensions.int)-The polynomial order of the model representation on each element.type[np.number])-The numerical precision of the model parameters in the mesh.float)-Reference frequency at which to compute the local wavelengths.def from_period(
reference_period: salvus._core.types.float_,
elements_per_wavelength: salvus._core.types.float_ = 1.5,
model_order: salvus._core.types.int_ = 1,
) -> MeshResolution: ...| Type: | salvus._core.types.float_ |
| Description: | Reference period at which to compute the local wavelengths. |
| Type: | salvus._core.types.float_ |
| Default value: | 1.5 |
| Description: | Number of elements that should span the local wavelength. |
| Type: | salvus._core.types.int_ |
| Default value: | 1 |
| Description: | The polynomial order of the model representation on each element. |
elements_per_wavelength in this class' init
method for a description of broadcasting behavior over dimensions and
layers.def broadcast_elements_per_wavelength(
self, n_dim: int, n_layers: int
) -> list[tuple[salvus._core.types.float_, ...]]: ...| Type: | int |
| Description: | The number of dimensions in the model. |
| Type: | int |
| Description: | The number of layers in the model. |
def replace(self) -> MeshResolution: ...