Changeset 14865


Ignore:
Timestamp:
05/02/13 21:41:14 (12 years ago)
Author:
Eric.Larour
Message:

CHG: minor, cosmetic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/toolkits/issm/IssmDenseMat.h

    r14859 r14865  
    255255
    256256                        /*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;
    258259
    259260                        #ifdef _HAVE_GSL_
     261                                /*Assume we are getting an IssmSeqVecVec in input, downcast: */
     262                                pf=(IssmSeqVec<IssmDouble>*)pfin;
     263
    260264                                /*Intermediary: */
    261265                                int N2;
    262                                 IssmSeqVec<IssmDouble> *uf = NULL;
    263266
    264267                                pf->GetSize(&N2);
     
    266269                                if(N!=N2)_error_("Right hand side vector of size " << N2 << ", when matrix is of size " << M << "-" << N << " !");
    267270                                if(M!=N)_error_("Stiffness matrix should be square!");
     271                               
    268272                                #ifdef _HAVE_ADOLC_
    269273                                        ensureContiguousLocations(N);
    270274                                #endif
    271275                                IssmDouble *x  = xNew<IssmDouble>(N);
     276
    272277                                #ifdef _HAVE_ADOLC_
    273278                                        SolverxSeq(x,Kff->matrix,pf->vector,N,parameters);
    274                                 #els
     279                                #else
    275280                                        SolverxSeq(x,Kff->matrix,pf->vector,N);
    276281                                #endif
    277282
    278283                                uf=new IssmSeqVec<IssmDouble>(x,N);
     284
    279285                                xDelete(x);
    280286
    281287                                /*return: */
    282288                                return uf;
    283 
    284289                        #else
    285290                                _error_("GSL support not compiled in!");
Note: See TracChangeset for help on using the changeset viewer.