1 #ifndef VIENNACL_LINALG_DETAIL_CHOW_PATEL_ILU_HPP_ 
    2 #define VIENNACL_LINALG_DETAIL_CHOW_PATEL_ILU_HPP_ 
   76   template<
typename NumericT>
 
  109   template<
typename NumericT>
 
  157 template<
typename MatrixT>
 
  161   typedef typename MatrixT::CHOW_PATEL_ICC_ONLY_WORKS_WITH_COMPRESSED_MATRIX  error_type;
 
  169 template<
typename NumericT, 
unsigned int AlignmentV>
 
  176       L_(0, 0, 0, viennacl::traits::
context(A)),
 
  178       L_trans_(0, 0, 0, viennacl::traits::
context(A)),
 
  189   template<
typename VectorT>
 
  197     for (
unsigned int i=0; i<tag_.jacobi_iters(); ++i)
 
  208     for (
unsigned int i=0; i<tag_.jacobi_iters(); ++i)
 
  235 template<
typename MatrixT>
 
  239   typedef typename MatrixT::CHOW_PATEL_ILU_ONLY_WORKS_WITH_COMPRESSED_MATRIX  error_type;
 
  247 template<
typename NumericT, 
unsigned int AlignmentV>
 
  254       L_(0, 0, 0, viennacl::traits::
context(A)),
 
  256       U_(0, 0, 0, viennacl::traits::
context(A)),
 
  268   template<
typename VectorT>
 
  276     for (
unsigned int i=0; i<tag_.jacobi_iters(); ++i)
 
  287     for (
unsigned int i=0; i<tag_.jacobi_iters(); ++i)
 
const vcl_size_t & size2() const 
Returns the number of columns. 
void apply(VectorT &vec) const 
Preconditioner application: LL^Tx = b, computed via Ly = b, L^Tx = y using Jacobi iterations...
viennacl::vector_expression< const vector_base< T >, const vector_base< T >, op_element_binary< op_div > > element_div(vector_base< T > const &v1, vector_base< T > const &v2)
A tag for incomplete LU and incomplete Cholesky factorization with static pattern (Parallel-ILU0...
void jacobi_iters(vcl_size_t num)
Sets the number of Jacobi iterations for each triangular 'solve' when applying the preconditioner to ...
const vcl_size_t & size1() const 
Returns the number of rows. 
Generic interface for matrix-vector and matrix-matrix products. See viennacl/linalg/vector_operations...
vcl_size_t size1(MatrixType const &mat)
Generic routine for obtaining the number of rows of a matrix (ViennaCL, uBLAS, etc.) 
void extract_L(compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &L)
Extracts the lower triangular part L from A. 
void ilu_chow_patel_sweep(compressed_matrix< NumericT > &L, vector< NumericT > const &aij_L, compressed_matrix< NumericT > &U_trans, vector< NumericT > const &aij_U_trans)
Performs one nonlinear relaxation step in the Chow-Patel-ILU (cf. Algorithm 2 in paper) ...
This file provides the forward declarations for the main types used within ViennaCL. 
Parallel Chow-Patel ILU preconditioner class, can be supplied to solve()-routines. 
void sweeps(vcl_size_t num)
Sets the number of sweeps (i.e. number of nonlinear iterations) in the solver setup stage...
const handle_type & handle() const 
Returns the OpenCL handle to the matrix entry array. 
const vcl_size_t & nnz() const 
Returns the number of nonzero entries. 
Represents a generic 'context' similar to an OpenCL context, but is backend-agnostic and thus also su...
Implementations of specialized routines for the Chow-Patel parallel ILU preconditioner. 
vcl_size_t sweeps() const 
Returns the number of sweeps (i.e. number of nonlinear iterations) in the solver setup stage...
VectorT prod(std::vector< std::vector< T, A1 >, A2 > const &matrix, VectorT const &vector)
chow_patel_tag(vcl_size_t num_sweeps=3, vcl_size_t num_jacobi_iters=2)
Constructor allowing to set the number of sweeps and Jacobi iterations. 
void icc_scale(compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &L)
Scales the values extracted from A such that A' = DAD has unit diagonal. Updates values from A in L a...
void ilu_scale(compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &L, compressed_matrix< NumericT > &U)
Scales the values extracted from A such that A' = DAD has unit diagonal. Updates values from A in L a...
void extract_LU(compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &L, compressed_matrix< NumericT > &U)
Extracts the lower triangular part L and the upper triangular part U from A. 
chow_patel_icc_precond(viennacl::compressed_matrix< NumericT, AlignmentV > const &A, chow_patel_tag const &tag)
void ilu_form_neumann_matrix(compressed_matrix< NumericT > &R, vector< NumericT > &diag_R)
Extracts the lower triangular part L and the upper triangular part U from A. 
void ilu_transpose(compressed_matrix< NumericT > const &A, compressed_matrix< NumericT > &B)
Transposition B <- A^T, where the aij-vector is permuted in the same way as the value array in A when...
void memory_copy(mem_handle const &src_buffer, mem_handle &dst_buffer, vcl_size_t src_offset, vcl_size_t dst_offset, vcl_size_t bytes_to_copy)
Copies 'bytes_to_copy' bytes from address 'src_buffer + src_offset' to memory starting at address 'ds...
viennacl::context context(T const &t)
Returns an ID for the currently active memory domain of an object. 
void icc_chow_patel_sweep(compressed_matrix< NumericT > &L, vector< NumericT > &aij_L)
Performs one nonlinear relaxation step in the Chow-Patel-ICC (cf. Algorithm 3 in paper, but for L rather than U) 
Common routines used within ILU-type preconditioners. 
void precondition(viennacl::compressed_matrix< NumericT > const &A, viennacl::compressed_matrix< NumericT > &L, viennacl::vector< NumericT > &diag_L, viennacl::compressed_matrix< NumericT > &L_trans, chow_patel_tag const &tag)
Implementation of the parallel ICC0 factorization, Algorithm 3 in Chow-Patel paper. 
void resize(vcl_size_t new_size1, vcl_size_t new_size2, bool preserve=true)
Resize the matrix. 
Parallel Chow-Patel ILU preconditioner class, can be supplied to solve()-routines. 
Main interface routines for memory management. 
void apply(VectorT &vec) const 
Preconditioner application: LUx = b, computed via Ly = b, Ux = y using Jacobi iterations. 
vcl_size_t jacobi_iters() const 
Returns the number of Jacobi iterations (i.e. applications of x_{k+1} = (I - D^{-1}R)x_k + D^{-1} b) ...
chow_patel_ilu_precond(viennacl::compressed_matrix< NumericT, AlignmentV > const &A, chow_patel_tag const &tag)