#include <LLSSolver.h>
Public Member Functions | |
| LLSSolver () | |
| void | solve (int matrixSizeM, int matrixSizeN, real *A, real *b, real *x, vector< real > &UFixedParticles, vector< real > &SFixedParticles, vector< real > &VFixedParticles, int &fixedParticles) |
| Linear Least Square Solver. | |
| ~LLSSolver () | |
Solving a non-square system of linear equations with singular value decomposition using a library from lapack
| LLSSolver::LLSSolver | ( | ) |
constructor
| LLSSolver::~LLSSolver | ( | ) |
destructor
| void LLSSolver::solve | ( | int | matrixSizeM, | |
| int | matrixSizeN, | |||
| real * | A, | |||
| real * | b, | |||
| real * | x, | |||
| vector< real > & | UFixedParticles, | |||
| vector< real > & | SFixedParticles, | |||
| vector< real > & | VFixedParticles, | |||
| int & | fixedParticles | |||
| ) |
Linear Least Square Solver.
This class is for solving Linear Least Square (LLS) problem. The LLS is A * x = b, where A is of size m by n, x is n by one, and b is m by one
For robustness, the singular valuse decomposition (svd) is used. However, svd in lapack uses Fortran convention. note that A is a one-dimesional array, which store a 2D matrix using the Fortran comvension, i.e., store the first column, second column, and so on.
| matrixSizeM | m of matrix A |
| matrixSizeN | n of matrix A |
| A | matrix from pressure and vorticity |
| b | vector from pressure and vorticity |
| x | coefficients |
| UFixedParticles | stores U of the LLS solver |
| SFixedParticles | stores S of the LLS solver |
| VFixedParticles | stores V of the LLS solver |
| fixedParticles | stores if the particles are fixed |
1.5.6