dynabench.grid
Module for representing a grid for finite difference methods.
Classes
  | 
D-dimensional Cartesian grid with uniform discretization for each axis.  | 
  | 
Base class for all grids.  | 
  | 
Class for a unit grid.  | 
- class dynabench.grid.Grid(grid_size: tuple = (64, 64), grid_limits: tuple = ((0, 64), (0, 64)), **kwargs)[source]
 Bases:
objectBase class for all grids.
- Parameters:
 grid_size (tuple, default (64, 64)) – Size of the grid. Defaults to (64, 64).
grid_limits (tuple, default ((0, 1), (0, 1))) – Limits of the grid. Defaults to ((0, 1), (0, 1)).
- property dx
 Get the step size in the x direction.
- property dy
 Get the step size in the y direction.
- get_random_point_within_domain(num_points: int = 1)[source]
 Get a random point within the domain of the grid, but not necessarily on the grid.
- property shape
 Get the shape of the grid.