sailfish.mesh.PlanarCartesian2DMesh
- class sailfish.mesh.PlanarCartesian2DMesh(x0: float = 0.0, y0: float = 0.0, x1: float = 1.0, y1: float = 1.0, ni: int = 1000, nj: int = 1000)[source]
Bases:
NamedTupleA 2D mesh with rectangular binning.
The length of the domain is related to height by an aspect ratio. The minimum demarcations along an axis is also variable allowing for non-square meshing if need be.
- __init__()
Methods
__init__()cell_coordinates(i, j)centered_rectangle(height, resolution, aspect)centered_square(domain_radius, resolution)count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
min_spacing([time])sub_mesh(di, dj)Return a new mesh that is a subset of this one.
vertex_coordinates(i, j)Return the position of the lower-left corner of zone (i, j).
Attributes
dxdyAlias for field number 4
Alias for field number 5
num_total_zonesshapeAlias for field number 0
Alias for field number 2
Alias for field number 1
Alias for field number 3
- count(value, /)
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- ni: int
Alias for field number 4
- nj: int
Alias for field number 5
- sub_mesh(di, dj)[source]
Return a new mesh that is a subset of this one.
The arguments di and dj are tuples, containing the lower and upper index range on this mesh.
- x0: float
Alias for field number 0
- x1: float
Alias for field number 2
- y0: float
Alias for field number 1
- y1: float
Alias for field number 3