triangular decomposition of kernel of the orthogonal projection is updated after constraint deletion.
Note
This routine was formerly called plrmr0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | nf |
declared number of variables. |
|||
| integer | :: | ica(*) |
ica(nf) vector containing indices of active constraints. |
|||
| real(kind=wp) | :: | cr(*) |
cr(nf*(nf+1)/2) triangular decomposition of kernel of the orthogonal projection. |
|||
| real(kind=wp) | :: | g(*) |
g(nf) auxiliary vector. |
|||
| integer | :: | n |
actual number of variables. |
|||
| integer | :: | iold |
index of the old active constraint. |
|||
| integer | :: | krem |
auxiliary variable. |
|||
| integer | :: | ier |
error indicator. |
subroutine update_tri_decomp_orthogonal(nf, ica, cr, g, n, iold, krem, ier) integer :: ier !! error indicator. integer :: iold !! index of the old active constraint. integer :: krem !! auxiliary variable. integer :: n !! actual number of variables. integer :: nf !! declared number of variables. real(wp) :: cr(*) !! cr(nf*(nf+1)/2) triangular decomposition !! of kernel of the orthogonal projection. real(wp) :: g(*) !! g(nf) auxiliary vector. integer :: ica(*) !! ica(nf) vector containing indices of active constraints. real(wp) :: ck, cl integer :: i, j, k, kc, l, nca nca = nf - n if (iold < nca) then k = iold*(iold - 1)/2 kc = ica(iold) call mxvcop(iold, cr(k + 1), g) call mxvset(nca - iold, 0.0_wp, g(iold + 1)) k = k + iold do i = iold + 1, nca k = k + i call mxvort(cr(k - 1), cr(k), ck, cl, ier) call mxvrot(g(i - 1), g(i), ck, cl, ier) l = k do j = i, nca - 1 l = l + j call mxvrot(cr(l - 1), cr(l), ck, cl, ier) end do end do k = iold*(iold - 1)/2 do i = iold, nca - 1 l = k + i ica(i) = ica(i + 1) call mxvcop(i, cr(l + 1), cr(k + 1)) k = l end do ica(nca) = kc call mxvcop(nca, g, cr(k + 1)) end if krem = 1 end subroutine update_tri_decomp_orthogonal