template<typename ValueType, typename MemorySpace>
class cusp::relaxation::sor< ValueType, MemorySpace >
Represents a Successive Over-Relaxation 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 Successive Over-Relaxation relaxation
- Example
int main()
{
while (!monitor.finished(r))
{
M(A, b, x);
++monitor;
}
}
Definition at line 98 of file sor.h.
#include <sor.h>
|
| sor (void) |
|
template<typename MatrixType > |
| sor (const MatrixType &A, const ValueType omega, sweep default_direction=SYMMETRIC) |
|
template<typename MemorySpace2 > |
| sor (const sor< 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, sweep direction) |
|
| 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 sor
smoother.
Definition at line 110 of file sor.h.
template<typename ValueType, typename MemorySpace>
template<typename MatrixType >
cusp::relaxation::sor< ValueType, MemorySpace >::sor |
( |
const MatrixType & |
A, |
|
|
const ValueType |
omega, |
|
|
sweep |
default_direction = SYMMETRIC |
|
) |
| |
|
inline |
This constructor creates a sor
smoother using a given matrix and sweeping strategy (FORWARD, BACKWARD, SYMMETRIC).
- Template Parameters
-
MatrixType | Type of input matrix used to create this sor smoother. |
- Parameters
-
A | Input matrix used to create smoother. |
omega | Damping factor used in SOR smoother. |
default_direction | Sweep strategy used to perform Gauss-Seidel smoothing. |
Definition at line 124 of file sor.h.
template<typename ValueType, typename MemorySpace>
template<typename MemorySpace2 >
Copy constructor for sor
smoother.
- Template Parameters
-
MemorySpace2 | Memory space of input sor smoother. |
- Parameters
-
Definition at line 134 of file sor.h.
template<typename ValueType, typename MemorySpace>
template<typename MatrixType , typename VectorType1 , typename VectorType2 >
void cusp::relaxation::sor< ValueType, MemorySpace >::operator() |
( |
const MatrixType & |
A, |
|
|
const VectorType1 & |
b, |
|
|
VectorType2 & |
x |
|
) |
| |
Perform SOR relaxation using default omega damping factor specified during construction of this sor
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::sor< ValueType, MemorySpace >::operator() |
( |
const MatrixType & |
A, |
|
|
const VectorType1 & |
b, |
|
|
VectorType2 & |
x, |
|
|
const ValueType |
omega, |
|
|
sweep |
direction |
|
) |
| |
Perform SOR 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 SOR smoother. |
direction | sweeping strategy for this gauss_seidel smoother (FORWARD, BACKWARD, SYMMETRIC). |