template<typename ValueType, typename MemorySpace>
class cusp::relaxation::gauss_seidel< ValueType, MemorySpace >
Represents a Gauss-Seidel relaxation scheme.
- Template Parameters
-
ValueType | value_type of the array |
MemorySpace | memory space of the array (cusp::host_memory or cusp::device_memory ) |
- Overview
- Computes vertex coloring and performs indexed Gauss-Seidel relaxation
- Example
int main()
{
while (!monitor.finished(r))
{
M(A, b, x);
++monitor;
}
}
Definition at line 104 of file gauss_seidel.h.
#include <gauss_seidel.h>
|
| gauss_seidel (void) |
|
template<typename MatrixType > |
| gauss_seidel (const MatrixType &A, sweep default_direction=SYMMETRIC, typename thrust::detail::enable_if_convertible< typename MatrixType::format, cusp::csr_format >::type *=0) |
|
template<typename MemorySpace2 > |
| gauss_seidel (const gauss_seidel< 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, sweep direction) |
|
| linear_operator (void) |
|
| linear_operator (intnum_rows, intnum_cols) |
|
| linear_operator (intnum_rows, intnum_cols, intnum_entries) |
|
template<typename ValueType, typename MemorySpace>
template<typename ValueType, typename MemorySpace>
template<typename MatrixType >
cusp::relaxation::gauss_seidel< ValueType, MemorySpace >::gauss_seidel |
( |
const MatrixType & |
A, |
|
|
sweep |
default_direction = SYMMETRIC , |
|
|
typename thrust::detail::enable_if_convertible< typename MatrixType::format, cusp::csr_format >::type * |
= 0 |
|
) |
| |
This constructor creates a gauss_seidel
smoother using a given matrix and sweeping strategy (FORWARD, BACKWARD, SYMMETRIC).
- Template Parameters
-
MatrixType | Type of input matrix used to create this gauss_seidel smoother. |
- Parameters
-
A | Input matrix used to create smoother. |
default_direction | Sweep strategy used to perform Gauss-Seidel smoothing. |
template<typename ValueType, typename MemorySpace>
template<typename MemorySpace2 >
template<typename ValueType, typename MemorySpace>
template<typename MatrixType , typename VectorType1 , typename VectorType2 >
Perform Gauss-Seidel relaxation using default sweep specified during construction of this gauss_seidel
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::gauss_seidel< ValueType, MemorySpace >::operator() |
( |
const MatrixType & |
A, |
|
|
const VectorType1 & |
b, |
|
|
VectorType2 & |
x, |
|
|
sweep |
direction |
|
) |
| |
Perform Gauss-Seidel relaxation using specified sweep strategy
- 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 |
direction | sweeping strategy for this gauss_seidel smoother (FORWARD, BACKWARD, SYMMETRIC). |