cuIBM
A GPU-based Immersed Boundary Method code
Public Types | Public Member Functions | Private Attributes | List of all members
preconditioner< Matrix > Class Template Reference

Stores the preconditioner for a given system. More...

#include <preconditioner.h>

Public Types

typedef Matrix::index_type index_type
 
typedef Matrix::value_type value_type
 
typedef Matrix::memory_space memory_space
 
typedef cusp::unknown_format format
 

Public Member Functions

 preconditioner ()
 
 preconditioner (const Matrix &A, preconditionerType _type)
 Constructor overloading. Computes the preconditioner given a matrix and a type of preconditioner. More...
 
 ~preconditioner ()
 Destructor. Deletes the preconditioner. More...
 
void update (const Matrix &A)
 Updates the preconditioner of the system. More...
 
template<typename VectorType1 , typename VectorType2 >
void operator() (const VectorType1 &x, VectorType2 &y) const
 Overloads the operator (). This is required due to the way preconditioners are implemented in Cusp - as linear operators on a vector. More...
 

Private Attributes

preconditionerType type
 type of preconditioner More...
 
cusp::linear_operator<typename Matrix::value_type, typename Matrix::memory_space, typename Matrix::index_type > * LO
 linear operator More...
 

Detailed Description

template<typename Matrix>
class preconditioner< Matrix >

Stores the preconditioner for a given system.

Definition at line 24 of file preconditioner.h.

Member Typedef Documentation

template<typename Matrix>
typedef cusp::unknown_format preconditioner< Matrix >::format

Definition at line 36 of file preconditioner.h.

template<typename Matrix>
typedef Matrix::index_type preconditioner< Matrix >::index_type

Definition at line 33 of file preconditioner.h.

template<typename Matrix>
typedef Matrix::memory_space preconditioner< Matrix >::memory_space

Definition at line 35 of file preconditioner.h.

template<typename Matrix>
typedef Matrix::value_type preconditioner< Matrix >::value_type

Definition at line 34 of file preconditioner.h.

Constructor & Destructor Documentation

template<typename Matrix>
preconditioner< Matrix >::preconditioner ( )
inline
template<class Matrix>
preconditioner< Matrix >::preconditioner ( const Matrix &  A,
preconditionerType  _type 
)

Constructor overloading. Computes the preconditioner given a matrix and a type of preconditioner.

Parameters
Amatrix of the system (instance of the class Matrix)
_typethe type of preconditioner

Definition at line 64 of file preconditioner.h.

References AINV, DIAGONAL, preconditioner< Matrix >::LO, SMOOTHED_AGGREGATION, and preconditioner< Matrix >::type.

template<typename Matrix >
preconditioner< Matrix >::~preconditioner ( )

Destructor. Deletes the preconditioner.

Definition at line 97 of file preconditioner.h.

References preconditioner< Matrix >::LO.

Referenced by preconditioner< cusp::coo_matrix< int, real, memoryType > >::preconditioner().

Member Function Documentation

template<typename Matrix >
template<typename VectorType1 , typename VectorType2 >
void preconditioner< Matrix >::operator() ( const VectorType1 &  x,
VectorType2 &  y 
) const

Overloads the operator (). This is required due to the way preconditioners are implemented in Cusp - as linear operators on a vector.

Definition at line 140 of file preconditioner.h.

References AINV, DIAGONAL, preconditioner< Matrix >::LO, SMOOTHED_AGGREGATION, and preconditioner< Matrix >::type.

Referenced by preconditioner< cusp::coo_matrix< int, real, memoryType > >::preconditioner().

template<class Matrix>
void preconditioner< Matrix >::update ( const Matrix &  A)

Updates the preconditioner of the system.

Parameters
Amatrix of the system (instance of the class Matrix)

Definition at line 109 of file preconditioner.h.

References AINV, DIAGONAL, preconditioner< Matrix >::LO, SMOOTHED_AGGREGATION, and preconditioner< Matrix >::type.

Referenced by preconditioner< cusp::coo_matrix< int, real, memoryType > >::preconditioner().

Member Data Documentation

template<typename Matrix>
cusp::linear_operator<typename Matrix::value_type, typename Matrix::memory_space, typename Matrix::index_type>* preconditioner< Matrix >::LO
private
template<typename Matrix>
preconditionerType preconditioner< Matrix >::type
private

The documentation for this class was generated from the following file: