v0.16.3
Loading...
Searching...
No Matches
TaoDiagonalNNLS.hpp
Go to the documentation of this file.
1/** \file TaoDiagonalNNLS.hpp
2 * \brief Direct nonnegative least squares for orthogonal constraint rows.
3 */
4
5#ifndef MOFEM_TAO_DIAGONAL_NNLS_HPP
6#define MOFEM_TAO_DIAGONAL_NNLS_HPP
7
8namespace MoFEM {
9
10/** Registered TAOSHELL solver for a diagonal NNLS normal matrix. */
11inline constexpr char TAODIAGONALNNLS[] = "diagonal";
12
13/** Register the "diagonal" TAO type before selecting it. */
15
16/** Set the fixed least-squares problem min_{x >= 0} ||J^T x - target||^2/2.
17 *
18 * J must have mutually orthogonal, nonzero rows. The solver checks the
19 * diagonally normalized Gram matrix and computes
20 * x_i = max(0, (J target)_i / (J J^T)_ii) in one algebraic update.
21 * Coupled rows are rejected; use a general NNLS solver such as TAOBLMVM for
22 * those problems. No line search is used.
23 *
24 * Call after selecting TAODIAGONALNNLS. The solver retains J and target and
25 * installs objective/gradient callbacks for this problem. Set the solution
26 * vector with TaoSetSolution using J's row layout; target uses its column
27 * layout. Inputs may be updated or rebound between solves. Each solve
28 * recomputes the Gram diagonal and verifies orthogonality.
29 *
30 * Nonnegativity is implicit. Explicit bounds, if supplied, must be zero and
31 * positive infinity; additional constraints are unsupported. Standard TAO
32 * monitoring and convergence checks use the true bound-projected gradient,
33 * including its nonzero inward components at x_i = 0. The objective itself
34 * can remain positive at the least-squares optimum.
35 */
37
38} // namespace MoFEM
39
40#endif // MOFEM_TAO_DIAGONAL_NNLS_HPP
SmartPetscObj< Vec > target
SmartPetscObj< Mat > jacobian
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
MoFEMErrorCode TaoDiagonalNNLSSetProblem(Tao tao, Mat jacobian, Vec target)
MoFEMErrorCode TaoRegisterDiagonalNNLS()
constexpr char TAODIAGONALNNLS[]