31 #ifndef SPARSELU_COLUMN_BMOD_H 32 #define SPARSELU_COLUMN_BMOD_H 52 template <
typename Scalar,
typename Index>
55 Index jsupno, k, ksub, krep, ksupno;
56 Index lptr, nrow, isub, irow, nextlu, new_next, ufirst;
57 Index fsupc, nsupc, nsupr, luptr, kfnz, no_zeros;
67 jsupno = glu.
supno(jcol);
74 for (ksub = 0; ksub < nseg; ksub++)
76 krep = segrep(k); k--;
77 ksupno = glu.
supno(krep);
78 if (jsupno != ksupno )
81 fsupc = glu.
xsup(ksupno);
82 fst_col = (std::max)(fsupc, fpanelc);
86 d_fsupc = fst_col - fsupc;
88 luptr = glu.
xlusup(fst_col) + d_fsupc;
89 lptr = glu.
xlsub(fsupc) + d_fsupc;
92 kfnz = (std::max)(kfnz, fpanelc);
94 segsize = krep - kfnz + 1;
95 nsupc = krep - fst_col + 1;
97 nrow = nsupr - d_fsupc - nsupc;
103 no_zeros = kfnz - fst_col;
112 nextlu = glu.
xlusup(jcol);
113 fsupc = glu.
xsup(jsupno);
117 new_next = nextlu + glu.
xlsub(fsupc + 1) - glu.
xlsub(fsupc);
121 while (new_next > glu.
nzlumax )
127 for (isub = glu.
xlsub(fsupc); isub < glu.
xlsub(fsupc+1); isub++)
129 irow = glu.
lsub(isub);
130 glu.
lusup(nextlu) = dense(irow);
131 dense(irow) = Scalar(0.0);
137 glu.
lusup.segment(nextlu,offset).setZero();
140 glu.
xlusup(jcol + 1) = nextlu;
148 fst_col = (std::max)(fsupc, fpanelc);
154 d_fsupc = fst_col - fsupc;
156 lptr = glu.
xlsub(fsupc) + d_fsupc;
157 luptr = glu.
xlusup(fst_col) + d_fsupc;
158 nsupr = glu.
xlsub(fsupc+1) - glu.
xlsub(fsupc);
159 nsupc = jcol - fst_col;
160 nrow = nsupr - d_fsupc - nsupc;
163 ufirst = glu.
xlusup(jcol) + d_fsupc;
167 u =
A.template triangularView<UnitLower>().solve(u);
171 l.noalias() -=
A * u;
180 #endif // SPARSELU_COLUMN_BMOD_H Index column_bmod(const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector &tempv, BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t &glu)
Performs numeric block updates (sup-col) in topological order.
A matrix or vector expression mapping an existing array of data.
iterative scaling algorithm to equilibrate rows and column norms in matrices
Expression of a fixed-size or dynamic-size sub-vector.
static EIGEN_DONT_INLINE void run(const int segsize, BlockScalarVector &dense, ScalarVector &tempv, ScalarVector &lusup, Index &luptr, const Index lda, const Index nrow, IndexVector &lsub, const Index lptr, const Index no_zeros)
A matrix or vector expression mapping an existing expressions.
Convenience specialization of Stride to specify only an outer stride See class Map for some examples...