31#ifndef SPARSELU_COLUMN_BMOD_H
32#define SPARSELU_COLUMN_BMOD_H
52template <
typename Scalar,
typename StorageIndex>
56 Index jsupno, k, ksub, krep, ksupno;
57 Index lptr, nrow, isub, irow, nextlu, new_next, ufirst;
58 Index fsupc, nsupc, nsupr, luptr, kfnz, no_zeros;
68 jsupno = glu.
supno(jcol);
75 for (ksub = 0; ksub < nseg; ksub++)
77 krep = segrep(k); k--;
78 ksupno = glu.
supno(krep);
79 if (jsupno != ksupno )
82 fsupc = glu.
xsup(ksupno);
83 fst_col = (
std::max)(fsupc, fpanelc);
87 d_fsupc = fst_col - fsupc;
89 luptr = glu.
xlusup(fst_col) + d_fsupc;
90 lptr = glu.
xlsub(fsupc) + d_fsupc;
95 segsize = krep - kfnz + 1;
96 nsupc = krep - fst_col + 1;
98 nrow = nsupr - d_fsupc - nsupc;
104 no_zeros = kfnz - fst_col;
113 nextlu = glu.
xlusup(jcol);
114 fsupc = glu.
xsup(jsupno);
118 new_next = nextlu + glu.
xlsub(fsupc + 1) - glu.
xlsub(fsupc);
122 while (new_next > glu.
nzlumax )
128 for (isub = glu.
xlsub(fsupc); isub < glu.
xlsub(fsupc+1); isub++)
130 irow = glu.
lsub(isub);
131 glu.
lusup(nextlu) = dense(irow);
132 dense(irow) = Scalar(0.0);
138 glu.
lusup.segment(nextlu,offset).setZero();
141 glu.
xlusup(jcol + 1) = StorageIndex(nextlu);
149 fst_col = (
std::max)(fsupc, fpanelc);
155 d_fsupc = fst_col - fsupc;
157 lptr = glu.
xlsub(fsupc) + d_fsupc;
158 luptr = glu.
xlusup(fst_col) + d_fsupc;
159 nsupr = glu.
xlsub(fsupc+1) - glu.
xlsub(fsupc);
160 nsupc = jcol - fst_col;
161 nrow = nsupr - d_fsupc - nsupc;
164 ufirst = glu.
xlusup(jcol) + d_fsupc;
168 u = A.template triangularView<UnitLower>().solve(u);
172 l.noalias() -= A * u;
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:96
Convenience specialization of Stride to specify only an outer stride See class Map for some examples.
Definition: Stride.h:107
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:283
Expression of a fixed-size or dynamic-size sub-vector.
Definition: VectorBlock.h:60
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.
Definition: SparseLU_column_bmod.h:53
constexpr common_t< T1, T2 > max(const T1 x, const T2 y) noexcept
Compile-time pairwise maximum function.
Definition: max.hpp:35
@ LUSUP
Definition: SparseLU_Structs.h:74
Namespace containing all symbols from the Eigen library.
Definition: Core:141
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Definition: Eigen_Colamd.h:50
Definition: SparseLU_Structs.h:77
IndexVector xsup
Definition: SparseLU_Structs.h:79
Index num_expansions
Definition: SparseLU_Structs.h:92
IndexVector xlusup
Definition: SparseLU_Structs.h:83
IndexVector supno
Definition: SparseLU_Structs.h:80
IndexVector lsub
Definition: SparseLU_Structs.h:82
Index nzlumax
Definition: SparseLU_Structs.h:86
IndexVector xlsub
Definition: SparseLU_Structs.h:84
ScalarVector lusup
Definition: SparseLU_Structs.h:81
static EIGEN_DONT_INLINE void run(const Index segsize, BlockScalarVector &dense, ScalarVector &tempv, ScalarVector &lusup, Index &luptr, const Index lda, const Index nrow, IndexVector &lsub, const Index lptr, const Index no_zeros)
Definition: SparseLU_kernel_bmod.h:39
Definition: GenericPacketMath.h:107