Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Protected Member Functions | Protected Attributes
Kokkos::DefaultRelaxation< Scalar, Ordinal, Node > Class Template Reference

Various relaxation methods. More...

#include <Kokkos_DefaultRelaxation.hpp>

List of all members.

Public Member Functions

Constructors/Destructor
 DefaultRelaxation (const RCP< Node > &node=DefaultNode::getDefaultNode())
 DefaultRelaxation constructor.
 ~DefaultRelaxation ()
 DefaultRelaxation Destructor.
Accessor routines.
RCP< Node > getNode () const
 Node accessor.
Initialization of structure
template<class UNSUPPORTED_GRAPH , class UNSUPPORTED_MATRIX >
void initializeData (const RCP< const UNSUPPORTED_GRAPH > &graph, const RCP< const UNSUPPORTED_MATRIX > &matrix)
void initializeData (const RCP< const DefaultCrsGraph< Ordinal, Node > > &graph, const RCP< const DefaultCrsMatrix< Scalar, Ordinal, Node > > &matrix)
 Initialize the data.
void setDiagonal (MultiVector< Scalar, Node > &diag)
Computational methods
void sweep_jacobi (Scalar dampingFactor_, MultiVector< Scalar, Node > &X, const MultiVector< Scalar, Node > &B) const
 Applies a sweep of Jacobi.
void setup_chebyshev (const Scalar lambda_max, const Scalar lambda_min)
 Does setup for Chebyshev.
void sweep_chebyshev (MultiVector< Scalar, Node > &X, const MultiVector< Scalar, Node > &B) const
 Applies a sweep of Chebyshev iteration.

Protected Member Functions

 DefaultRelaxation (const DefaultRelaxation &source)
 Copy constructor (protected and unimplemented)
void ExtractDiagonal ()
 Extract the diagonal from the matrix, if the user hasn't set it already.
bool UpdateJacobiTemp (size_t num_vectors, size_t vec_leng) const
 Update the Jacobi temporary vector size.
bool UpdateChebyTemp (size_t num_vectors, size_t vec_leng) const
 Update the Chebyshev temporary vector size.

Protected Attributes

RCP< Node > node_
 My node.
ArrayRCP< Scalar > diagonal_
 Array containing matrix diagonal for easy access.
ArrayRCP< Scalar > tempJacobiVector_
 Temporary work storage for Jacobi.

Detailed Description

template<class Scalar, class Ordinal, class Node>
class Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >

Various relaxation methods.

Methods include Jacobi, Gauss-Seidel, and Chebyshev polynomial relaxation.

Definition at line 71 of file Kokkos_DefaultRelaxation.hpp.


Constructor & Destructor Documentation

template<class Scalar , class Ordinal , class Node >
Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::DefaultRelaxation ( const RCP< Node > &  node = DefaultNode::getDefaultNode())

DefaultRelaxation constructor.

Definition at line 192 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::~DefaultRelaxation ( )

DefaultRelaxation Destructor.

Definition at line 206 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::DefaultRelaxation ( const DefaultRelaxation< Scalar, Ordinal, Node > &  source) [protected]

Copy constructor (protected and unimplemented)


Member Function Documentation

template<class Scalar , class Ordinal , class Node >
RCP< Node > Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::getNode ( ) const

Node accessor.

Definition at line 252 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
template<class UNSUPPORTED_GRAPH , class UNSUPPORTED_MATRIX >
void Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::initializeData ( const RCP< const UNSUPPORTED_GRAPH > &  graph,
const RCP< const UNSUPPORTED_MATRIX > &  matrix 
)

Initialize structure of matrix.

Todo:
Not implemented for general sparse graphs.

Definition at line 212 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
void Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::initializeData ( const RCP< const DefaultCrsGraph< Ordinal, Node > > &  graph,
const RCP< const DefaultCrsMatrix< Scalar, Ordinal, Node > > &  matrix 
)

Initialize the data.

Definition at line 222 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
void Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::setDiagonal ( MultiVector< Scalar, Node > &  diag)

Sets the diagonal inverted for relaxation using a MultiVector

Todo:
Not implemented yet.

Definition at line 259 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
void Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::sweep_jacobi ( Scalar  dampingFactor_,
MultiVector< Scalar, Node > &  X,
const MultiVector< Scalar, Node > &  B 
) const

Applies a sweep of Jacobi.

Definition at line 430 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
void Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::setup_chebyshev ( const Scalar  lambda_max,
const Scalar  lambda_min 
)

Does setup for Chebyshev.

Definition at line 494 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
void Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::sweep_chebyshev ( MultiVector< Scalar, Node > &  X,
const MultiVector< Scalar, Node > &  B 
) const

Applies a sweep of Chebyshev iteration.

Definition at line 513 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
void Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::ExtractDiagonal ( ) [protected]

Extract the diagonal from the matrix, if the user hasn't set it already.

Definition at line 271 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
bool Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::UpdateJacobiTemp ( size_t  num_vectors,
size_t  vec_leng 
) const [protected]

Update the Jacobi temporary vector size.

Definition at line 309 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
bool Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::UpdateChebyTemp ( size_t  num_vectors,
size_t  vec_leng 
) const [protected]

Update the Chebyshev temporary vector size.

Definition at line 322 of file Kokkos_DefaultRelaxation.hpp.


Member Data Documentation

template<class Scalar , class Ordinal , class Node >
RCP<Node> Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::node_ [protected]

My node.

Definition at line 161 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
ArrayRCP<Scalar> Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::diagonal_ [protected]

Array containing matrix diagonal for easy access.

Definition at line 170 of file Kokkos_DefaultRelaxation.hpp.

template<class Scalar , class Ordinal , class Node >
ArrayRCP<Scalar> Kokkos::DefaultRelaxation< Scalar, Ordinal, Node >::tempJacobiVector_ [mutable, protected]

Temporary work storage for Jacobi.

Definition at line 173 of file Kokkos_DefaultRelaxation.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends