ViennaCL - The Vienna Computing Library  1.5.2
Namespaces | Functions
spai-static.hpp File Reference

Implementation of a static SPAI. Experimental. More...

#include <utility>
#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <vector>
#include <math.h>
#include <map>
#include "boost/numeric/ublas/vector.hpp"
#include "boost/numeric/ublas/matrix.hpp"
#include "boost/numeric/ublas/matrix_proxy.hpp"
#include "boost/numeric/ublas/vector_proxy.hpp"
#include "boost/numeric/ublas/storage.hpp"
#include "boost/numeric/ublas/io.hpp"
#include "boost/numeric/ublas/lu.hpp"
#include "boost/numeric/ublas/triangular.hpp"
#include "boost/numeric/ublas/matrix_expression.hpp"
#include "viennacl/linalg/prod.hpp"
#include "viennacl/matrix.hpp"
#include "viennacl/compressed_matrix.hpp"
#include "viennacl/linalg/sparse_matrix_operations.hpp"
#include "viennacl/linalg/matrix_operations.hpp"
#include "viennacl/scalar.hpp"
#include "viennacl/linalg/cg.hpp"
#include "viennacl/linalg/inner_prod.hpp"

Go to the source code of this file.

Namespaces

 viennacl
 Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
 
 viennacl::linalg
 Provides all linear algebra operations which are not covered by operator overloads.
 
 viennacl::linalg::detail
 Namespace holding implementation details for linear algebra routines. Usually not of interest for a library user.
 
 viennacl::linalg::detail::spai
 Implementation namespace for sparse approximate inverse preconditioner.
 

Functions

template<typename SizeType >
bool isInIndexSet (const std::vector< SizeType > &J, SizeType ind)
 Determines if element ind is in set {J}. More...
 
template<typename VectorType , typename SparseVectorType >
void fanOutVector (const VectorType &m_in, const std::vector< unsigned int > &J, SparseVectorType &m)
 Projects solution of LS problem onto original column m. More...
 
template<typename MatrixType , typename VectorType >
void backwardSolve (const MatrixType &R, const VectorType &y, VectorType &x)
 Solution of linear:R*x=y system by backward substitution. More...
 
template<typename VectorType , typename ScalarType >
void projectI (const std::vector< unsigned int > &I, VectorType &y, unsigned int ind)
 Perform projection of set I on the unit-vector. More...
 
template<typename SparseVectorType >
void buildColumnIndexSet (const SparseVectorType &v, std::vector< unsigned int > &J)
 Builds index set of projected columns for current column of preconditioner. More...
 
template<typename SparseMatrixType >
void initPreconditioner (const SparseMatrixType &A, SparseMatrixType &M)
 Initialize preconditioner with sparcity pattern = p(A) More...
 
template<typename SparseVectorType >
void projectRows (const std::vector< SparseVectorType > &A_v_c, const std::vector< unsigned int > &J, std::vector< unsigned int > &I)
 Row projection for matrix A(:,J) -> A(I,J), building index set of non-zero rows. More...
 

Detailed Description

Implementation of a static SPAI. Experimental.

SPAI code contributed by Nikolay Lukash