101 void init(
int p_dim);
235 void solveUright2(R* work1, R* vec1, R* work2, R* vec2);
237 int solveUright2eps(R* work1, R* vec1, R* work2, R* vec2,
int* nonz, R eps);
247 void solveUleft2(R* work1, R* vec1, R* work2, R* vec2);
268 R* vec2,
int* ridx2,
int& rn2, R eps2);
271 R* vec2,
int* ridx2,
int& rn2, R eps2,
272 R* vec3,
int* ridx3,
int& rn3, R eps3);
274 int vSolveUright(R* vec,
int* vidx, R* rhs,
int* ridx,
int rn, R eps);
278 int vSolveUright2(R* vec,
int* vidx, R* rhs,
int* ridx,
int rn, R eps,
279 R* vec2, R* rhs2,
int* ridx2,
int rn2, R eps2);
285 int solveUleft(R eps, R* vec,
int* vecidx, R* rhs,
int* rhsidx,
int rhsn);
287 void solveUleftNoNZ(R eps, R* vec, R* rhs,
int* rhsidx,
int rhsn);
293 int solveLleft(R eps, R* vec,
int* nonz,
int rn);
313 void setPivot(
const int p_stage,
const int p_col,
const int p_row,
const R val);
336 int updateRow(
int r,
int lv,
int prow,
int pcol, R pval, R eps);
367 R* forest,
int* forestNum,
int* forestIdx);
372 R* rhs2,
int* nonz, R eps, R* forest,
int* forestNum,
int* forestIdx);
374 void solveRight2(R* vec1, R* vec2, R* rhs1, R* rhs2);
380 int solveLeft2(R* vec1,
int* nonz, R* vec2, R eps, R* rhs1, R* rhs2);
385 R* rhs,
int* ridx,
int rn,
386 R* forest,
int* forestNum,
int* forestIdx);
390 R* rhs,
int* ridx,
int rn,
392 R* rhs2,
int* ridx2,
int rn2,
393 R* forest,
int* forestNum,
int* forestIdx);
396 R eps, R* vec,
int*
idx,
397 R* rhs,
int* ridx,
int& rn,
398 R eps2, R* vec2,
int* idx2,
399 R* rhs2,
int* ridx2,
int& rn2,
400 R* forest,
int* forestNum,
int* forestIdx);
404 R* rhs,
int* ridx,
int rn,
406 R* rhs2,
int* ridx2,
int rn2,
408 R* rhs3,
int* ridx3,
int rn3,
409 R* forest,
int* forestNum,
int* forestIdx);
412 R eps, R* vec,
int*
idx,
413 R* rhs,
int* ridx,
int& rn,
414 R eps2, R* vec2,
int* idx2,
415 R* rhs2,
int* ridx2,
int& rn2,
416 R eps3, R* vec3,
int* idx3,
417 R* rhs3,
int* ridx3,
int& rn3,
418 R* forest,
int* forestNum,
int* forestIdx);
421 R* rhs,
int* ridx,
int rn);
425 R* rhs,
int* ridx,
int rn);
429 R* rhs,
int* ridx,
int rn);
433 R* rhs,
int* ridx,
int rn,
435 R* rhs2,
int* ridx2,
int rn2);
439 R* rhs,
int* ridx,
int& rn,
441 R* rhs2,
int* ridx2,
int& rn2);
445 R* rhs,
int* ridx,
int rn,
447 R* rhs2,
int* ridx2,
int rn2,
449 R* rhs3,
int* ridx3,
int rn3);
453 R* rhs,
int* ridx,
int& rn,
455 R* rhs2,
int* ridx2,
int& rn2,
457 R* rhs3,
int* ridx3,
int& rn3);
459 void forestUpdate(
int col, R* work,
int num,
int* nonz);
461 void update(
int p_col, R* p_work,
const int* p_idx,
int num);
462 void updateNoClear(
int p_col,
const R* p_work,
const int* p_idx,
int num);
484 #include "clufactor.hpp" 486 #endif // _CLUFACTOR_H_ void solveLleft2(R *vec1, int *, R *vec2, R)
int vSolveLeft3(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn, R *vec2, R *rhs2, int *ridx2, int rn2, R *vec3, R *rhs3, int *ridx3, int rn3)
int * len
used nonzeros per row vectors
int updateType
type of updates to be used.
void eliminateNucleus(const R eps, const R threshold)
void vSolveUpdateRightNoNZ(R *vec, R)
int vSolveLeft2(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn, R *vec2, R *rhs2, int *ridx2, int rn2)
Dring list
Double linked ringlist of VectorBase<R> indices in the order they appear in the column file...
int * max
maximum available nonzeros per row: start[i] + max[i] == start[elem[i].next->idx] len[i] <= max[i]...
void solveUleft(R *work, R *vec)
std::vector< R > val
hold nonzero values: this is only initialized in the end of the factorization with DEFAULT updates...
void forestMinColMem(int size)
void solveLleftNoNZ(R *vec)
Pring * pivot_rowNZ
lists for rows to number of nonzeros
int solveLleftEps(R *vec, int *nonz, R eps)
int * start
starting positions in val and idx
int solveRight2update(R *vec1, R *vec2, R *rhs1, R *rhs2, int *nonz, R eps, R *forest, int *forestNum, int *forestIdx)
int solveUright2eps(R *work1, R *vec1, R *work2, R *vec2, int *nonz, R eps)
Data structures for saving the row and column permutations.
void solveUright(R *wrk, R *vec) const
void updateSolutionVectorLright(R change, int j, R &vec, int *idx, int &nnz)
R lMemMult
factor of minimum Memory * number of nonzeros
void vSolveLeft3sparse(R eps, R *vec, int *idx, R *rhs, int *ridx, int &rn, R *vec2, int *idx2, R *rhs2, int *ridx2, int &rn2, R *vec3, int *idx3, R *rhs3, int *ridx3, int &rn3)
sparse version of solving 3 systems of equations
void vSolveLeft2sparse(R eps, R *vec, int *idx, R *rhs, int *ridx, int &rn, R *vec2, int *idx2, R *rhs2, int *ridx2, int &rn2)
sparse version of solving 2 systems of equations
void setPivot(const int p_stage, const int p_col, const int p_row, const R val)
int size
size of array idx
void update(int p_col, R *p_work, const int *p_idx, int num)
int vSolveUpdateRight(R *vec, int *ridx, int n, R eps)
int * rorig
original row permutation
Dring * elem
Array of ring elements.
int hugeValues
number of times huge values occurred during solve (only used in debug mode)
void updateNoClear(int p_col, const R *p_work, const int *p_idx, int num)
Sparse Linear Solver virtual base class.
void eliminatePivot(int prow, int pos, R eps)
int mkwtz
markowitz number of pivot
Pring * pivot_col
column index handlers for R linked list
Perm row
row permutation matrices
Dring * elem
Array of ring elements.
Perm col
column permutation matrices
void initFactorMatrix(const SVectorBase< R > **vec, const R eps)
Data structures for saving the working matrix and L factor.
int * orig
orig[p] original index from p
void vSolveUrightNoNZ(R *vec, R *rhs, int *ridx, int rn, R eps)
void eliminateRowSingletons()
int * len
used nonzeros per column vector
int updateRow(int r, int lv, int prow, int pcol, R pval, R eps)
R * work
Working array: must always be left as 0!
int size
size of arrays val and idx
void vSolveLright3(R *vec, int *ridx, int &rn, R eps, R *vec2, int *ridx2, int &rn2, R eps2, R *vec3, int *ridx3, int &rn3, R eps3)
void solveRight2(R *vec1, R *vec2, R *rhs1, R *rhs2)
Pring * pivot_row
row index handlers for R linked list
void solveLright2(R *vec1, R *vec2)
int used
used entries of arrays idx and val
int startSize
size of array start
int vSolveRight4update2(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn, R *vec2, R eps2, R *rhs2, int *ridx2, int rn2, R *forest, int *forestNum, int *forestIdx)
int solveLleftForest(R *vec, int *, R)
Pring * pivot_colNZ
lists for columns to number of nonzeros
int factorCount
Number of factorizations.
int stage
stage of the structure
int vSolveLeft(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn)
int pos
position of pivot column in row
void solveLleftForestNoNZ(R *vec)
void vSolveLright2(R *vec, int *ridx, int &rn, R eps, R *vec2, int *ridx2, int &rn2, R eps2)
void vSolveRightNoNZ(R *vec, R eps, R *rhs, int *ridx, int rn)
int firstUnused
number of first unused L vector
Temp temp
Temporary storage.
int solveLleft2forest(R *vec1, int *, R *vec2, R)
void solveUright2(R *work1, R *vec1, R *work2, R *vec2)
R maxabs
maximum abs number in L and U
void solveUpdateLeft2(R *vec1, R *vec2)
void solveLeft(R *vec, R *rhs)
int thedim
dimension of factorized matrix
std::vector< R > val
hold nonzero values
std::vector< R > val
values of L vectors
int * start
starting positions in val and idx
Debugging, floating point type and parameter definitions.
int vSolveUright2(R *vec, int *vidx, R *rhs, int *ridx, int rn, R eps, R *vec2, R *rhs2, int *ridx2, int rn2, R eps2)
int size
size of arrays val and idx
void forestUpdate(int col, R *work, int num, int *nonz)
int * idx
indices of L vectors
void vSolveRight4update2sparse(R eps, R *vec, int *idx, R *rhs, int *ridx, int &rn, R eps2, R *vec2, int *idx2, R *rhs2, int *ridx2, int &rn2, R *forest, int *forestNum, int *forestIdx)
sparse version of above method
int * perm
perm[i] permuted index from i
bool isConsistent() const
void eliminateColSingletons()
void solveUleft2(R *work1, R *vec1, R *work2, R *vec2)
Implementation of sparse LU factorization.This class implements a sparse LU factorization with either...
Everything should be within this namespace.
int solveLeft2(R *vec1, int *nonz, R *vec2, R eps, R *rhs1, R *rhs2)
void factor(const SVectorBase< R > **vec, R threshold, R eps)
epsilon for zero detection
void remaxRow(int p_row, int len)
R rowMemMult
factor of minimum Memory * number of nonzeros
int firstUpdate
number of first update L vector
Pring pivots
ring of selected pivot rows
int vSolveRight4update3(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn, R *vec2, R eps2, R *rhs2, int *ridx2, int rn2, R *vec3, R eps3, R *rhs3, int *ridx3, int rn3, R *forest, int *forestNum, int *forestIdx)
std::vector< R > rval
values of rows of L
void vSolveLeftNoNZ(R eps, R *vec, R *rhs, int *ridx, int rn)
Dring list
Double linked ringlist of VectorBase<R> indices in the order they appear in the row file...
Timer * factorTime
Time spent in factorizations.
int solveLeftEps(R *vec, R *rhs, int *nonz, R eps)
void forestReMaxCol(int col, int len)
int vSolveUright(R *vec, int *vidx, R *rhs, int *ridx, int rn, R eps)
int * idx
hold row indices of nonzeros
int idx
index of pivot row
void solveUpdateRight2(R *vec1, R *vec2)
void remaxCol(int p_col, int len)
int * ridx
indices of rows of L
int solveRight4update(R *vec, int *nonz, R eps, R *rhs, R *forest, int *forestNum, int *forestIdx)
int * max
maximum available nonzeros per colunn: start[i] + max[i] == start[elem[i].next->idx] len[i] <= max[i]...
void solveUleftNoNZ(R eps, R *vec, R *rhs, int *rhsidx, int rhsn)
int makeLvec(int p_len, int p_row)
int vSolveRight4update(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn, R *forest, int *forestNum, int *forestIdx)
int * row
column indices of L vectors
int * rbeg
start of rows in rval and ridx
int * s_cact
lengths of columns of active submatrix
void solveUpdateLeft(R *vec)
Sparse vectors.Class SVectorBase provides packed sparse vectors. Such are a sparse vectors...
int nzCnt
number of nonzeros in U
int * rperm
original row permutation
int * start
starting positions in val and idx
int * idx
hold column indices of nonzeros
int used
used entries of array idx
void selectPivots(R threshold)
std::vector< R > diag
Array of pivot elements.
Status
status flags of the SLinSolver class.
int solveUrightEps(R *vec, int *nonz, R eps, R *rhs)
Temporary data structures.
R colMemMult
factor of minimum Memory * number of nonzeros
void solveLleft(R *vec) const
Data structures for saving the working matrix and U factor.
SLinSolver< R >::Status stat
Status indicator.
void solveRight(R *vec, R *rhs)
void vSolveRight4update3sparse(R eps, R *vec, int *idx, R *rhs, int *ridx, int &rn, R eps2, R *vec2, int *idx2, R *rhs2, int *ridx2, int &rn2, R eps3, R *vec3, int *idx3, R *rhs3, int *ridx3, int &rn3, R *forest, int *forestNum, int *forestIdx)
sparse version of above method
void vSolveLright(R *vec, int *ridx, int &rn, R eps)
Wrapper for the system time query methods.
void solveUpdateRight(R *vec)
R initMaxabs
maximum abs number in initail Matrix
std::vector< R > s_max
maximum absolute value per row (or -1)