Class for solving non-negative least-squares problems, cf. T. Chapman et al, "Accelerated mesh sampling for the hyper reduction of nonlinear computational
models," Int. J. Numer. Meth. Engng., 109: 1623-1654.
Definition at line 38 of file NNLS.h.
Enumerated types of QRresidual mode. Options are 'off': the residual is calculated normally, 'on': the residual is calculated using the QR method, 'hybrid': the residual is calculated normally until we experience rounding errors, then the QR method is used. The default is 'hybrid', which should see the best performance. Recommend using 'hybrid' or 'off' only, since 'on' is computationally expensive.
Definition at line 69 of file NNLS.h.
void CAROM::NNLSSolver::solve_parallel_with_scalapack |
( |
const Matrix & |
matTrans, |
|
|
const Vector & |
rhs_lb, |
|
|
const Vector & |
rhs_ub, |
|
|
Vector & |
soln |
|
) |
| |
Solve the NNLS problem. Specifically, we find a vector soln, such that rhs_lb < mat*soln < rhs_ub is satisfied. The matrix should hold a column distributed matrix (each process has all rows, but a subset of cols). Since libROM only supports row distributed matrices, the transpose is input. rhs_ub and rhs_lb are the true bounds divided by the number of processors, such that when the rhs_lb and rhs_ub are summed across all processes we get the true bounds. soln is a vector containing the solution. rhs_lb, rhs_ub and soln are all identical across all processes. The method by which we find the solution is the active-set method developed by Lawson and Hanson (1974) using scalapack functions to effect the multi-processor matrix operations. To decrease rounding errors in the case of very tight tolerances, we have the option to compute the residual using the QR factorization of A, by res = b - Q*Q^T*b. This residual calculation results in less rounding error, but is more computationally expensive. To select whether to use the QR residual method or not, see set_qrresidual_mode above.
Definition at line 130 of file NNLS.cpp.