264 Real* vec2,
int* ridx2,
int& rn2,
Real eps2);
267 Real* vec2,
int* ridx2,
int& rn2,
Real eps2,
268 Real* vec3,
int* ridx3,
int& rn3,
Real eps3);
275 Real* vec2,
Real* rhs2,
int* ridx2,
int rn2,
Real eps2);
309 void setPivot(
const int p_stage,
const int p_col,
const int p_row,
const Real val);
363 Real* forest,
int* forestNum,
int* forestIdx);
368 Real* rhs2,
int* nonz,
Real eps,
Real* forest,
int* forestNum,
int* forestIdx);
381 Real* rhs,
int* ridx,
int rn,
382 Real* forest,
int* forestNum,
int* forestIdx);
386 Real* rhs,
int* ridx,
int rn,
388 Real* rhs2,
int* ridx2,
int rn2,
389 Real* forest,
int* forestNum,
int* forestIdx);
393 Real* rhs,
int* ridx,
int& rn,
395 Real* rhs2,
int* ridx2,
int& rn2,
396 Real* forest,
int* forestNum,
int* forestIdx);
400 Real* rhs,
int* ridx,
int rn,
402 Real* rhs2,
int* ridx2,
int rn2,
404 Real* rhs3,
int* ridx3,
int rn3,
405 Real* forest,
int* forestNum,
int* forestIdx);
409 Real* rhs,
int* ridx,
int& rn,
411 Real* rhs2,
int* ridx2,
int& rn2,
413 Real* rhs3,
int* ridx3,
int& rn3,
414 Real* forest,
int* forestNum,
int* forestIdx);
417 Real* rhs,
int* ridx,
int rn);
421 Real* rhs,
int* ridx,
int rn);
425 Real* rhs,
int* ridx,
int rn);
429 Real* rhs,
int* ridx,
int rn,
431 Real* rhs2,
int* ridx2,
int rn2);
435 Real* rhs,
int* ridx,
int& rn,
436 Real* vec2,
int* idx2,
437 Real* rhs2,
int* ridx2,
int& rn2);
441 Real* rhs,
int* ridx,
int rn,
443 Real* rhs2,
int* ridx2,
int rn2,
445 Real* rhs3,
int* ridx3,
int rn3);
449 Real* rhs,
int* ridx,
int& rn,
450 Real* vec2,
int* idx2,
451 Real* rhs2,
int* ridx2,
int& rn2,
452 Real* vec3,
int* idx3,
453 Real* rhs3,
int* ridx3,
int& rn3);
457 void update(
int p_col,
Real* p_work,
const int* p_idx,
int num);
478 #endif // _CLUFACTOR_H_ void solveUleft(Real *work, Real *vec)
int * len
used nonzeros per row vectors
void solveLleft(Real *vec) const
int updateType
type of updates to be used.
void solveUpdateRight2(Real *vec1, Real *vec2)
void updateNoClear(int p_col, const Real *p_work, const int *p_idx, int num)
int solveUright2eps(Real *work1, Real *vec1, Real *work2, Real *vec2, int *nonz, Real eps)
void vSolveLright3(Real *vec, int *ridx, int &rn, Real eps, Real *vec2, int *ridx2, int &rn2, Real eps2, Real *vec3, int *ridx3, int &rn3, Real eps3)
int solveRight2update(Real *vec1, Real *vec2, Real *rhs1, Real *rhs2, int *nonz, Real eps, Real *forest, int *forestNum, int *forestIdx)
Dring list
Double linked ringlist of vector 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]...
int vSolveRight4update(Real eps, Real *vec, int *idx, Real *rhs, int *ridx, int rn, Real *forest, int *forestNum, int *forestIdx)
void forestMinColMem(int size)
void vSolveRight4update3sparse(Real eps, Real *vec, int *idx, Real *rhs, int *ridx, int &rn, Real eps2, Real *vec2, int *idx2, Real *rhs2, int *ridx2, int &rn2, Real eps3, Real *vec3, int *idx3, Real *rhs3, int *ridx3, int &rn3, Real *forest, int *forestNum, int *forestIdx)
sparse version of above method
Pring * pivot_rowNZ
lists for rows to number of nonzeros
int * start
starting positions in val and idx
int solveLleftForest(Real *vec, int *, Real)
Real * rval
values of rows of L
void solveUleftNoNZ(Real eps, Real *vec, Real *rhs, int *rhsidx, int rhsn)
Real maxabs
maximum abs number in L and U
int vSolveRight4update3(Real eps, Real *vec, int *idx, Real *rhs, int *ridx, int rn, Real *vec2, Real eps2, Real *rhs2, int *ridx2, int rn2, Real *vec3, Real eps3, Real *rhs3, int *ridx3, int rn3, Real *forest, int *forestNum, int *forestIdx)
Data structures for saving the row and column permutations.
void vSolveLeft3sparse(Real eps, Real *vec, int *idx, Real *rhs, int *ridx, int &rn, Real *vec2, int *idx2, Real *rhs2, int *ridx2, int &rn2, Real *vec3, int *idx3, Real *rhs3, int *ridx3, int &rn3)
sparse version of solving 3 systems of equations
Real * s_max
maximum absolute value per row (or -1)
int size
size of array idx
int * rorig
original row permutation
void update(int p_col, Real *p_work, const int *p_idx, int num)
void solveUright(Real *wrk, Real *vec) const
Dring * elem
Array of ring elements.
void solveLeft(Real *vec, Real *rhs)
Real initMaxabs
maximum abs number in initail Matrix
Sparse Linear Solver virtual base class.
int mkwtz
markowitz number of pivot
Pring * pivot_col
column index handlers for Real linked list
int vSolveLeft2(Real eps, Real *vec, int *idx, Real *rhs, int *ridx, int rn, Real *vec2, Real *rhs2, int *ridx2, int rn2)
Real * diag
Array of pivot elements.
Perm row
row permutation matrices
Dring * elem
Array of ring elements.
Perm col
column permutation matrices
void solveUpdateRight(Real *vec)
Data structures for saving the working matrix and L factor.
int * orig
orig[p] original index from p
int solveRight4update(Real *vec, int *nonz, Real eps, Real *rhs, Real *forest, int *forestNum, int *forestIdx)
void vSolveLright(Real *vec, int *ridx, int &rn, Real eps)
Real lMemMult
factor of minimum Memory * number of nonzeros
void eliminateRowSingletons()
Real * work
Working array: must always be left as 0!
void forestUpdate(int col, Real *work, int num, int *nonz)
Performs the Forrest-Tomlin update of the LU factorization.
void solveLleftForestNoNZ(Real *vec)
int * len
used nonzeros per column vector
void solveUpdateLeft2(Real *vec1, Real *vec2)
int solveLleftEps(Real *vec, int *nonz, Real eps)
int size
size of arrays val and idx
void solveUright2(Real *work1, Real *vec1, Real *work2, Real *vec2)
SLinSolver::Status stat
Status indicator.
Pring * pivot_row
row index handlers for Real linked list
int used
used entries of arrays idx and val
void solveLright(Real *vec)
void vSolveUpdateRightNoNZ(Real *vec, Real)
int startSize
size of array start
void vSolveLright2(Real *vec, int *ridx, int &rn, Real eps, Real *vec2, int *ridx2, int &rn2, Real eps2)
Pring * pivot_colNZ
lists for columns to number of nonzeros
int factorCount
Number of factorizations.
Real * val
hold nonzero values: this is only initialized in the end of the factorization with DEFAULT updates...
int stage
stage of the structure
int pos
position of pivot column in row
int firstUnused
number of first unused L vector
Temp temp
Temporary storage.
void setPivot(const int p_stage, const int p_col, const int p_row, const Real val)
void solveUpdateLeft(Real *vec)
void eliminateNucleus(const Real eps, const Real threshold)
void vSolveRight4update2sparse(Real eps, Real *vec, int *idx, Real *rhs, int *ridx, int &rn, Real eps2, Real *vec2, int *idx2, Real *rhs2, int *ridx2, int &rn2, Real *forest, int *forestNum, int *forestIdx)
sparse version of above method
int thedim
dimension of factorized matrix
int * start
starting positions in val and idx
Debugging, floating point type and parameter definitions.
int size
size of arrays val and idx
int * idx
indices of L vectors
void factor(const SVector **vec, Real threshold, Real eps)
epsilon for zero detection
int * perm
perm[i] permuted index from i
bool isConsistent() const
void eliminateColSingletons()
Implementation of sparse LU factorization.This class implements a sparse LU factorization with either...
void solveUleft2(Real *work1, Real *vec1, Real *work2, Real *vec2)
Everything should be within this namespace.
void vSolveRightNoNZ(Real *vec, Real eps, Real *rhs, int *ridx, int rn)
void remaxRow(int p_row, int len)
int vSolveLeft(Real eps, Real *vec, int *idx, Real *rhs, int *ridx, int rn)
int solveLleft2forest(Real *vec1, int *, Real *vec2, Real)
void vSolveLeftNoNZ(Real eps, Real *vec, Real *rhs, int *ridx, int rn)
int firstUpdate
number of first update L vector
Pring pivots
ring of selected pivot rows
int vSolveLeft3(Real eps, Real *vec, int *idx, Real *rhs, int *ridx, int rn, Real *vec2, Real *rhs2, int *ridx2, int rn2, Real *vec3, Real *rhs3, int *ridx3, int rn3)
Real rowMemMult
factor of minimum Memory * number of nonzeros
void solveLright2(Real *vec1, Real *vec2)
Dring list
Double linked ringlist of vector indices in the order they appear in the row file.
int vSolveRight4update2(Real eps, Real *vec, int *idx, Real *rhs, int *ridx, int rn, Real *vec2, Real eps2, Real *rhs2, int *ridx2, int rn2, Real *forest, int *forestNum, int *forestIdx)
Timer * factorTime
Time spent in factorizations.
int solveLeft2(Real *vec1, int *nonz, Real *vec2, Real eps, Real *rhs1, Real *rhs2)
int solveLeftEps(Real *vec, Real *rhs, int *nonz, Real eps)
void vSolveUrightNoNZ(Real *vec, Real *rhs, int *ridx, int rn, Real eps)
void forestReMaxCol(int col, int len)
int * idx
hold row indices of nonzeros
int idx
index of pivot row
void eliminatePivot(int prow, int pos, Real eps)
void remaxCol(int p_col, int len)
int * ridx
indices of rows of L
int vSolveUright2(Real *vec, int *vidx, Real *rhs, int *ridx, int rn, Real eps, Real *vec2, Real *rhs2, int *ridx2, int rn2, Real eps2)
Real colMemMult
factor of minimum Memory * number of nonzeros
int updateRow(int r, int lv, int prow, int pcol, Real pval, Real eps)
int vSolveUpdateRight(Real *vec, int *ridx, int n, Real eps)
int * max
maximum available nonzeros per colunn: start[i] + max[i] == start[elem[i].next->idx] len[i] <= max[i]...
int makeLvec(int p_len, int p_row)
void updateSolutionVectorLright(Real change, int j, Real &vec, int *idx, int &nnz)
int * row
column indices of L vectors
void vSolveLeft2sparse(Real eps, Real *vec, int *idx, Real *rhs, int *ridx, int &rn, Real *vec2, int *idx2, Real *rhs2, int *ridx2, int &rn2)
sparse version of solving 2 systems of equations
int * rbeg
start of rows in rval and ridx
int * s_cact
lengths of columns of active submatrix
void solveRight(Real *vec, Real *rhs)
void initFactorMatrix(const SVector **vec, const Real eps)
void solveLleft2(Real *vec1, int *, Real *vec2, Real)
int nzCnt
number of nonzeros in U
void selectPivots(Real threshold)
Real * val
hold nonzero values
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 solveRight2(Real *vec1, Real *vec2, Real *rhs1, Real *rhs2)
Status
status flags of the SLinSolver class.
int vSolveUright(Real *vec, int *vidx, Real *rhs, int *ridx, int rn, Real eps)
Temporary data structures.
Data structures for saving the working matrix and U factor.
Wrapper for the system time query methods.
int solveUrightEps(Real *vec, int *nonz, Real eps, Real *rhs)
Real * val
values of L vectors
void solveLleftNoNZ(Real *vec)