gko::experimental::reorder::
ScaledReordered#
Wrapper around an inner operator: takes a system matrix \(A\), an
optional reordering (permutation \(P\)), an optional diagonal row scaling
\(R\) and an optional diagonal column scaling \(C\), and generates the inner
operator for the transformed system \(\hat A = P R A C P^T\) while the
application code sees the original. Apply / solve calls map the
right-hand side and the solution back and forth transparently, which is
useful for “reorder once, solve many times” workflows. The parameters are
inner_operator, reordering, row_scaling and col_scaling.
-
template<typename ValueType = default_precision, typename IndexType = int32>
class ScaledReordered # Inherits from
public gko::EnableLinOp<ScaledReordered<default_precision, int32>>
Provides an interface to wrap reorderings like Rcm and diagonal scaling like equilibration around a LinOp like e.g. a sparse direct solver.
Reorderings can be useful for reducing fill-in in the numerical factorization phase of direct solvers, diagonal scaling can help improve the numerical stability by reducing the condition number of the system matrix.
With a permutation matrix P, a row scaling R and a column scaling C, the inner operator is applied to the system matrix P*R*A*C*P^T instead of A. Instead of A*x = b, the inner operator attempts to solve the equivalent linear system P*R*A*C*P^T*y = P*R*b and retrieves the solution x = C*P^T*y. Note: The inner system matrix is computed from a clone of A, so the original system matrix is not changed.
- 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
-
struct parameters_type#
Public Members
-
std::shared_ptr<const LinOpFactory> inner_operator#
The inner operator factory that is to be generated on the scaled and reordered system matrix.
-
std::shared_ptr<const ReorderingBaseFactory> reordering#
The reordering that is to be applied to the system matrix. If a reordering is provided, the system matrix must be of type
Permutable<IndexType>.
-
std::shared_ptr<const LinOpFactory> inner_operator#