pygpe.shared.grid.Grid#

class pygpe.shared.grid.Grid(points, grid_spacings)#

An object representing the numerical grid. It contains information on the number of grid points, the shape, the dimensionality, and lengths of the grid.

Parameters:
  • points (int or tuple of ints) – Number of points in each spatial dimension.

  • grid_spacings (float or tuple of floats) – Numerical spacing between grid points in each spatial dimension.

Variables:
  • shape – Shape of the grid.

  • ndim – Dimensionality of the grid.

  • total_num_points – Total number of grid points across all dimensions.

  • num_points_x – Number of points in the x-direction.

  • num_points_y – (2D and 3D only) Number of points in the y-direction.

  • num_points_z – (3D only) Number of points in the z-direction.

  • length_x – Length of the grid in the x-direction.

  • length_y – (2D and 3D only) Length of the grid in the y-direction.

  • length_z – (3D only) Length of the grid in the z-direction.

  • x_mesh – The x meshgrid. The dimensionality matches that of ndim.

  • y_mesh – (2D and 3D only) The y meshgrid. The dimensionality matches that of ndim.

  • z_mesh – (3D only) The z meshgrid. The dimensionality matches that of ndim.

  • grid_spacing_x – Grid spacing in the x-direction.

  • grid_spacing_y – (2D and 3D only) Grid spacing in the y-direction.

  • grid_spacing_z – (3D only) Grid spacing in the z-direction.

  • grid_spacing_product – The product of the grid spacing for each dimension.

  • fourier_x_mesh – The Fourier-space x meshgrid. The dimensionality matches that of ndim.

  • fourier_y_mesh – (2D and 3D only) The Fourier-space y meshgrid. The dimensionality matches that of ndim.

  • fourier_z_mesh – (3D only) The Fourier-space z meshgrid. The dimensionality matches that of ndim.

  • fourier_spacing_x – Fourier grid spacing in the x-direction.

  • fourier_spacing_y – (2D and 3D only) Fourier grid spacing in the y-direction.

  • fourier_spacing_z – (3D only) Fourier grid spacing in the z-direction.

__init__(points, grid_spacings)#

Constructs the grid object.

Methods

__init__(points, grid_spacings)

Constructs the grid object.