gko::factorization::Ilu#
ILU(0): incomplete LU factorisation with the same sparsity pattern as the input matrix. Stores a lower unitriangular factor \(L\) and an upper triangular factor \(U\) that approximate \(A \approx L U\) on \(\mathcal{S}(A)\).
-
template<typename ValueType = gko::default_precision, typename IndexType = gko::int32>
class Ilu # Inherits from
public gko::Composition<gko::default_precision>
Represents an incomplete LU factorization — ILU(0) — of a sparse matrix.
More specifically, it consists of a lower unitriangular factor \(L\) and an upper triangular factor \(U\) with sparsity pattern \(\mathcal S(L + U)\) = \(\mathcal S(A)\) fulfilling \(LU = A\) at every non-zero location of \(A\).
- Template Parameters:
ValueType – Type of the values of all matrices used in this class
IndexType – Type of the indices of all matrices used in this class
Public Static Functions
- static parameters_type parse(
- const config::pnode &config,
- const config::registry &context,
- const config::type_descriptor &td_for_child = config::make_type_descriptor<ValueType, IndexType>(),
Create the parameters from the property_tree. Because this is directly tied to the specific type, the value/index type settings within config are ignored and type_descriptor is only used for children configs.
- Parameters:
config – the property tree for setting
context – the registry
td_for_child – the type descriptor for children configs. The default uses the value/index type of this class.
- Returns:
parameters
-
struct parameters_type#
Public Members
-
std::shared_ptr<typename matrix_type::strategy_type> l_strategy#
Strategy which will be used by the L matrix. The default value
nullptrwill result in the strategyclassical.
-
std::shared_ptr<typename matrix_type::strategy_type> u_strategy#
Strategy which will be used by the U matrix. The default value
nullptrwill result in the strategyclassical.
-
bool skip_sorting#
The
system_matrix, which will be given to this factory, must be sorted (first by row, then by column) in order for the algorithm to work. If it is known that the matrix will be sorted, this parameter can be set totrueto skip the sorting (therefore, shortening the runtime). However, if it is unknown or if the matrix is known to be not sorted, it must remainfalse, otherwise, this factorization might be incorrect.
-
incomplete_algorithm algorithm#
Select the implementation which is supposed to be used for the incomplete factorization. This only matters for the CUDA/HIP/REFERENCE executor where the choice is between the Ginkgo (syncfree) and the cuSPARSE/hipSPARSE/reference (sparselib) implementation. Default is sparselib.
-
std::shared_ptr<typename matrix_type::strategy_type> l_strategy#