template<typename ValueType, typename MemorySpace>
class cusp::relaxation::jacobi< ValueType, MemorySpace >
Represents a Jacobi relaxation scheme.
- Template Parameters
-
ValueType | value_type of the array |
MemorySpace | memory space of the array (cusp::host_memory or cusp::device_memory ) |
- Overview
- Extracts the matrix diagonal and performs weighted Jacobi relaxation
- Example
int main()
{
while (!monitor.finished(r))
{
M(A, b, x);
++monitor;
}
}
Definition at line 95 of file jacobi.h.
#include <jacobi.h>
|
| jacobi (void) |
|
template<typename MatrixType > |
| jacobi (const MatrixType &A, ValueType omega=1.0) |
|
template<typename MemorySpace2 > |
| jacobi (const jacobi< ValueType, MemorySpace2 > &A) |
|
template<typename MatrixType , typename VectorType1 , typename VectorType2 > |
void | operator() (const MatrixType &A, const VectorType1 &b, VectorType2 &x) |
|
template<typename MatrixType , typename VectorType1 , typename VectorType2 > |
void | operator() (const MatrixType &A, const VectorType1 &b, VectorType2 &x, const ValueType omega) |
|
| linear_operator (void) |
|
| linear_operator (intnum_rows, intnum_cols) |
|
| linear_operator (intnum_rows, intnum_cols, intnum_entries) |
|
template<typename ValueType, typename MemorySpace>
This constructor creates an empty jacobi
smoother.
Definition at line 107 of file jacobi.h.
template<typename ValueType, typename MemorySpace>
template<typename MatrixType >
This constructor creates a jacobi
smoother using a given matrix and sweeping strategy (FORWARD, BACKWARD, SYMMETRIC).
- Template Parameters
-
MatrixType | Type of input matrix used to create this jacobi smoother. |
- Parameters
-
A | Input matrix used to create smoother. |
omega | Damping factor used in Jacobi smoother. |
template<typename ValueType, typename MemorySpace>
template<typename MemorySpace2 >
Copy constructor for jacobi
smoother.
- Template Parameters
-
MemorySpace2 | Memory space of input jacobi smoother. |
- Parameters
-
Definition at line 128 of file jacobi.h.
template<typename ValueType, typename MemorySpace>
template<typename MatrixType , typename VectorType1 , typename VectorType2 >
void cusp::relaxation::jacobi< ValueType, MemorySpace >::operator() |
( |
const MatrixType & |
A, |
|
|
const VectorType1 & |
b, |
|
|
VectorType2 & |
x |
|
) |
| |
Perform Jacobi relaxation using default omega damping factor specified during construction of this jacobi
smoother
- Template Parameters
-
MatrixType | Type of input matrix. |
VectorType1 | Type of input right-hand side vector. |
VectorType2 | Type of input approximate solution vector. |
- Parameters
-
A | matrix of the linear system |
x | approximate solution of the linear system |
b | right-hand side of the linear system |
template<typename ValueType, typename MemorySpace>
template<typename MatrixType , typename VectorType1 , typename VectorType2 >
void cusp::relaxation::jacobi< ValueType, MemorySpace >::operator() |
( |
const MatrixType & |
A, |
|
|
const VectorType1 & |
b, |
|
|
VectorType2 & |
x, |
|
|
const ValueType |
omega |
|
) |
| |
Perform Jacobi relaxation using specified omega damping factor.
- Template Parameters
-
MatrixType | Type of input matrix. |
VectorType1 | Type of input right-hand side vector. |
VectorType2 | Type of input approximate solution vector. |
- Parameters
-
A | matrix of the linear system |
x | approximate solution of the linear system |
b | right-hand side of the linear system |
omega | Damping factor used in Jacobi smoother. |