Changeset 13515
- Timestamp:
- 10/03/12 07:50:46 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/Solverx/SolverxSeq.cpp
r13514 r13515 169 169 // the last m elements of dp_Z representing the adjoint of the right-hand side we want to compute: 170 170 gsl_vector_view b_bar=gsl_vector_view_array(dp_Z+m*m,m); 171 gsl_permutation *p = gsl_permutation_alloc (m);171 gsl_permutation *perm_p = gsl_permutation_alloc (m); 172 172 int permSign; 173 gsl_linalg_LU_decomp (&aTransposed.matrix, p , &permSign);174 gsl_linalg_LU_solve (&aTransposed.matrix, p , &x_bar.vector, &b_bar.vector);173 gsl_linalg_LU_decomp (&aTransposed.matrix, perm_p, &permSign); 174 gsl_linalg_LU_solve (&aTransposed.matrix, perm_p, &x_bar.vector, &b_bar.vector); 175 175 // now do the adjoint of the matrix 176 176 for (int i=0; i<m; ++i) for (int j=0; j<m; ++j) dp_Z[i*m+j]-=dp_Z[m*m+i]*dp_y[j]; 177 gsl_permutation_free(p );177 gsl_permutation_free(perm_p); 178 178 xDelete(transposed); 179 179 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.