Documentation 6b54b78464
Loading...
Searching...
No Matches
CMatrixInverse.hpp File Reference

Dense small-matrix inversion via Gauss-Jordan elimination, shared between the host (CSysMatrix::MatrixInverse) and device (CSysPreconditionerGPU.cu) implementations. More...

#include <cmath>
#include "../code_config.hpp"

Go to the source code of this file.

Namespaces

namespace  SU2_LinAlg
 

Macros

#define A(I, J)   matrix[(I)*nVar + (J)]
 
#define M(I, J)   inverse[(I)*nVar + (J)]
 

Functions

template<class ScalarType >
void SU2_LinAlg::RegularizePivot (ScalarType &pivot)
 Regularize a pivot that is too small to prevent divide-by-zero, on host and device this needs to clamp to the same value so that the two produce the same factors.
 
template<class ScalarType >
void SU2_LinAlg::MatrixInverse (unsigned long nVar, ScalarType *matrix, ScalarType *inverse)
 Invert the nVar by nVar dense matrix matrix into inverse via Gauss-Jordan elimination with partial pivoting on the diagonal.
 

Detailed Description

Dense small-matrix inversion via Gauss-Jordan elimination, shared between the host (CSysMatrix::MatrixInverse) and device (CSysPreconditionerGPU.cu) implementations.

Author
F. Palacios, A. Bueno, T. Economon, P. Gomes
Version
8.5.0 "Harrier"

SU2 Project Website: https://su2code.github.io

The SU2 Project is maintained by the SU2 Foundation (http://su2foundation.org)

Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)

SU2 is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

SU2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with SU2. If not, see http://www.gnu.org/licenses/.

Macro Definition Documentation

◆ A

#define A (   I,
  J 
)    matrix[(I)*nVar + (J)]

◆ M

#define M (   I,
  J 
)    inverse[(I)*nVar + (J)]