Lines Matching refs:LUSOL
21 void LU7ADD(LUSOLrec *LUSOL, int JADD, REAL V[], int LENL, int *LENU, in LU7ADD() argument
30 SMALL = LUSOL->parmlu[LUSOL_RP_ZEROTOLERANCE]; in LU7ADD()
34 I = LUSOL->ip[K]; in LU7ADD()
39 LENI = LUSOL->lenr[I]; in LU7ADD()
42 NFREE = LUSOL->lena - LENL - *LROW; in LU7ADD()
44 LU1REC(LUSOL, LUSOL->m, TRUE,LROW,LUSOL->indr,LUSOL->lenr,LUSOL->locr); in LU7ADD()
45 NFREE = LUSOL->lena - LENL - *LROW; in LU7ADD()
53 LUSOL->locr[I] = (*LROW) + 1; in LU7ADD()
54 LR1 = LUSOL->locr[I]; in LU7ADD()
58 if(LUSOL->indr[LR2+1]==0) in LU7ADD()
60 LUSOL->locr[I] = (*LROW) + 1; in LU7ADD()
65 MEMMOVE(LUSOL->a+LR2, LUSOL->a+LR1, L); in LU7ADD()
66 MEMMOVE(LUSOL->indr+LR2, LUSOL->indr+LR1, L); in LU7ADD()
67 MEMCLEAR(LUSOL->indr+LR1, L); in LU7ADD()
73 LUSOL->a[*LROW] = LUSOL->a[L]; in LU7ADD()
74 J = LUSOL->indr[L]; in LU7ADD()
75 LUSOL->indr[L] = 0; in LU7ADD()
76 LUSOL->indr[*LROW] = J; in LU7ADD()
85 LUSOL->a[LR2] = V[I]; in LU7ADD()
86 LUSOL->indr[LR2] = JADD; in LU7ADD()
87 LUSOL->lenr[I] = LENI+1; in LU7ADD()
108 void LU7CYC(LUSOLrec *LUSOL, int KFIRST, int KLAST, int IX[]) in LU7CYC() argument
149 void LU7ELM(LUSOLrec *LUSOL, int JELM, REAL V[], int *LENL, in LU7ELM() argument
159 SMALL = LUSOL->parmlu[LUSOL_RP_ZEROTOLERANCE]; in LU7ELM()
163 MINFRE = LUSOL->m-NRANK; in LU7ELM()
164 NFREE = LUSOL->lena-(*LENL)-(*LROW); in LU7ELM()
167 LU1REC(LUSOL, LUSOL->m,TRUE,LROW,LUSOL->indr,LUSOL->lenr,LUSOL->locr); in LU7ELM()
168 NFREE = LUSOL->lena-(*LENL)-(*LROW); in LU7ELM()
176 L = (LUSOL->lena-(*LENL))+1; in LU7ELM()
177 for(K = NRANK1; K <= LUSOL->m; K++) { in LU7ELM()
178 I = LUSOL->ip[K]; in LU7ELM()
183 LUSOL->a[L] = V[I]; in LU7ELM()
184 LUSOL->indc[L] = I; in LU7ELM()
197 IMAX = LUSOL->ip[KMAX]; in LU7ELM()
198 VMAX = LUSOL->a[LMAX]; in LU7ELM()
199 LUSOL->a[LMAX] = LUSOL->a[L]; in LU7ELM()
200 LUSOL->indc[LMAX] = LUSOL->indc[L]; in LU7ELM()
202 L2 = LUSOL->lena-(*LENL); in LU7ELM()
205 LUSOL->a[L] /= -VMAX; in LU7ELM()
206 LUSOL->indr[L] = IMAX; in LU7ELM()
209 LUSOL->ip[KMAX] = LUSOL->ip[NRANK1]; in LU7ELM()
210 LUSOL->ip[NRANK1] = IMAX; in LU7ELM()
218 LUSOL->locr[IMAX] = *LROW; in LU7ELM()
219 LUSOL->lenr[IMAX] = 1; in LU7ELM()
220 LUSOL->a[*LROW] = VMAX; in LU7ELM()
221 LUSOL->indr[*LROW] = JELM; in LU7ELM()
266 void LU7FOR(LUSOLrec *LUSOL, int KFIRST, int KLAST, int *LENL, int *LENU, in LU7FOR() argument
274 LTOL = LUSOL->parmlu[LUSOL_RP_UPDATEMAX_Lij]; in LU7FOR()
275 SMALL = LUSOL->parmlu[LUSOL_RP_ZEROTOLERANCE]; in LU7FOR()
276 USPACE = LUSOL->parmlu[LUSOL_RP_COMPSPACE_U]; in LU7FOR()
282 IW = LUSOL->ip[KLAST]; in LU7FOR()
283 LENW = LUSOL->lenr[IW]; in LU7FOR()
286 LW1 = LUSOL->locr[IW]; in LU7FOR()
288 JFIRST = LUSOL->iq[KBEGIN]; in LU7FOR()
293 MINFRE = LUSOL->n+1; in LU7FOR()
294 NFREE = LUSOL->lena-(*LENL)-(*LROW); in LU7FOR()
296 LU1REC(LUSOL, LUSOL->m,TRUE,LROW,LUSOL->indr,LUSOL->lenr,LUSOL->locr); in LU7FOR()
297 LW1 = LUSOL->locr[IW]; in LU7FOR()
299 NFREE = LUSOL->lena-(*LENL)-(*LROW); in LU7FOR()
306 J = LUSOL->indr[L]; in LU7FOR()
307 LUSOL->locc[J] = L; in LU7FOR()
313 KSTOP = MIN(KLAST,LUSOL->n); in LU7FOR()
315 JFIRST = LUSOL->iq[K]; in LU7FOR()
316 LFIRST = LUSOL->locc[JFIRST]; in LU7FOR()
320 WJ = LUSOL->a[LFIRST]; in LU7FOR()
329 IV = LUSOL->ip[K]; in LU7FOR()
330 LENV = LUSOL->lenr[IV]; in LU7FOR()
331 LV1 = LUSOL->locr[IV]; in LU7FOR()
335 if(LUSOL->indr[LV1]!=JFIRST) in LU7FOR()
337 VJ = LUSOL->a[LV1]; in LU7FOR()
350 LUSOL->ip[KLAST] = IV; in LU7FOR()
351 LUSOL->ip[K] = IW; in LU7FOR()
360 LUSOL->a[LFIRST] = LUSOL->a[LW2]; in LU7FOR()
361 JLAST = LUSOL->indr[LW2]; in LU7FOR()
362 LUSOL->indr[LFIRST] = JLAST; in LU7FOR()
363 LUSOL->indr[LW2] = 0; in LU7FOR()
364 LUSOL->locc[JLAST] = LFIRST; in LU7FOR()
365 LUSOL->locc[JFIRST] = 0; in LU7FOR()
377 L = LUSOL->lena-(*LENL); in LU7FOR()
378 LUSOL->a[L] = AMULT; in LU7FOR()
379 LUSOL->indr[L] = IV; in LU7FOR()
380 LUSOL->indc[L] = IW; in LU7FOR()
398 JV = LUSOL->indr[LV]; in LU7FOR()
399 LW = LUSOL->locc[JV]; in LU7FOR()
402 LUSOL->a[LW] += AMULT*LUSOL->a[LV]; in LU7FOR()
403 if(fabs(LUSOL->a[LW])<=SMALL) { in LU7FOR()
405 LUSOL->a[LW] = LUSOL->a[LW2]; in LU7FOR()
406 J = LUSOL->indr[LW2]; in LU7FOR()
407 LUSOL->indr[LW] = J; in LU7FOR()
408 LUSOL->indr[LW2] = 0; in LU7FOR()
409 LUSOL->locc[J] = LW; in LU7FOR()
410 LUSOL->locc[JV] = 0; in LU7FOR()
419 if(LUSOL->indr[LW2+1]!=0) in LU7FOR()
424 LUSOL->a[LW2] = AMULT*LUSOL->a[LV]; in LU7FOR()
425 LUSOL->indr[LW2] = JV; in LU7FOR()
426 LUSOL->locc[JV] = LW2; in LU7FOR()
434 LUSOL->locr[IW] = (*LROW)+1; in LU7FOR()
440 for(loci = LW1, locp = LUSOL->indr+LW1; in LU7FOR()
443 LUSOL->locc[*locp] = *LROW; in LU7FOR()
446 MEMMOVE(LUSOL->a+LW2, LUSOL->a+LW1, L); in LU7FOR()
447 MEMMOVE(LUSOL->indr+LW2, LUSOL->indr+LW1, L); in LU7FOR()
448 MEMCLEAR(LUSOL->indr+LW1, L); in LU7FOR()
453 LUSOL->a[*LROW] = LUSOL->a[L]; in LU7FOR()
454 J = LUSOL->indr[L]; in LU7FOR()
455 LUSOL->indr[L] = 0; in LU7FOR()
456 LUSOL->indr[*LROW] = J; in LU7FOR()
457 LUSOL->locc[J] = *LROW; in LU7FOR()
460 LW1 = LUSOL->locr[IW]; in LU7FOR()
467 JV = LUSOL->indr[LV]; in LU7FOR()
468 LW = LUSOL->locc[JV]; in LU7FOR()
471 LUSOL->a[LW] += AMULT*LUSOL->a[LV]; in LU7FOR()
472 if(fabs(LUSOL->a[LW])<=SMALL) { in LU7FOR()
474 LUSOL->a[LW] = LUSOL->a[LW2]; in LU7FOR()
475 J = LUSOL->indr[LW2]; in LU7FOR()
476 LUSOL->indr[LW] = J; in LU7FOR()
477 LUSOL->indr[LW2] = 0; in LU7FOR()
478 LUSOL->locc[J] = LW; in LU7FOR()
479 LUSOL->locc[JV] = 0; in LU7FOR()
491 LUSOL->a[LW2] = AMULT*LUSOL->a[LV]; in LU7FOR()
492 LUSOL->indr[LW2] = JV; in LU7FOR()
493 LUSOL->locc[JV] = LW2; in LU7FOR()
508 LUSOL->lenr[IW] = LENW; in LU7FOR()
512 J = LUSOL->indr[L]; in LU7FOR()
513 LUSOL->locc[J] = 0; in LU7FOR()
520 if(LUSOL->indr[L]==JFIRST) in LU7FOR()
526 *DIAG = LUSOL->a[LDIAG]; in LU7FOR()
527 LUSOL->a[LDIAG] = LUSOL->a[LW1]; in LU7FOR()
528 LUSOL->a[LW1] = *DIAG; in LU7FOR()
529 LUSOL->indr[LDIAG] = LUSOL->indr[LW1]; in LU7FOR()
530 LUSOL->indr[LW1] = JFIRST; in LU7FOR()
546 LIMIT = (int) (USPACE*(*LENU))+LUSOL->m+LUSOL->n+1000; in LU7FOR()
548 LU1REC(LUSOL, LUSOL->m,TRUE,LROW,LUSOL->indr,LUSOL->lenr,LUSOL->locr); in LU7FOR()
569 void LU7RNK(LUSOLrec *LUSOL, int JSING, int *LENU, in LU7RNK() argument
580 UTOL1 = LUSOL->parmlu[LUSOL_RP_SMALLDIAG_U]; in LU7RNK()
583 IW = LUSOL->ip[*NRANK]; in LU7RNK()
584 LENW = LUSOL->lenr[IW]; in LU7RNK()
587 L1 = LUSOL->locr[IW]; in LU7RNK()
592 if(UMAX<fabs(LUSOL->a[L])) { in LU7RNK()
593 UMAX = fabs(LUSOL->a[L]); in LU7RNK()
600 *DIAG = LUSOL->a[LMAX]; in LU7RNK()
601 JMAX = LUSOL->indr[LMAX]; in LU7RNK()
602 for(KMAX = *NRANK; KMAX <= LUSOL->n; KMAX++) { in LU7RNK()
603 if(LUSOL->iq[KMAX]==JMAX) in LU7RNK()
606 LUSOL->iq[KMAX] = LUSOL->iq[*NRANK]; in LU7RNK()
607 LUSOL->iq[*NRANK] = JMAX; in LU7RNK()
608 LUSOL->a[LMAX] = LUSOL->a[L1]; in LU7RNK()
609 LUSOL->a[L1] = *DIAG; in LU7RNK()
610 LUSOL->indr[LMAX] = LUSOL->indr[L1]; in LU7RNK()
611 LUSOL->indr[L1] = JMAX; in LU7RNK()
631 LUSOL->lenr[IW] = 0; in LU7RNK()
633 LUSOL->indr[L] = 0; in LU7RNK()
641 if(LUSOL->indr[*LROW]>0) in LU7RNK()
659 void LU7ZAP(LUSOLrec *LUSOL, int JZAP, int *KZAP, int *LENU, int *LROW, in LU7ZAP() argument
665 I = LUSOL->ip[K]; in LU7ZAP()
666 LENI = LUSOL->lenr[I]; in LU7ZAP()
669 LR1 = LUSOL->locr[I]; in LU7ZAP()
672 if(LUSOL->indr[L]==JZAP) in LU7ZAP()
678 LUSOL->a[L] = LUSOL->a[LR2]; in LU7ZAP()
679 LUSOL->indr[L] = LUSOL->indr[LR2]; in LU7ZAP()
680 LUSOL->indr[LR2] = 0; in LU7ZAP()
681 LUSOL->lenr[I] = LENI-1; in LU7ZAP()
686 if(LUSOL->iq[K]==JZAP) in LU7ZAP()
690 L = LUSOL->n; in LU7ZAP()
693 if(LUSOL->iq[K]==JZAP) in LU7ZAP()
699 if(LUSOL->indr[*LROW]==0) in LU7ZAP()