HyperHDG
Classes | Namespaces | Functions
lapack.hxx File Reference

This file provides the function lapack_solve. More...

#include <array>
#include <HyperHDG/dense_la.hxx>
Include dependency graph for lapack.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Wrapper::LAPACKexception
 Exception to be thrown if LAPACK's solve fails. More...
 

Namespaces

 Wrapper
 A namespace containing the different wrapper functions.
 

Functions

template<unsigned int system_size, unsigned int n_rhs_cols = 1, typename lapack_float_t >
std::array< lapack_float_t, system_size *n_rhs_cols > Wrapper::lapack_solve (std::array< lapack_float_t, system_size *system_size > &dense_mat, std::array< lapack_float_t, system_size *n_rhs_cols > &rhs)
 Solve local system of equations. More...
 
template<unsigned int n_rows, unsigned int n_cols, typename lapack_float_t >
lapack_float_t Wrapper::lapack_det (std::array< lapack_float_t, n_rows *n_cols > &dense_mat)
 Determinant of a rectangular system. More...
 
template<unsigned int n_rows, unsigned int n_cols, typename lapack_float_t >
std::array< lapack_float_t, n_rows *n_rows > Wrapper::lapack_qr_decomp_q (std::array< lapack_float_t, n_rows *n_cols > &dense_mat)
 Matrix Q of QR decomposition. More...
 
template<unsigned int n_rows, unsigned int n_cols, typename lapack_float_t >
std::array< lapack_float_t, n_rows *n_cols > & Wrapper::lapack_qr_decomp_r (std::array< lapack_float_t, n_rows *n_cols > &dense_mat)
 Matrix R of QR decomposition. More...
 
template<unsigned int n_rows, unsigned int n_cols, typename lapack_float_t >
void Wrapper::lapack_qr_decomp (std::array< lapack_float_t, n_rows *n_cols > &dense_mat, std::array< lapack_float_t, n_rows *n_rows > &mat_q)
 Matrices Q and R of QR decomposition. More...
 
template<unsigned int n_rows, unsigned int n_cols, typename lapack_float_t >
void Wrapper::lapack_qr_decomp (std::array< lapack_float_t, n_rows *n_cols > &dense_mat, std::array< lapack_float_t, n_rows *n_rows > &mat_q, std::array< lapack_float_t, n_cols *n_cols > &mat_r)
 Matrices Q and R of QR decomposition. More...
 
void Wrapper::lapack_solve (int system_size, int n_rhs_cols, double *mat_a, double *rhs_b)
 Solve local system of equations with double floating point numbers — DO NOT USE. More...
 
void Wrapper::lapack_solve (int system_size, int n_rhs_cols, float *mat_a, float *rhs_b)
 Solve local system of equations with float floating point numbers — DO NOT USE. More...
 
void Wrapper::lapack_qr (int n_rows, int n_cols, double *mat_a, double *tau)
 QR decomposition in double floating point arithmetic — DO NOT USE. More...
 
void Wrapper::lapack_qr (int n_rows, int n_cols, float *mat_a, float *tau)
 QR decomposition in float floating point arithmetic — DO NOT USE. More...
 
template<unsigned int n_rows, unsigned int n_cols, unsigned int rank, typename lapack_float_t >
std::array< lapack_float_t, n_rows *n_rows > Wrapper::get_q_from_lapack_qr_result (const std::array< lapack_float_t, n_rows *n_cols > &dense_mat, const std::array< lapack_float_t, rank > &tau)
 Matrix Q of QR decomposition — DO NOT USE. More...
 
template<unsigned int n_rows, unsigned int n_cols, unsigned int rank, typename lapack_float_t >
void Wrapper::get_q_from_lapack_qr_result (const std::array< lapack_float_t, n_rows *n_cols > &dense_mat, const std::array< lapack_float_t, rank > &tau, std::array< lapack_float_t, n_rows *n_rows > &mat_q)
 Matrix Q of QR decomposition — DO NOT USE. More...
 
template<unsigned int n_rows, unsigned int n_cols, typename lapack_float_t >
std::array< lapack_float_t, n_rows *n_cols > & Wrapper::get_r_from_lapack_qr_result (std::array< lapack_float_t, n_rows *n_cols > &dense_mat)
 Matrix R of QR decomposition — DO NOT USE. More...
 
template<unsigned int n_rows, unsigned int n_cols, typename lapack_float_t >
void Wrapper::get_r_from_lapack_qr_result (const std::array< lapack_float_t, n_rows *n_cols > &lapack_mat, std::array< lapack_float_t, n_cols *n_cols > &mat_r)
 Matrix R of QR decomposition — DO NOT USE. More...
 

Detailed Description

This file provides the function lapack_solve.


This is a wrapper file to provide LAPACK based functions that have the ability to solve (dense) local systems of linear equations in an efficient way. The functions daxpy_ and dnrm2_ are needed to provide the three functions that solve local systems of equations. From these three functions, one is chosen to be used in the remainder of the code (i.e., dgesv_ cf. LAPACK manual for further details).

Authors
Guido Kanschat, Heidelberg University, 2019–2020.
Andreas Rupp, Heidelberg University, 2019–2020.