bridson_ainv
: Approximate Inverse preconditoner (from Bridson's "outer product" formulation) This preconditioner allows for a novel dropping strategy, where rather than a fixed drop tolerance, you can specify now many non-zeroes are allowed per row. The non-zeroes will be chosen based on largest magnitude. This idea has been applied to IC factorization, but not AINV as far as I'm aware. See: Lin, C. and More, J. J. 1999. Incomplete Cholesky Factorizations with Limited Memory. SIAM J. Sci. Comput. 21, 1 (Aug. 1999), 24-45. This preconditioner will only work for SPD matrices.
#include <ainv.h>
Public Methods | |
template<typename MatrixTypeA > | |
bridson_ainv (const MatrixTypeA &A, ValueType drop_tolerance=0.1, int nonzero_per_row=-1, bool lin_dropping=false, int lin_param=1) | |
template<typename VectorType1 , typename VectorType2 > | |
void | operator() (const VectorType1 &x, VectorType2 &y) |
Public Methods inherited from cusp::linear_operator<ValueType, MemorySpace > | |
linear_operator (void) | |
linear_operator (intnum_rows, intnum_cols) | |
linear_operator (intnum_rows, intnum_cols, intnum_entries) | |
Public Members | |
cusp::hyb_matrix< int, ValueType, MemorySpace > | w |
cusp::hyb_matrix< int, ValueType, MemorySpace > | w_t |
cusp::array1d< ValueType, MemorySpace > | diagonals |
Protected Members | |
cusp::array1d< ValueType, MemorySpace > | temp1 |
cusp::array1d< ValueType, MemorySpace > | temp2 |
cusp::precond::bridson_ainv< ValueType, MemorySpace >::bridson_ainv | ( | const MatrixTypeA & | A, |
ValueType | drop_tolerance = 0.1 , |
||
int | nonzero_per_row = -1 , |
||
bool | lin_dropping = false , |
||
int | lin_param = 1 |
||
) |
construct a ainv
preconditioner
A | matrix to precondition |
MatrixTypeA | matrix |
ValueType | drop_tolerance Tolerance for dropping during factorization |
nonzero_per_row | Count of non-zeroes allowed per row of the factored matrix. If negative or lin_dropping==true, this will be ignored. |
lin_dropping | When true, this will use the dropping strategy from Lin & More, where the per-row count will be based on A's structure. |
lin_param | when lin_dropping set to true, this indicates how many additional non-zeros per row to include |
void cusp::precond::bridson_ainv< ValueType, MemorySpace >::operator() | ( | const VectorType1 & | x, |
VectorType2 & | y | ||
) |
apply the preconditioner to vector x
and store the result in y
x | input vector |
y | ouput vector |
VectorType1 | vector |
VectorType2 | vector |