ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
block_matrix_writer.hpp File Reference

Writes a possibly scaled block matrix to the system matrix. Includes similar functionality for computing residual contributions. More...

Go to the source code of this file.

Namespaces

namespace  viennashe
 The main ViennaSHE namespace. All functionality resides inside this namespace.
 
namespace  viennashe::util
 A collection of utilities used within ViennaSHE.
 

Functions

template<typename SystemMatrixType , typename BlockMatrixType , typename RowIndexIterator , typename ColumnIndexIterator >
void viennashe::util::add_block_matrix (SystemMatrixType &system_matrix, std::size_t row_index, std::size_t col_index, double prefactor, BlockMatrixType const &coupling_matrix, RowIndexIterator row_iter, ColumnIndexIterator const &col_iter_init, bool elastic_scattering_roundoff_error_prevention=false)
 Writes a sub-matrix of a block matrix 'coupling_matrix' into the global system matrix, scaled by 'prefactor'. More...
 
template<typename SystemMatrixType , typename BlockMatrixType , typename RowIndexIterator , typename ColumnIndexIterator , typename FoldVectorType >
void viennashe::util::add_folded_block_matrix (SystemMatrixType &system_matrix, long row_index, long col_index, double prefactor, BlockMatrixType const &coupling_matrix, RowIndexIterator row_iter, ColumnIndexIterator const &col_iter_init, FoldVectorType const &fold_vector, long fold_index_start)
 Writes a sub-matrix of a block matrix 'coupling_matrix' into the global system matrix, scaled by 'prefactor'. The columns are 'folded' (summed, i.e. a matrix-vector product) according to the vector provided. More...
 
template<typename VectorType , typename BlockMatrixType , typename RowIndexIterator , typename ColumnIndexIterator >
void viennashe::util::subtract_folded_block_vector (VectorType &residual, std::size_t row_index, double prefactor, BlockMatrixType const &coupling_matrix, RowIndexIterator row_iter, ColumnIndexIterator const &col_iter_init, double const *fold_vector)
 Writes a sub-matrix of a block matrix 'coupling_matrix' to the residual vector. The columns are 'folded' (summed, i.e. a matrix-vector product) according to the vector provided. More...
 

Detailed Description

Writes a possibly scaled block matrix to the system matrix. Includes similar functionality for computing residual contributions.

Definition in file block_matrix_writer.hpp.