SciFEM_Schratter/ex3_benchmarks/factorization_solve.h

21 lines
No EOL
744 B
C++

#pragma once
#include <vector>
#include <cstdint>
using namespace std;
/** Solve linear system of equations with multiple right hand sides using LU factorization
* @param[inout] A NxN Matrix (1D access), gets modified to contain the LU decomposition of A
* @param[inout] B N x n_rhs Matrix of right-hand-sides (1D access), gets modified to contain the solution vectors x
* @param[in] n_rhs number of right-hand-sides b
*
*/
void factorization_solve(vector<double> &A, vector<double> &b, const int32_t &n_rhs);
/** Print a matrix to console
* @param[in] A MxN Matrix (1D access)
* @param[in] M rows
* @param[in] N columns
*
*/
void print_matrix(vector<double> &A, size_t M, size_t N);