polaris.mesh.planar.compute_planar_hex_nx_ny
- polaris.mesh.planar.compute_planar_hex_nx_ny(lx, ly, resolution)[source]
Compute number of grid cells in each direction for the uniform, hexagonal planar mesh with the given physical sizes and resolution. The resulting
nx
andny
account for the staggered nature of the hexagonal grid in the y direction, and are appropriate for passing tompas_tools.planar_hex.make_planar_hex_mesh()
.- Parameters:
- Returns:
nx (int) – The number of grid cells in the x direction
ny (int) – The number of grid cells in the y direction