capytaine.bem.linear_solvers module¶
- class capytaine.bem.linear_solvers.AbstractLUDecomposedMatrix[source]¶
Bases:
ABCBase class of the LU decompositions of matrices.
New matrix types (e.g. matrices stored with another array library) can be supported by the linear solvers of Capytaine by registering a function returning a subclass of this class with
lu_decompose().As for an array of the array API standard, the subclasses define the method __array_namespace__ and the attribute (or property) device, returning the array library and the device of the matrix that has been decomposed.
- device: Any¶
- dtype: object¶
- shape: tuple¶
- class capytaine.bem.linear_solvers.LUDecomposedMatrix(A: NDArray, *, overwrite_a: bool = False)[source]¶
Bases:
AbstractLUDecomposedMatrix
- capytaine.bem.linear_solvers.lu_decompose(A, *, overwrite_a: bool = False) AbstractLUDecomposedMatrix[source]¶
- capytaine.bem.linear_solvers.lu_decompose(A: ndarray, *, overwrite_a: bool = False)
- capytaine.bem.linear_solvers.lu_decompose(A: BlockDiagonalMatrix, *, overwrite_a: bool = False)
- capytaine.bem.linear_solvers.lu_decompose(A: BlockCirculantMatrix, *, overwrite_a: bool = False)
- capytaine.bem.linear_solvers.lu_decompose(A: NestedBlockCirculantMatrix, *, overwrite_a: bool = False)
Compute the LU decomposition of A.
This is a
functools.singledispatch()function: the implementation for a new type of matrix can be added withlu_decompose.register(MyMatrix, my_function), wheremy_function(A, *, overwrite_a=False)returns anAbstractLUDecomposedMatrix.