MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
matrix_util.h
Go to the documentation of this file.
1 /*
2  * =====================================================================================
3  *
4  * Filename: matrix_util.h
5  *
6  * Description: Utility function for working with blas matrices.
7  *
8  * Version: 1.0
9  * Created: 05/10/2016 05:26:06 PM
10  * Revision: none
11  * Compiler: gcc
12  *
13  * Author: Dilawar Singh (), dilawars@ncbs.res.in
14  * Organization: NCBS Bangalore
15  *
16  * =====================================================================================
17  */
18 
19 #ifndef matrix_util_INC
20 #define matrix_util_INC
21 
22 #ifdef USE_BOOST_ODE
23 
24 #include <boost/numeric/ublas/matrix.hpp>
25 #include "boost/numeric/bindings/lapack/lapack.hpp"
26 #include "boost/numeric/bindings/lapack/geev.hpp"
27 typedef double value_type;
28 using namespace boost::numeric;
29 
33 void swapRows( ublas::matrix< value_type >& mat, unsigned int r1, unsigned int r2);
34 
35 int reorderRows( ublas::matrix< value_type >& U, int start, int leftCol );
36 
37 void eliminateRowsBelow( ublas::matrix< value_type >& U, int start, int leftCol );
38 
39 unsigned int rankUsingBoost( ublas::matrix<value_type>& U );
40 
41 #endif
42 #endif /* ----- #ifndef matrix_util_INC ----- */
double value_type
void swapRows(ublas::matrix< double > &mat, unsigned int r1, unsigned int r2)
Swap row r1 and r2.
void eliminateRowsBelow(ublas::matrix< double > &U, int start, int leftCol)
int reorderRows(ublas::matrix< double > &U, int start, int leftCol)
unsigned int rankUsingBoost(ublas::matrix< double > &U)