spectral.BvpProblem#

class spectral.BvpProblem(operator: ndarray, rhs: ndarray)[source]#

Bases: object

Dense linear BVP system with convenience helpers.

Methods

__init__

apply_dirichlet

Apply Dirichlet boundary conditions in-place.

solve

Solve the linear BVP system.

Attributes

apply_dirichlet(indices: Iterable[int], values: Iterable[float]) None[source]#

Apply Dirichlet boundary conditions in-place.

Parameters:
indicesIterable[int]

Row indices where boundary conditions are applied

valuesIterable[float]

Boundary condition values

operator: ndarray#
rhs: ndarray#
solve() ndarray[source]#

Solve the linear BVP system.

Returns:
np.ndarray

Solution vector