Changeset 10121
- Timestamp:
- Nov 21, 2006, 8:29:07 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psSparse.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psSparse.c
r10017 r10121 141 141 } 142 142 143 // solve Ax = B 143 144 psVector *psSparseSolve(psVector *output, psSparseConstraint constraint, const psSparse *sparse, int Niter) 144 145 { … … 151 152 psVector *Bfj = sparse->Bfj; 152 153 154 // initial guess is B / Qii 153 155 output = psVectorCopy(output, Bfj, PS_DATA_F32); 156 for (int i = 0; i < output->n; i++) { 157 output->data.F32[i] /= Qii->data.F32[i]; 158 } 154 159 155 160 // temporary storage for intermediate results … … 429 434 430 435 // solve Sx = f 431 xVec = psSparseSolve(xVec, constraint, border->sparse, 4);436 xVec = psSparseSolve(xVec, constraint, border->sparse, Niter); 432 437 433 438 dG = psSparseBorderLowerProduct (dG, border, xVec);
Note:
See TracChangeset
for help on using the changeset viewer.
