FirstOrderFiniteDifference#
- class cuqi.operator.FirstOrderFiniteDifference(num_nodes, bc_type='periodic', dx=None)#
First order finite difference differential operator for 1D and 2D grids.
Attributes:#
- num_nodes: int or tuple
For a 1D operator, num_nodes is a one dimensional tuple or an integer representing the number of discretization nodes in a 1D grid. For a 2D operator, num_nodes is a two dimensional tuple of integers representing the number of discretization nodes in the 2D grid in the x axis and the y axis, respectively.
- bc_type: str
The boundary condition type for the operator.
- physical_dim: int
Either 1 or 2 for 1D and 2D operators, respectively.
- dxint or float
The grid spacing (length between two consecutive nodes).
- __init__(num_nodes, bc_type='periodic', dx=None)#
Methods
__init__
(num_nodes[, bc_type, dx])Attributes