Changeset 14865
- Timestamp:
- 05/02/13 21:41:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/toolkits/issm/IssmDenseMat.h
r14859 r14865 255 255 256 256 /*First off, we assume that the type of IssmAbsVec is IssmSeqVec. So downcast: */ 257 IssmSeqVec<IssmDouble>* pf=(IssmSeqVec<IssmDouble>*)pfin; 257 IssmSeqVec<IssmDouble>* pf = NULL; 258 IssmSeqVec<IssmDouble> *uf = NULL; 258 259 259 260 #ifdef _HAVE_GSL_ 261 /*Assume we are getting an IssmSeqVecVec in input, downcast: */ 262 pf=(IssmSeqVec<IssmDouble>*)pfin; 263 260 264 /*Intermediary: */ 261 265 int N2; 262 IssmSeqVec<IssmDouble> *uf = NULL;263 266 264 267 pf->GetSize(&N2); … … 266 269 if(N!=N2)_error_("Right hand side vector of size " << N2 << ", when matrix is of size " << M << "-" << N << " !"); 267 270 if(M!=N)_error_("Stiffness matrix should be square!"); 271 268 272 #ifdef _HAVE_ADOLC_ 269 273 ensureContiguousLocations(N); 270 274 #endif 271 275 IssmDouble *x = xNew<IssmDouble>(N); 276 272 277 #ifdef _HAVE_ADOLC_ 273 278 SolverxSeq(x,Kff->matrix,pf->vector,N,parameters); 274 #els 279 #else 275 280 SolverxSeq(x,Kff->matrix,pf->vector,N); 276 281 #endif 277 282 278 283 uf=new IssmSeqVec<IssmDouble>(x,N); 284 279 285 xDelete(x); 280 286 281 287 /*return: */ 282 288 return uf; 283 284 289 #else 285 290 _error_("GSL support not compiled in!");
Note:
See TracChangeset
for help on using the changeset viewer.