Changeset 14887


Ignore:
Timestamp:
05/04/13 12:39:45 (12 years ago)
Author:
Eric.Larour
Message:

CHG: missing case of ISSMPDouble

Location:
issm/trunk-jpl/src/c/toolkits/gsl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp

    r14877 r14887  
    2323class Parameters;
    2424
    25 void DenseGslSolve(/*output*/ IssmDouble** px,/*stiffness matrix:*/ IssmDouble* Kff, int Kff_M, int Kff_N, /*right hand side load vector: */ IssmDouble* pf, int pf_M, Parameters* parameters){
     25void DenseGslSolve(/*output*/ IssmPDouble** px,/*stiffness matrix:*/ IssmPDouble* Kff, int Kff_M, int Kff_N, /*right hand side load vector: */ IssmPDouble* pf, int pf_M, Parameters* parameters){ /*{{{*/
    2626
    2727        /*Intermediary: */
     
    3030        if(Kff_M!=Kff_N)_error_("Stiffness matrix should be square!");
    3131
    32         #ifdef _HAVE_ADOLC_
    33         ensureContiguousLocations(Kff_N);
    34         #endif
    35         IssmDouble *x  = xNew<IssmDouble>(Kff_N);
    36 
    37         #ifdef _HAVE_ADOLC_
    38         SolverxSeq(x,Kff,pf,Kff_N,parameters);
    39         #else
     32        IssmPDouble *x  = xNew<IssmPDouble>(Kff_N);
    4033        SolverxSeq(x,Kff,pf,Kff_N);
    41         #endif
    4234
    4335        /*allocate output pointers: */
    4436        *px=x;
    45 }
    46 
    47 void SolverxSeq(IssmPDouble **pX, IssmPDouble *A, IssmPDouble *B,int n){ /*{{{*/
    48 
    49         /*Allocate output*/
    50         double* X = xNew<double>(n);
    51 
    52         /*Solve*/
    53         SolverxSeq(X,A,B,n);
    54 
    55         /*Assign output pointer*/
    56         *pX=X;
    5737}
    5838/*}}}*/
     
    220200}
    221201/*}}}*/
     202void DenseGslSolve(/*output*/ IssmDouble** px,/*stiffness matrix:*/ IssmDouble* Kff, int Kff_M, int Kff_N, /*right hand side load vector: */ IssmDouble* pf, int pf_M, Parameters* parameters){ /*{{{*/
     203
     204        /*Intermediary: */
     205
     206        if(Kff_N!=pf_M)_error_("Right hand side vector of size " << pf_M << ", when matrix is of size " << Kff_M << "-" << Kff_N << " !");
     207        if(Kff_M!=Kff_N)_error_("Stiffness matrix should be square!");
     208
     209        ensureContiguousLocations(Kff_N);
     210        IssmDouble *x  = xNew<IssmDouble>(Kff_N);
     211
     212        SolverxSeq(x,Kff,pf,Kff_N,parameters);
     213
     214        /*allocate output pointers: */
     215        *px=x;
     216}
     217/*}}}*/
    222218void SolverxSeq(IssmDouble *X,IssmDouble *A,IssmDouble *B,int n, Parameters* parameters){/*{{{*/
    223219        // pack inputs to conform to the EDF-prescribed interface
     
    240236/*}}}*/
    241237#endif
     238
  • issm/trunk-jpl/src/c/toolkits/gsl/gslincludes.h

    r14877 r14887  
    2222void DenseGslSolve(IssmDouble** px, IssmDouble* Kff,int Kff_M, int Kff_N, IssmDouble* pf, int pf_M, Parameters* parameters);
    2323
    24 void SolverxSeq(IssmPDouble **pX, IssmPDouble *A, IssmPDouble *B,int n);
    2524void SolverxSeq(IssmPDouble *X, IssmPDouble *A, IssmPDouble *B,int n);
    2625
Note: See TracChangeset for help on using the changeset viewer.