CUSP
Loading...
Searching...
No Matches
cusp::precond::scaled_bridson_ainv< ValueType, MemorySpace > Class Template Reference

#include <ainv.h>

Inheritance diagram for cusp::precond::scaled_bridson_ainv< ValueType, MemorySpace >:
cusp::linear_operator< ValueType, MemorySpace, IndexType >

Public Methods

template<typename MatrixTypeA >
 scaled_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, IndexType >
 linear_operator (void)
 
 linear_operator (IndexType num_rows, IndexType num_cols)
 
 linear_operator (IndexType num_rows, IndexType num_cols, IndexType num_entries)
 

Public Members

cusp::hyb_matrix< int, ValueType, MemorySpace > w
 The approximate inverse factor W.
 
cusp::hyb_matrix< int, ValueType, MemorySpace > w_t
 The transpose of the approximate inverse factor W.
 

Detailed description

template<typename ValueType, typename MemorySpace>
class cusp::precond::scaled_bridson_ainv< ValueType, MemorySpace >

scaled_bridson_ainv : Approximate Inverse preconditioner (from Bridson's "outer product" formulation) The diagonal matrix is folded into the factorization to reduce operation count during preconditioner application. Not sure if this is a good idea or not, yet. 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.

Definition at line 52 of file ainv.h.

Constructor & Destructor Documentation

◆ scaled_bridson_ainv()

template<typename ValueType , typename MemorySpace >
template<typename MatrixTypeA >
cusp::precond::scaled_bridson_ainv< ValueType, MemorySpace >::scaled_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

Parameters
Amatrix to precondition
Template Parameters
MatrixTypeAmatrix
Parameters
drop_toleranceTolerance for dropping during factorization
nonzero_per_rowCount of non-zeroes allowed per row of the factored matrix. If negative or lin_dropping==true, this will be ignored.
lin_droppingWhen true, this will use the dropping strategy from Lin & More, where the per-row count will be based on A's structure.
lin_paramwhen lin_dropping set to true, this indicates how many additional non-zeros per row to include

Member Function Documentation

◆ operator()()

template<typename ValueType , typename MemorySpace >
template<typename VectorType1 , typename VectorType2 >
void cusp::precond::scaled_bridson_ainv< ValueType, MemorySpace >::operator() ( const VectorType1 &  x,
VectorType2 &  y 
)

apply the preconditioner to vector x and store the result in y

Parameters
xinput vector
youtput vector
Template Parameters
VectorType1vector
VectorType2vector

Member Data Documentation

◆ w

template<typename ValueType , typename MemorySpace >
cusp::hyb_matrix<int, ValueType, MemorySpace> cusp::precond::scaled_bridson_ainv< ValueType, MemorySpace >::w

The approximate inverse factor W.

Definition at line 59 of file ainv.h.

◆ w_t

template<typename ValueType , typename MemorySpace >
cusp::hyb_matrix<int, ValueType, MemorySpace> cusp::precond::scaled_bridson_ainv< ValueType, MemorySpace >::w_t

The transpose of the approximate inverse factor W.

Definition at line 61 of file ainv.h.