cosapp.core.numerics.solve.linear_solver

Classes

AbstractLinearSolver()

DenseLUSolver()

Linear solver based on dense LU decomposition.

GradientBasedLS()

SparseLUSolver()

Linear solver based on sparse LU decomposition.

class cosapp.core.numerics.solve.linear_solver.AbstractLinearSolver[source]

Bases: HasOptions

abstract eval(dx: ndarray) ndarray[source]

Evaluates a residue delta from an input delta.

abstract has_valid_state(size: int) bool[source]

Gets whether the implementation is in valid state or not.

abstract property need_jacobian: bool

Gets whether the implementation needs eager computation of a Jacobian matrix or not.

abstract solve(x: ndarray) ndarray[source]

Solves the linear problem.

class cosapp.core.numerics.solve.linear_solver.DenseLUSolver[source]

Bases: GradientBasedLS

Linear solver based on dense LU decomposition.

eval(dx: ndarray) ndarray[source]

Evaluates a residue delta from an input delta.

has_valid_state(size: int) bool[source]

Gets whether the implementation is in valid state or not.

property jacobian: ndarray

Gets the Jacobian matrix.

property need_jacobian: bool

Gets whether the implementation needs eager computation of a Jacobian matrix or not.

setup(jac: ndarray) None[source]

Performs setup of the linear solver from the Jacobian matrix.

solve(x: ndarray) ndarray[source]

Solves the linear problem.

class cosapp.core.numerics.solve.linear_solver.GradientBasedLS[source]

Bases: AbstractLinearSolver

abstract property jacobian: ndarray

Gets the Jacobian matrix.

class cosapp.core.numerics.solve.linear_solver.SparseLUSolver[source]

Bases: AbstractLinearSolver

Linear solver based on sparse LU decomposition.

eval(dx: ndarray) ndarray[source]

Evaluates a residue delta from an input delta.

has_valid_state(size: int) bool[source]

Gets whether the implementation is in valid state or not.

property jacobian: ndarray

Gets the Jacobian matrix.

property need_jacobian: bool

Gets whether the implementation needs eager computation of a Jacobian matrix or not.

setup(jac: ndarray) None[source]

Performs setup of the linear solver from the Jacobian matrix.

solve(x: ndarray) ndarray[source]

Solves the linear problem.

cosapp.core.numerics.solve.linear_solver.object__getstate__(self, /)

Helper for pickle.