ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
viennashe::solvers Namespace Reference

Namespace containing a variety of different linear solvers. More...

Namespaces

namespace  detail
 

Classes

class  dense_linear_solver_tag
 Internal tag used for the specification of a dense linear solver (Gauss, single-threaded) More...
 
class  gpu_parallel_linear_solver_tag
 Internal tag used for the specification of a GPU-accelerated linear solver. More...
 
class  invalid_linear_solver_exception
 Exception for the case that an invalid solver is in use. More...
 
class  invalid_nonlinear_solver_exception
 Exception for the case that an invalid nonlinear solver is in use. More...
 
class  linear_solver_config
 A configuration class holding options for use within the different linear solvers. More...
 
struct  linear_solver_ids
 Provides IDs for the linear solvers. More...
 
struct  log_gpu_block_ilut_precond
 Logging tag for messages specific to the GPU block-ILUT preconditioner. More...
 
struct  log_linear_solver
 Logging tag for general linear solver action. More...
 
struct  log_parallel_ilut_precond
 Logging tag for messages specific to the multithreaded (CPU-based) block-ILUT preconditioner. More...
 
class  nonlinear_solver_config
 A configuration class holding options for use within the different linear solvers. More...
 
struct  nonlinear_solver_ids
 Provides IDs for the nonlinear iteration schemes. More...
 
class  parallel_linear_solver_tag
 Internal tag used for the specification of a CPU-based multi-threaded linear solver. More...
 
class  petsc_amgx_solver_tag
 
class  PETSC_handler
 
class  petsc_linear_solver_tag
 Internal tag used for the specification of a CPU-based PETSC solver. More...
 
class  PETSC_matrix
 Wrapper class to the PETSC matrix. More...
 
class  PETSC_vector
 Class Encapsulate The PETSc COMM WORLD -Should be singleton. More...
 
class  serial_linear_solver_tag
 Internal tag used for the specification of a single-threaded linear solver. More...
 

Functions

std::vector< double > solve (viennashe::math::sparse_matrix< double > &A, std::vector< double > const &b, linear_solver_config const &config)
 Public interface for solving a system of linear equations represented using a sparse matrix. More...
 
std::vector< double > solve (viennashe::math::dense_matrix< double > &A, std::vector< double > const &b)
 Public interface for solving a system of linear equations using a dense matrix. More...
 
template<typename NumericT , typename VectorType >
VectorType solve (viennashe::math::dense_matrix< NumericT > const &A, VectorType const &b, viennashe::solvers::linear_solver_config const &config, viennashe::solvers::dense_linear_solver_tag)
 Solves the provided system using a dense Gauss solver with partial pivoting. More...
 
template<typename NumericT , typename VectorType >
VectorType solve (viennashe::math::sparse_matrix< NumericT > const &A, VectorType const &b, viennashe::solvers::linear_solver_config const &config, viennashe::solvers::dense_linear_solver_tag)
 Specialization for a sparse matrix. More...
 
template<typename NumericT , typename VectorType >
VectorType solve (viennashe::math::sparse_matrix< NumericT > const &A, VectorType const &b, viennashe::solvers::linear_solver_config const &config, viennashe::solvers::petsc_linear_solver_tag)
 
template<typename MatrixType , typename VectorType >
VectorType solve_impl (MatrixType &system_matrix, VectorType const &rhs, linear_solver_config const &config)
 Public interface for solving a system of linear equations. More...
 
template<typename CompressedMatrixType , typename VectorType >
VectorType solve (CompressedMatrixType const &system_matrix, VectorType const &rhs, viennashe::solvers::linear_solver_config const &config, viennashe::solvers::parallel_linear_solver_tag)
 Solves the provided system using an iterative solver with a block preconditioner on CPU. More...
 
template<typename MatrixType , typename VectorType >
VectorType solve (MatrixType const &system_matrix, VectorType const &rhs, viennashe::solvers::linear_solver_config const &config, viennashe::solvers::serial_linear_solver_tag)
 Solves the provided system using an iterative solver in a serial fashion (single-threaded execution) More...
 

Detailed Description

Namespace containing a variety of different linear solvers.

Function Documentation

◆ solve() [1/7]

template<typename CompressedMatrixType , typename VectorType >
VectorType viennashe::solvers::solve ( CompressedMatrixType const &  system_matrix,
VectorType const &  rhs,
viennashe::solvers::linear_solver_config const &  config,
viennashe::solvers::parallel_linear_solver_tag   
)

Solves the provided system using an iterative solver with a block preconditioner on CPU.

Parameters
system_matrixThe system matrix
rhsThe load vector (right hand side)
configThe linear solver configuration object

Definition at line 52 of file parallel_linear_solver.hpp.

◆ solve() [2/7]

template<typename MatrixType , typename VectorType >
VectorType viennashe::solvers::solve ( MatrixType const &  system_matrix,
VectorType const &  rhs,
viennashe::solvers::linear_solver_config const &  config,
viennashe::solvers::serial_linear_solver_tag   
)

Solves the provided system using an iterative solver in a serial fashion (single-threaded execution)

Parameters
system_matrixThe system matrix
rhsThe load vector (right hand side)
configThe linear solver configuration object

Definition at line 101 of file serial_linear_solver.hpp.

◆ solve() [3/7]

std::vector< double > viennashe::solvers::solve ( viennashe::math::dense_matrix< double > &  A,
std::vector< double > const &  b 
)

Public interface for solving a system of linear equations using a dense matrix.

Parameters
AThe system matrix containing even and odd unknowns
bThe load vector containing even and odd unknowns

◆ solve() [4/7]

template<typename NumericT , typename VectorType >
VectorType viennashe::solvers::solve ( viennashe::math::dense_matrix< NumericT > const &  A,
VectorType const &  b,
viennashe::solvers::linear_solver_config const &  config,
viennashe::solvers::dense_linear_solver_tag   
)

Solves the provided system using a dense Gauss solver with partial pivoting.

Parameters
AThe system matrix
bThe load vector (right hand side)
configThe linear solver configuration object

Definition at line 77 of file dense_linear_solver.hpp.

◆ solve() [5/7]

std::vector< double > viennashe::solvers::solve ( viennashe::math::sparse_matrix< double > &  A,
std::vector< double > const &  b,
linear_solver_config const &  config 
)

Public interface for solving a system of linear equations represented using a sparse matrix.

Parameters
AThe system matrix containing even and odd unknowns
bThe load vector containing even and odd unknowns
configLinear solver configuration object

◆ solve() [6/7]

template<typename NumericT , typename VectorType >
VectorType viennashe::solvers::solve ( viennashe::math::sparse_matrix< NumericT > const &  A,
VectorType const &  b,
viennashe::solvers::linear_solver_config const &  config,
viennashe::solvers::dense_linear_solver_tag   
)

Specialization for a sparse matrix.

Definition at line 139 of file dense_linear_solver.hpp.

◆ solve() [7/7]

template<typename NumericT , typename VectorType >
VectorType viennashe::solvers::solve ( viennashe::math::sparse_matrix< NumericT > const &  A,
VectorType const &  b,
viennashe::solvers::linear_solver_config const &  config,
viennashe::solvers::petsc_linear_solver_tag   
)

Definition at line 35 of file petsc_solver.hpp.

◆ solve_impl()

template<typename MatrixType , typename VectorType >
VectorType viennashe::solvers::solve_impl ( MatrixType &  system_matrix,
VectorType const &  rhs,
linear_solver_config const &  config 
)

Public interface for solving a system of linear equations.

Parameters
system_matrixThe system matrix containing even and odd unknowns
rhsThe load vector containing even and odd unknowns
configLinear solver configuration object

Definition at line 49 of file solve.hpp.