Fork me on GitHub
 All Classes Files Functions Variables Groups Pages
Public Methods | Public Members | Protected Members | List of all members
cusp::precond::nonsym_bridson_ainv< ValueType, MemorySpace > Class Template Reference

Detailed description

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

nonsym_bridson_ainv : Approximate Inverse preconditoner (from Bridson's "outer product" formulation) The non-symmetric form, which is identical to the standard form in the case of symmetric matrices, but handles non-symmtric matrices as well. The storage and cost of applying the preconditioner are about the same, but build time is 2x higher.

Definition at line 143 of file ainv.h.

#include <ainv.h>

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

Public Methods

template<typename MatrixTypeA >
 nonsym_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_t
 
cusp::hyb_matrix< int,
ValueType, MemorySpace > 
z
 
cusp::array1d< ValueType,
MemorySpace > 
diagonals
 

Protected Members

cusp::array1d< ValueType,
MemorySpace > 
temp1
 
cusp::array1d< ValueType,
MemorySpace > 
temp2
 

Constructor & Destructor Documentation

template<typename ValueType , typename MemorySpace >
template<typename MatrixTypeA >
cusp::precond::nonsym_bridson_ainv< ValueType, MemorySpace >::nonsym_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
ValueTypedrop_tolerance Tolerance 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

template<typename ValueType , typename MemorySpace >
template<typename VectorType1 , typename VectorType2 >
void cusp::precond::nonsym_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
youput vector
Template Parameters
VectorType1vector
VectorType2vector