salvus.mesh.mesh_block.generators.spherical
Spherical mesh grid generators.
Functions
axisem_tripling_layer_2d()
axisem_tripling_layer_2d()def axisem_tripling_layer_2d(
r_inner: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
r_outer: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
nelem_lat: Union[int, numpy.int32, numpy.int64],
min_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.0,
max_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 180.0,
flip_vertical: bool = False,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...generate a simple spherical structured grid with tripling such that no element has a single point on the axis (needed for GLJ quadrature in AxiSEM) nelem_lat is the element number on the inner side, number of elements on the outer side is nelem * 3 - 2
r_innerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_innerr_outerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_outernelem_latUnion[int, numpy.int32, numpy.int64] — element number on the inner sidemin_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_colatmax_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_colatflip_verticalbool — flip_vertical
central_sphere_2d()
central_sphere_2d()def central_sphere_2d(
r_outer: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
nelem_lat: Union[int, numpy.int32, numpy.int64],
full: bool = False,
left: bool = False,
) -> Tuple[
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
]:
...generate a central mesh of a quarter or half circle nelem_lat is the element number along the latitude for the half circle returns two structured grids
r_outerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_outernelem_latUnion[int, numpy.int32, numpy.int64] — nelem_latfullbool — fullleftbool — left
central_sphere_3d()
central_sphere_3d()def central_sphere_3d(
nelem_lat: Union[int, numpy.int32, numpy.int64],
r_outer: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 1.0,
) -> Tuple[
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
]:
...generate a hex mesh of a full sphere
nelem_lat is the element number along one side of the cubed sphere chunks
nelem_latUnion[int, numpy.int32, numpy.int64] — nelem_latr_outerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_outer
central_sphere_full_2d()
central_sphere_full_2d()def central_sphere_full_2d(
r_outer: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
nelem_lat: Union[int, numpy.int32, numpy.int64],
) -> Tuple[salvus.mesh.mesh_block.mesh_block.MeshBlock, ...]:
...r_outerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_outernelem_latUnion[int, numpy.int32, numpy.int64] — nelem_lat
cubed_sphere_3d_range()
cubed_sphere_3d_range()def cubed_sphere_3d_range(
r_inner: float,
r_outer: float,
nelem: int,
nelem_rad: int,
elem_locations_horizontal: Optional[
List[
Union[
Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]],
numpy._array_like._SupportsArray[numpy.dtype],
Sequence[numpy._array_like._SupportsArray[numpy.dtype]],
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
],
Sequence[
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
numpy._array_like._SupportsArray[numpy.dtype]
]
]
]
],
bool,
int,
float,
complex,
str,
bytes,
Sequence[Union[bool, int, float, complex, str, bytes]],
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
],
Sequence[
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
Union[bool, int, float, complex, str, bytes]
]
]
]
],
]
]
] = None,
) -> Tuple[
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
]:
...Generate a layer of a cubed sphere from its radial bounds.
r_innerfloat — The inner radius.r_outerfloat — The outer radius.nelemint — Number of elements along each side of the each constituent chunk.nelem_radint — nelem_rad.elem_locations_horizontalOptional[List[Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], numpy._array_like._SupportsArray[numpy.dtype], Sequence[numpy._array_like._SupportsArray[numpy.dtype]], Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]], Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]], Sequence[Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]]], bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]] — Ensure that the horizontal element boundaries exist at these list of coordinate values. Length of this array must equal 1, and the length of the single entry must equal nelem_x.
cubed_sphere_chunk_3d_range()
cubed_sphere_chunk_3d_range()def cubed_sphere_chunk_3d_range(
r_inner: float,
r_outer: float,
nelem: int,
nelem_rad: int,
nelem2: Optional[int] = None,
max_angle: float = 45.0,
max_angle2: Optional[float] = None,
min_angle: Optional[float] = None,
min_angle2: Optional[float] = None,
chunk: Optional[int] = None,
euler_angles: Optional[numpy.ndarray] = None,
projection: str = "equiangular",
elem_locations_horizontal: Optional[
List[
Union[
Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]],
numpy._array_like._SupportsArray[numpy.dtype],
Sequence[numpy._array_like._SupportsArray[numpy.dtype]],
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
],
Sequence[
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
numpy._array_like._SupportsArray[numpy.dtype]
]
]
]
],
bool,
int,
float,
complex,
str,
bytes,
Sequence[Union[bool, int, float, complex, str, bytes]],
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
],
Sequence[
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
Union[bool, int, float, complex, str, bytes]
]
]
]
],
]
]
] = None,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...Generate a chunk of the cubed sphere, using the radial bounds of the chunk.
r_innerfloat — The inner radius.r_outerfloat — The outer radius.nelemint — nelemnelem_radint — nelem_rad.nelem2Optional[int] — nelem2max_anglefloat — max_anglemax_angle2Optional[float] — max_angle2min_angleOptional[float] — min_anglemin_angle2Optional[float] — min_angle2chunkOptional[int] — chunkeuler_anglesOptional[numpy.ndarray] — euler_anglesprojectionstr — projectionelem_locations_horizontalOptional[List[Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], numpy._array_like._SupportsArray[numpy.dtype], Sequence[numpy._array_like._SupportsArray[numpy.dtype]], Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]], Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]], Sequence[Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]]], bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]] — Ensure that the horizontal element boundaries exist at these list of coordinate values. Length of this array must equal 1, and the length of the single entry must equal nelem_x.
cubed_sphere_chunk_doubling_layer_3d()
cubed_sphere_chunk_doubling_layer_3d()def cubed_sphere_chunk_doubling_layer_3d(
r: numpy.ndarray,
nelem: Union[int, numpy.int32, numpy.int64],
nelem2: Optional[int, numpy.int32, numpy.int64] = None,
max_angle: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 45.0,
max_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
chunk: Optional[int, numpy.int32, numpy.int64] = 5,
euler_angles: Optional[numpy.ndarray] = None,
projection: str = "equiangular",
full_globe: bool = False,
flip_vertical: bool = False,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...generate a cubed sphere chunk structured grid with doubling nelem is the element number on the inner side
rnumpy.ndarray — rnelemUnion[int, numpy.int32, numpy.int64] — nelemnelem2Optional[int, numpy.int32, numpy.int64] — nelem2max_angleUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_anglemax_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_angle2min_angleOptional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_anglemin_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_angle2chunkOptional[int, numpy.int32, numpy.int64] — chunkeuler_anglesOptional[numpy.ndarray] — euler_anglesprojectionstr — projectionfull_globebool — full_globeflip_verticalbool — flip_vertical
cubed_sphere_chunk_doubling_layer_3d_range()
cubed_sphere_chunk_doubling_layer_3d_range()def cubed_sphere_chunk_doubling_layer_3d_range(
r_inner: float,
r_outer: float,
nelem: int,
nelem2: Optional[int] = None,
max_angle: float = 45.0,
max_angle2: Optional[float] = None,
min_angle: Optional[float] = None,
min_angle2: Optional[float] = None,
chunk: int = 5,
euler_angles: Optional[numpy.ndarray] = None,
projection: str = "equiangular",
full_globe: bool = False,
flip_vertical: bool = False,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...generate a cubed sphere chunk structured grid with doubling nelem is the element number on the inner side
r_innerfloat — The inner radius.r_outerfloat — The outer radius.nelemint — nelemnelem2Optional[int] — nelem2max_anglefloat — max_anglemax_angle2Optional[float] — max_angle2min_angleOptional[float] — min_anglemin_angle2Optional[float] — min_angle2chunkint — chunkeuler_anglesOptional[numpy.ndarray] — euler_anglesprojectionstr — projectionfull_globebool — full_globeflip_verticalbool — flip_vertical
cubed_sphere_chunk_doubling_layer_single_3d()
cubed_sphere_chunk_doubling_layer_single_3d()def cubed_sphere_chunk_doubling_layer_single_3d(
r: numpy.ndarray,
nelem: numpy.ndarray,
nelem2: Optional[numpy.ndarray] = None,
max_angle: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 45.0,
max_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
chunk: Optional[int, numpy.int32, numpy.int64] = 5,
euler_angles: Optional[numpy.ndarray] = None,
projection: str = "equiangular",
full_globe: bool = False,
flip_vertical: bool = False,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...generate a cubed sphere chunk structured grid with doubling in a single layer nelem is the element number on the inner side
rnumpy.ndarray — rnelemnumpy.ndarray — nelemnelem2Optional[numpy.ndarray] — nelem2max_angleUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_anglemax_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_angle2min_angleOptional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_anglemin_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_angle2chunkOptional[int, numpy.int32, numpy.int64] — chunkeuler_anglesOptional[numpy.ndarray] — euler_anglesprojectionstr — projectionfull_globebool — full_globeflip_verticalbool — flip_vertical
cubed_sphere_chunk_r_3d()
cubed_sphere_chunk_r_3d()def cubed_sphere_chunk_r_3d(
r: numpy.ndarray,
nelem: Union[int, numpy.int32, numpy.int64],
nelem2: Optional[int, numpy.int32, numpy.int64] = None,
max_angle: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 45.0,
max_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
chunk: Optional[int, numpy.int32, numpy.int64] = None,
euler_angles: Optional[numpy.ndarray] = None,
projection: str = "equiangular",
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...generate a chunk of the cubed sphere
rnumpy.ndarray — rnelemUnion[int, numpy.int32, numpy.int64] — nelemnelem2Optional[int, numpy.int32, numpy.int64] — nelem2max_angleUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_anglemax_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_angle2min_angleOptional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_anglemin_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_angle2chunkOptional[int, numpy.int32, numpy.int64] — chunkeuler_anglesOptional[numpy.ndarray] — euler_anglesprojectionstr — projection
cubed_sphere_chunk_tripling_layer_3d()
cubed_sphere_chunk_tripling_layer_3d()def cubed_sphere_chunk_tripling_layer_3d(
r: numpy.ndarray,
nelem: numpy.ndarray,
nelem2: Optional[numpy.ndarray] = None,
max_angle: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 45.0,
max_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
chunk: Optional[int, numpy.int32, numpy.int64] = 5,
euler_angles: Optional[numpy.ndarray] = None,
full_globe: bool = False,
projection: str = "equiangular",
flip_vertical: bool = False,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...generate a cubed sphere chunk structured grid with tripling in a single layer nelem is the element number on the inner side
rnumpy.ndarray — rnelemnumpy.ndarray — nelemnelem2Optional[numpy.ndarray] — nelem2max_angleUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_anglemax_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_angle2min_angleOptional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_anglemin_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_angle2chunkOptional[int, numpy.int32, numpy.int64] — chunkeuler_anglesOptional[numpy.ndarray] — euler_anglesfull_globebool — full_globeprojectionstr — projectionflip_verticalbool — flip_vertical
cubed_sphere_chunk_vertical_refine_3d()
cubed_sphere_chunk_vertical_refine_3d()def cubed_sphere_chunk_vertical_refine_3d(
r: numpy.ndarray,
nelem: numpy.ndarray,
nelem_r: numpy.ndarray,
nelem2: Optional[numpy.ndarray] = None,
max_angle: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 45.0,
max_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
chunk: Union[int, numpy.int32, numpy.int64] = 5,
euler_angles: Optional[numpy.ndarray] = None,
dangling: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.3333333333333333,
p1: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.5,
p2: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.64,
p3: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.1,
preprocess_nelem_z: bool = True,
projection: str = "equiangular",
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...rnumpy.ndarray — rnelemnumpy.ndarray — nelemnelem_rnumpy.ndarray — nelem_rnelem2Optional[numpy.ndarray] — nelem2max_angleUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_anglemax_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_angle2min_angleOptional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_anglemin_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_angle2chunkUnion[int, numpy.int32, numpy.int64] — chunkeuler_anglesOptional[numpy.ndarray] — euler_anglesdanglingUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — danglingp1Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p1p2Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p2p3Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p3preprocess_nelem_zbool — preprocess_nelem_zprojectionstr — projection
cubed_sphere_chunk_vertical_refine_3d_range()
cubed_sphere_chunk_vertical_refine_3d_range()def cubed_sphere_chunk_vertical_refine_3d_range(
r_inner: float,
r_outer: float,
nelem: numpy.ndarray,
nelem_rad: numpy.ndarray,
nelem2: Optional[numpy.ndarray] = None,
max_angle: float = 45.0,
max_angle2: Optional[float] = None,
min_angle: Optional[float] = None,
min_angle2: Optional[float] = None,
chunk: int = 5,
preprocess_nelem_z: bool = True,
elem_locations_horizontal: Optional[
List[
Union[
Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]],
numpy._array_like._SupportsArray[numpy.dtype],
Sequence[numpy._array_like._SupportsArray[numpy.dtype]],
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
],
Sequence[
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
numpy._array_like._SupportsArray[numpy.dtype]
]
]
]
],
bool,
int,
float,
complex,
str,
bytes,
Sequence[Union[bool, int, float, complex, str, bytes]],
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
],
Sequence[
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
Union[bool, int, float, complex, str, bytes]
]
]
]
],
]
]
] = None,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...r_innerfloat — r_innerr_outerfloat — r_outernelemnumpy.ndarray — nelemnelem_radnumpy.ndarray — nelem_rnelem2Optional[numpy.ndarray] — nelem2max_anglefloat — max_anglemax_angle2Optional[float] — max_angle2min_angleOptional[float] — min_anglemin_angle2Optional[float] — min_angle2chunkint — chunkpreprocess_nelem_zbool — preprocess_nelem_zelem_locations_horizontalOptional[List[Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], numpy._array_like._SupportsArray[numpy.dtype], Sequence[numpy._array_like._SupportsArray[numpy.dtype]], Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]], Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]], Sequence[Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]]], bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]] — Ensure that the horizontal element boundaries exist at these list of coordinate values. Length of this array must equal 1, and the length of the single entry must equal nelem_x.
cubed_sphere_chunk_vertical_refine_doubling_3d()
cubed_sphere_chunk_vertical_refine_doubling_3d()def cubed_sphere_chunk_vertical_refine_doubling_3d(
r: numpy.ndarray,
nelem: numpy.ndarray,
nelem_r: numpy.ndarray,
nelem2: Optional[numpy.ndarray] = None,
max_angle: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 45.0,
max_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
chunk: Union[int, numpy.int32, numpy.int64] = 5,
euler_angles: Optional[numpy.ndarray] = None,
dangling: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.25,
p1: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.5,
p2: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.35714285714285715,
p3: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.6,
preprocess_nelem_z: bool = True,
projection: str = "equiangular",
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...rnumpy.ndarray — rnelemnumpy.ndarray — nelemnelem_rnumpy.ndarray — nelem_rnelem2Optional[numpy.ndarray] — nelem2max_angleUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_anglemax_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_angle2min_angleOptional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_anglemin_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_angle2chunkUnion[int, numpy.int32, numpy.int64] — chunkeuler_anglesOptional[numpy.ndarray] — euler_anglesdanglingUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — danglingp1Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p1p2Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p2p3Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p3preprocess_nelem_zbool — preprocess_nelem_zprojectionstr — projection
cubed_sphere_chunk_vertical_refine_doubling_3d_range()
cubed_sphere_chunk_vertical_refine_doubling_3d_range()def cubed_sphere_chunk_vertical_refine_doubling_3d_range(
r_inner: float,
r_outer: float,
nelem: numpy.ndarray,
nelem_rad: numpy.ndarray,
nelem2: Optional[numpy.ndarray] = None,
max_angle: float = 45.0,
max_angle2: Optional[float] = None,
min_angle: Optional[float] = None,
min_angle2: Optional[float] = None,
chunk: int = 5,
euler_angles: Optional[numpy.ndarray] = None,
dangling: float = 0.25,
p1: float = 0.5,
p2: float = 0.35714285714285715,
p3: float = 0.6,
preprocess_nelem_z: bool = True,
projection: str = "equiangular",
elem_locations_horizontal: Optional[
List[
Union[
Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]],
numpy._array_like._SupportsArray[numpy.dtype],
Sequence[numpy._array_like._SupportsArray[numpy.dtype]],
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
],
Sequence[
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
numpy._array_like._SupportsArray[numpy.dtype]
]
]
]
],
bool,
int,
float,
complex,
str,
bytes,
Sequence[Union[bool, int, float, complex, str, bytes]],
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
],
Sequence[
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
Union[bool, int, float, complex, str, bytes]
]
]
]
],
]
]
] = None,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...r_innerfloat — Inner radius.r_outerfloat — Outer radius.nelemnumpy.ndarray — nelemnelem_radnumpy.ndarray — nelem_rnelem2Optional[numpy.ndarray] — nelem2max_anglefloat — max_anglemax_angle2Optional[float] — max_angle2min_angleOptional[float] — min_anglemin_angle2Optional[float] — min_angle2chunkint — chunkeuler_anglesOptional[numpy.ndarray] — euler_anglesdanglingfloat — danglingp1float — p1p2float — p2p3float — p3preprocess_nelem_zbool — preprocess_nelem_zprojectionstr — projectionelem_locations_horizontalOptional[List[Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], numpy._array_like._SupportsArray[numpy.dtype], Sequence[numpy._array_like._SupportsArray[numpy.dtype]], Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]], Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]], Sequence[Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]]], bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]] — Ensure that the horizontal element boundaries exist at these list of coordinate values. Length of this array must equal 1, and the length of the single entry must equal nelem_x.
cubed_sphere_doubling_layer_3d()
cubed_sphere_doubling_layer_3d()def cubed_sphere_doubling_layer_3d(
r: numpy.ndarray,
nelem: Union[int, numpy.int32, numpy.int64],
flip_vertical: bool = False,
) -> Tuple[
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
]:
...generate a cubed sphere structured grid with doubling nelem is the element number on the inner side
rnumpy.ndarray — rnelemUnion[int, numpy.int32, numpy.int64] — nelemflip_verticalbool — flip_vertical
cubed_sphere_doubling_layer_3d_range()
cubed_sphere_doubling_layer_3d_range()def cubed_sphere_doubling_layer_3d_range(
r_inner: float, r_outer: float, nelem: int, flip_vertical: bool = False
) -> Tuple[
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
]:
...A cubed sphere chunk with doubling using the chunk’s radial bounds.
r_innerfloat — The inner radius.r_outerfloat — The outer radius.nelemint — Number of elements on the coarse side of the doubling layer.flip_verticalbool — flip_vertical
cubed_sphere_r_3d()
cubed_sphere_r_3d()def cubed_sphere_r_3d(
r: numpy.ndarray, nelem: Union[int, numpy.int32, numpy.int64]
) -> Tuple[
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
]:
...generate a layer of the cubed sphere
rnumpy.ndarray — rnelemUnion[int, numpy.int32, numpy.int64] — nelem
cubed_sphere_tripling_layer_3d()
cubed_sphere_tripling_layer_3d()def cubed_sphere_tripling_layer_3d(
r: numpy.ndarray, nelem: numpy.ndarray, flip_vertical: bool = False
) -> Tuple[
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
]:
...generate a cubed sphere structured grid with tripling in a single layer nelem is the element number on the inner side
rnumpy.ndarray — rnelemnumpy.ndarray — nelemflip_verticalbool — flip_vertical
cubed_sphere_vertical_refine_3d()
cubed_sphere_vertical_refine_3d()def cubed_sphere_vertical_refine_3d(
r: numpy.ndarray,
nelem: numpy.ndarray,
nelem_r: numpy.ndarray,
nelem2: Optional[numpy.ndarray] = None,
max_angle: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 45.0,
max_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
euler_angles: Optional[numpy.ndarray] = None,
dangling: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.3333333333333333,
p1: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.5,
p2: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.64,
p3: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.1,
projection: str = "equiangular",
) -> Tuple[
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
]:
...rnumpy.ndarray — rnelemnumpy.ndarray — nelemnelem_rnumpy.ndarray — nelem_rnelem2Optional[numpy.ndarray] — nelem2max_angleUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_anglemax_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_angle2min_angleOptional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_anglemin_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_angle2euler_anglesOptional[numpy.ndarray] — euler_anglesdanglingUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — danglingp1Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p1p2Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p2p3Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p3projectionstr — projection
cubed_sphere_vertical_refine_3d_range()
cubed_sphere_vertical_refine_3d_range()def cubed_sphere_vertical_refine_3d_range(
r_inner: float,
r_outer: float,
nelem: numpy.ndarray,
nelem_rad: numpy.ndarray,
dangling: float = 0.25,
p1: float = 0.5,
p2: float = 0.35714285714285715,
projection: str = "equiangular",
elem_locations_horizontal: Optional[
List[
Union[
Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]],
numpy._array_like._SupportsArray[numpy.dtype],
Sequence[numpy._array_like._SupportsArray[numpy.dtype]],
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
],
Sequence[
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
numpy._array_like._SupportsArray[numpy.dtype]
]
]
]
],
bool,
int,
float,
complex,
str,
bytes,
Sequence[Union[bool, int, float, complex, str, bytes]],
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
],
Sequence[
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
Union[bool, int, float, complex, str, bytes]
]
]
]
],
]
]
] = None,
) -> Tuple[
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
]:
...r_innerfloat — r_innerr_outerfloat — r_outernelemnumpy.ndarray — nelemnelem_radnumpy.ndarray — nelem_raddanglingfloat — danglingp1float — p1p2float — p2projectionstr — projectionelem_locations_horizontalOptional[List[Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], numpy._array_like._SupportsArray[numpy.dtype], Sequence[numpy._array_like._SupportsArray[numpy.dtype]], Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]], Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]], Sequence[Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]]], bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]] — Ensure that the horizontal element boundaries exist at these list of coordinate values. Length of this array must equal 1, and the length of the single entry must equal nelem_x.
cubed_sphere_vertical_refine_doubling_3d()
cubed_sphere_vertical_refine_doubling_3d()def cubed_sphere_vertical_refine_doubling_3d(
r: numpy.ndarray,
nelem: numpy.ndarray,
nelem_r: numpy.ndarray,
nelem2: Optional[numpy.ndarray] = None,
max_angle: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 45.0,
max_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
min_angle2: Optional[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = None,
euler_angles: Optional[numpy.ndarray] = None,
dangling: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.25,
p1: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.5,
p2: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.35714285714285715,
projection: str = "equiangular",
) -> Tuple[
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
]:
...rnumpy.ndarray — rnelemnumpy.ndarray — nelemnelem_rnumpy.ndarray — nelem_rnelem2Optional[numpy.ndarray] — nelem2max_angleUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_anglemax_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_angle2min_angleOptional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_anglemin_angle2Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_angle2euler_anglesOptional[numpy.ndarray] — euler_anglesdanglingUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — danglingp1Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p1p2Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p2projectionstr — projection
cubed_sphere_vertical_refine_doubling_3d_range()
cubed_sphere_vertical_refine_doubling_3d_range()def cubed_sphere_vertical_refine_doubling_3d_range(
r_inner: float,
r_outer: float,
nelem: numpy.ndarray,
nelem_rad: numpy.ndarray,
dangling: float = 0.25,
p1: float = 0.5,
p2: float = 0.35714285714285715,
projection: str = "equiangular",
elem_locations_horizontal: Optional[
List[
Union[
Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]],
numpy._array_like._SupportsArray[numpy.dtype],
Sequence[numpy._array_like._SupportsArray[numpy.dtype]],
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
],
Sequence[
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
numpy._array_like._SupportsArray[numpy.dtype]
]
]
]
],
bool,
int,
float,
complex,
str,
bytes,
Sequence[Union[bool, int, float, complex, str, bytes]],
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
],
Sequence[
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
Union[bool, int, float, complex, str, bytes]
]
]
]
],
]
]
] = None,
) -> Tuple[
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
salvus.mesh.mesh_block.mesh_block.MeshBlock,
]:
...r_innerfloat — r_innerr_outerfloat — r_outernelemnumpy.ndarray — nelemnelem_radnumpy.ndarray — nelem_raddanglingfloat — danglingp1float — p1p2float — p2projectionstr — projectionelem_locations_horizontalOptional[List[Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], numpy._array_like._SupportsArray[numpy.dtype], Sequence[numpy._array_like._SupportsArray[numpy.dtype]], Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]], Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]], Sequence[Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]]], bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]] — Ensure that the horizontal element boundaries exist at these list of coordinate values. Length of this array must equal 1, and the length of the single entry must equal nelem_x.
doubling_layer_2d()
doubling_layer_2d()def doubling_layer_2d(
r_inner: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
r_outer: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
nelem_lat: Union[int, numpy.int32, numpy.int64],
min_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.0,
max_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 180.0,
p1: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.5,
flip_vertical: bool = False,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...generate a simple spherical structured grid
r_innerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_innerr_outerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_outernelem_latUnion[int, numpy.int32, numpy.int64] — element number on the inner sidemin_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_colatmax_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_colatp1Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p1flip_verticalbool — flip_vertical
mesh_block_collection()
mesh_block_collection()def mesh_block_collection(
discontinuities: numpy.ndarray,
hmax: numpy.ndarray,
ndim: Union[int, numpy.int32, numpy.int64] = 2,
max_colat: Optional[numpy.ndarray] = None,
min_colat: Optional[numpy.ndarray] = None,
full_sphere: bool = False,
inner_core: bool = False,
axisem: bool = False,
hmax_refinement: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 1.5,
refinement_style: str = "doubling",
refinement_top_down: bool = True,
exclude_top_n_regions: Union[int, numpy.int32, numpy.int64] = 0,
return_info_dict: bool = False,
nelem_bottom_integer_multiple: Optional[
int, numpy.int32, numpy.int64
] = None,
nelem_vertical: Optional[numpy.ndarray] = None,
max_nrefine: Optional[int, numpy.int32, numpy.int64] = None,
hmax_horizontal: Optional[numpy.ndarray] = None,
) -> Union[
salvus.mesh.mesh_block.mesh_block_collection.MeshBlockCollection,
Tuple[
salvus.mesh.mesh_block.mesh_block_collection.MeshBlockCollection, Dict
],
]:
...create a cartesian or spherical mesh, quads in 2D or Hex in 3D
Note: using normalized coordinates here
discontinuitiesnumpy.ndarray — discontinuities to be respected by the mesh including the surface (1.) and the center (0.)hmaxnumpy.ndarray — maximum elementsize between the discontinuities. Needs to be provided for all layers (including the center, even if it is not meshed .length = len(discontinuities) - 1ndimUnion[int, numpy.int32, numpy.int64] — number of space dimensionsmax_colatOptional[numpy.ndarray] — max_colatmin_colatOptional[numpy.ndarray] — min_colatfull_spherebool — make a full sphere (overwrites max_colat)inner_corebool — include the inner core (only for full_sphere true)axisembool — axisemhmax_refinementUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — criterion (radial oversamping factor) for moving doubling_layers inwards to avoid small timestep. Smaller values = more aggressive.refinement_stylestr — refinement style to use, choices: “doubling”, and “tripling” foe 2D, “doubling” only for 3Drefinement_top_downbool — top down approach means minimizing number of elements at the surface at the cost of more elements at the bottom (default). If False, bottom up approach is used, that is minimizing number of elements at the bottom at the cost of more elements at the surface. Which one is more efficient depends on the velocity model and refinement style. Bottom up likely won’t work without inner core.exclude_top_n_regionsUnion[int, numpy.int32, numpy.int64] — design the mesh as usual but do not leave out the first n regions from the top. Meant to enable vertical refinements in the shallow layersreturn_info_dictbool — return_info_dictnelem_bottom_integer_multipleOptional[int, numpy.int32, numpy.int64] — nelem_bottom_integer_multiplenelem_verticalOptional[numpy.ndarray] — optionally provide the number of elements in vertical direction for all layers and override hmax for the vertical. length = len(discontinuities) - 1.max_nrefineOptional[int, numpy.int32, numpy.int64] — maximum number of refinement layers to be usedhmax_horizontalOptional[numpy.ndarray] — hmax_horizontal
shell_2d()
shell_2d()def shell_2d(
r_inner: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
r_outer: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
nelem_lat: Union[int, numpy.int32, numpy.int64],
nelem_rad: Union[int, numpy.int32, numpy.int64],
min_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.0,
max_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 180.0,
elem_locations_horizontal: Optional[
List[
Union[
Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]],
numpy._array_like._SupportsArray[numpy.dtype],
Sequence[numpy._array_like._SupportsArray[numpy.dtype]],
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
],
Sequence[
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
numpy._array_like._SupportsArray[numpy.dtype]
]
]
]
],
bool,
int,
float,
complex,
str,
bytes,
Sequence[Union[bool, int, float, complex, str, bytes]],
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
],
Sequence[
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
Union[bool, int, float, complex, str, bytes]
]
]
]
],
]
]
] = None,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...Generate a 2-D spherical shell mesh grid.
r_innerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — Minimum radius.r_outerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — Maximum radius.nelem_latUnion[int, numpy.int32, numpy.int64] — Number of points in the angular direction.nelem_radUnion[int, numpy.int32, numpy.int64] — Number of points in the radial direction.min_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — Minimum angle/co-latitude.max_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — Maximum angle/co-latitude.elem_locations_horizontalOptional[List[Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], numpy._array_like._SupportsArray[numpy.dtype], Sequence[numpy._array_like._SupportsArray[numpy.dtype]], Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]], Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]], Sequence[Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]]], bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]] — Ensure that the horizontal element boundaries exist at these list of coordinate values. Length of this array must equal 1, and the length of the single entry must equal nelem_x.
shell_radii_2d()
shell_radii_2d()def shell_radii_2d(
radius: numpy.ndarray,
nelem_lat: Union[int, numpy.int32, numpy.int64],
min_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.0,
max_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 180.0,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...generate a simple spherical structured grid with uneven radial spacing
radiusnumpy.ndarray — radiusnelem_latUnion[int, numpy.int32, numpy.int64] — nelem_latmin_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_colatmax_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_colat
shell_vertical_refine_2d()
shell_vertical_refine_2d()def shell_vertical_refine_2d(
r_inner: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
r_outer: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
nelem_lat: Union[int, numpy.int32, numpy.int64],
nelem_rad: numpy.ndarray,
min_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.0,
max_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 180.0,
p1: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.6,
p2: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.8,
elem_locations_horizontal: Optional[
List[
Union[
Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]],
numpy._array_like._SupportsArray[numpy.dtype],
Sequence[numpy._array_like._SupportsArray[numpy.dtype]],
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
],
Sequence[
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
numpy._array_like._SupportsArray[numpy.dtype]
]
]
]
],
bool,
int,
float,
complex,
str,
bytes,
Sequence[Union[bool, int, float, complex, str, bytes]],
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
],
Sequence[
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
Union[bool, int, float, complex, str, bytes]
]
]
]
],
]
]
] = None,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...r_innerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_innerr_outerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_outernelem_latUnion[int, numpy.int32, numpy.int64] — nelem_latnelem_radnumpy.ndarray — nelem_radmin_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_colatmax_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_colatp1Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p1p2Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p2elem_locations_horizontalOptional[List[Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], numpy._array_like._SupportsArray[numpy.dtype], Sequence[numpy._array_like._SupportsArray[numpy.dtype]], Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]], Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]], Sequence[Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]]], bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]] — Ensure that the horizontal element boundaries exist at these list of coordinate values. Length of this array must equal 1, and the length of the single entry must equal nelem_x.
shell_vertical_refine_doubling_2d()
shell_vertical_refine_doubling_2d()def shell_vertical_refine_doubling_2d(
r_inner: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
r_outer: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
nelem_lat: Union[int, numpy.int32, numpy.int64],
nelem_rad: numpy.ndarray,
min_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.0,
max_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 180.0,
p1: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.65,
p2: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.8,
elem_locations_horizontal: Optional[
List[
Union[
Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]],
numpy._array_like._SupportsArray[numpy.dtype],
Sequence[numpy._array_like._SupportsArray[numpy.dtype]],
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
],
Sequence[
Sequence[
Sequence[numpy._array_like._SupportsArray[numpy.dtype]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
numpy._array_like._SupportsArray[numpy.dtype]
]
]
]
],
bool,
int,
float,
complex,
str,
bytes,
Sequence[Union[bool, int, float, complex, str, bytes]],
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
],
Sequence[
Sequence[
Sequence[Union[bool, int, float, complex, str, bytes]]
]
],
Sequence[
Sequence[
Sequence[
Sequence[
Union[bool, int, float, complex, str, bytes]
]
]
]
],
]
]
] = None,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...r_innerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_innerr_outerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_outernelem_latUnion[int, numpy.int32, numpy.int64] — nelem_latnelem_radnumpy.ndarray — nelem_radmin_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_colatmax_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_colatp1Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p1p2Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — p2elem_locations_horizontalOptional[List[Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], numpy._array_like._SupportsArray[numpy.dtype], Sequence[numpy._array_like._SupportsArray[numpy.dtype]], Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]], Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]], Sequence[Sequence[Sequence[Sequence[numpy._array_like._SupportsArray[numpy.dtype]]]]], bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]]]] — Ensure that the horizontal element boundaries exist at these list of coordinate values. Length of this array must equal 1, and the length of the single entry must equal nelem_x.
tripling_layer_2d()
tripling_layer_2d()def tripling_layer_2d(
r_inner: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
r_outer: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
],
nelem_lat: Union[int, numpy.int32, numpy.int64],
min_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 0.0,
max_colat: Union[
int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
] = 180.0,
flip_vertical: bool = False,
) -> salvus.mesh.mesh_block.mesh_block.MeshBlock:
...generate a simple spherical structured grid
r_innerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_innerr_outerUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — r_outernelem_latUnion[int, numpy.int32, numpy.int64] — element number on the inner sidemin_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — min_colatmax_colatUnion[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — max_colatflip_verticalbool — flip_vertical