Peano
Loading...
Searching...
No Matches
LUDecomposition.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5#include "tarch/Assertions.h"
7#include "tarch/la/Matrix.h"
8#include "tarch/la/Vector.h"
9
10#ifdef UseLapack
11#include <lapacke.h>
12#endif
13
14
15namespace tarch {
16 namespace la {
22 template <int Rows, typename Scalar>
24
28 template <int Rows, typename Scalar> void lu(Matrix<Rows, Rows, Scalar>& A);
29
40 template <int Rows, typename Scalar>
44 );
45
46 void backSubstitution(const DynamicMatrix& R, const double* f, double* x);
47
49
59 template <int Rows, typename Scalar>
61
62#ifdef UseLapack
84 template <int Rows>
86#endif
87
93 template <typename Scalar>
95
101 template <typename Scalar>
103
104 template <typename Scalar> double det(const Matrix<2, 2, Scalar>& R);
105
106 template <typename Scalar> double det(const Matrix<3, 3, Scalar>& R);
107
108 } // namespace la
109} // namespace tarch
110
111
112#include "tarch/la/LUDecomposition.cpph"
My standard matrix is a matrix where the size is fixed at compile time.
Static (i.e.
Definition Matrix.h:42
Matrix< Rows, Rows, Scalar > invert(const Matrix< Rows, Rows, Scalar > &M)
Invert matrix with LU decomposition.
Vector< Rows, Scalar > backSubstitution(const Matrix< Rows, Rows, Scalar > &R, const Vector< Rows, Scalar > &f)
Back substitution following LU decomposition.
double det(const Matrix< 2, 2, Scalar > &R)
void lu(Matrix< Rows, Rows, Scalar > &A, Vector< Rows, int > &pivots)
Performs an in-situ LU-decomposition of the square matrix A.
DynamicMatrix invertUpperTriangular(const DynamicMatrix &R)
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19
Simple vector class.
Definition Vector.h:159