gko::solver::LowerTrs#
Lower-triangular solve. Direct (non-iterative) substitution against a
lower-triangular matrix L: apply(b, x) produces x such that
L x = b. The forward-sweep half of LU- and IC-based preconditioners,
and the kernel behind incomplete-factorisation solver chains.
-
template<typename ValueType = default_precision, typename IndexType = int32>
class LowerTrs # Inherits from
public gko::EnableLinOp<LowerTrs<default_precision, int32>>
public gko::solver::EnableSolverBase<LowerTrs<default_precision, int32>, matrix::Csr<default_precision, int32>>
public gko::Transposable
LowerTrs is the triangular solver which solves the system L x = b, when L is a lower triangular matrix. It works best when passing in a matrix in CSR format. If the matrix is not in CSR, then the generate step converts it into a CSR matrix. The generation fails if the matrix is not convertible to CSR.
Note
As the constructor uses the copy and convert functionality, it is not possible to create a empty solver or a solver with a matrix in any other format other than CSR, if none of the executor modules are being compiled with.
- Template Parameters:
ValueType – precision of matrix elements
IndexType – precision of matrix indices
Public Functions
-
virtual std::unique_ptr<LinOp> transpose() const override#
Returns a LinOp representing the transpose of the Transposable object.
- Returns:
a pointer to the new transposed object
-
virtual std::unique_ptr<LinOp> conj_transpose() const override#
Returns a LinOp representing the conjugate transpose of the Transposable object.
- Returns:
a pointer to the new conjugate transposed object
-
LowerTrs(const LowerTrs&)#
Copy-assigns a triangular solver. Preserves the executor, shallow-copies the system matrix. If the executors mismatch, clones system matrix onto this executor. Solver analysis information will be regenerated.
-
LowerTrs(LowerTrs&&)#
Move-assigns a triangular solver. Preserves the executor, moves the system matrix. If the executors mismatch, clones system matrix onto this executor and regenerates solver analysis information. Moved-from object is empty (0x0 and nullptr system matrix)
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
-
gko::size_type num_rhs#
Number of right hand sides.
Note
This value is currently only required for the CUDA trisolve_algorithm::sparselib algorithm.
-
bool unit_diagonal#
Should the solver use the values on the diagonal of the system matrix (false) or should it assume they are 1.0 (true)?
-
trisolve_algorithm algorithm#
Select the implementation which is supposed to be used for the triangular solver. This only matters for the Cuda executor where the choice is between the Ginkgo (syncfree) and the cuSPARSE (sparselib) implementation. Default is sparselib.
-
gko::size_type num_rhs#