Lines Matching refs:ls

1970   PetscFV_LeastSquares *ls = (PetscFV_LeastSquares *)fvm->data;  in PetscFVDestroy_LeastSquares()  local
1974 PetscCall(PetscFree4(ls->B, ls->Binv, ls->tau, ls->work)); in PetscFVDestroy_LeastSquares()
1975 PetscCall(PetscFree(ls)); in PetscFVDestroy_LeastSquares()
2153 PetscFV_LeastSquares *ls = (PetscFV_LeastSquares *)fvm->data; in PetscFVComputeGradient_LeastSquares() local
2155 const PetscInt maxFaces = ls->maxFaces; in PetscFVComputeGradient_LeastSquares()
2165 for (d = 0; d < dim; ++d) ls->B[d * maxFaces + f] = dx[f * dim + d]; in PetscFVComputeGradient_LeastSquares()
2170 …quaresPseudoInverseSVD_Static(numFaces, maxFaces, dim, ls->B, ls->Binv, ls->tau, ls->workSize, ls-… in PetscFVComputeGradient_LeastSquares()
2173 for (d = 0; d < dim; ++d) grad[f * dim + d] = ls->Binv[d + maxmn * f]; in PetscFVComputeGradient_LeastSquares()
2176 …stSquaresPseudoInverse_Static(numFaces, maxFaces, dim, ls->B, ls->Binv, ls->tau, ls->workSize, ls-… in PetscFVComputeGradient_LeastSquares()
2179 for (d = 0; d < dim; ++d) grad[f * dim + d] = ls->Binv[d * maxFaces + f]; in PetscFVComputeGradient_LeastSquares()
2218 PetscFV_LeastSquares *ls = (PetscFV_LeastSquares *)fvm->data; in PetscFVLeastSquaresSetMaxFaces_LS() local
2224 PetscCall(PetscFree4(ls->B, ls->Binv, ls->tau, ls->work)); in PetscFVLeastSquaresSetMaxFaces_LS()
2225 ls->maxFaces = maxFaces; in PetscFVLeastSquaresSetMaxFaces_LS()
2226 m = ls->maxFaces; in PetscFVLeastSquaresSetMaxFaces_LS()
2228 nrhs = ls->maxFaces; in PetscFVLeastSquaresSetMaxFaces_LS()
2231 ls->workSize = 3 * minmn + PetscMax(2 * minmn, PetscMax(maxmn, nrhs)); /* required by LAPACK */ in PetscFVLeastSquaresSetMaxFaces_LS()
2232 …PetscCall(PetscMalloc4(m * n, &ls->B, maxmn * maxmn, &ls->Binv, minmn, &ls->tau, ls->workSize, &ls in PetscFVLeastSquaresSetMaxFaces_LS()
2257 PetscFV_LeastSquares *ls; in PetscFVCreate_LeastSquares() local
2261 PetscCall(PetscNew(&ls)); in PetscFVCreate_LeastSquares()
2262 fvm->data = ls; in PetscFVCreate_LeastSquares()
2264 ls->maxFaces = -1; in PetscFVCreate_LeastSquares()
2265 ls->workSize = -1; in PetscFVCreate_LeastSquares()
2266 ls->B = NULL; in PetscFVCreate_LeastSquares()
2267 ls->Binv = NULL; in PetscFVCreate_LeastSquares()
2268 ls->tau = NULL; in PetscFVCreate_LeastSquares()
2269 ls->work = NULL; in PetscFVCreate_LeastSquares()