Changeset 17343


Ignore:
Timestamp:
02/22/14 13:04:26 (11 years ago)
Author:
Mathieu Morlighem
Message:

DEL: removed TripleSolve, not needed anymore

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

Legend:

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

    r17328 r17343  
    4444        /*allocate output pointers: */
    4545        *px=x;
    46 }
    47 /*}}}*/
    48 void DenseGslTripleSolve(IssmPDouble** pX1,IssmPDouble** pX2,IssmPDouble** pX3,IssmPDouble* A,IssmPDouble* B1,IssmPDouble* B2,IssmPDouble* B3,int n){/*{{{*/
    49 
    50         /*Allocate output: */
    51         IssmPDouble *X1 = xNew<IssmPDouble>(n);
    52         IssmPDouble *X2 = xNew<IssmPDouble>(n);
    53         IssmPDouble *X3 = xNew<IssmPDouble>(n);
    54 
    55 #ifdef _HAVE_GSL_
    56         /*GSL Matrices and vectors: */
    57         int s;
    58 
    59         double* Acopy = xNew<double>(n*n);
    60         xMemCpy(Acopy,A,n*n);
    61 
    62         /*Initialize gsl matrices and vectors: */
    63         gsl_matrix_view a = gsl_matrix_view_array(Acopy,n,n);
    64         gsl_vector_view b1= gsl_vector_view_array(B1,n);
    65         gsl_vector_view b2= gsl_vector_view_array(B2,n);
    66         gsl_vector_view b3= gsl_vector_view_array(B3,n);
    67         gsl_vector_view x1= gsl_vector_view_array(X1,n);
    68         gsl_vector_view x2= gsl_vector_view_array(X2,n);
    69         gsl_vector_view x3= gsl_vector_view_array(X3,n);
    70 
    71         /*Run LU and solve: */
    72         gsl_permutation* p = gsl_permutation_alloc (n);
    73         gsl_linalg_LU_decomp(&a.matrix,p,&s);
    74 
    75         gsl_linalg_LU_solve(&a.matrix,p,&b1.vector,&x1.vector);
    76         gsl_linalg_LU_solve(&a.matrix,p,&b2.vector,&x2.vector);
    77         gsl_linalg_LU_solve(&a.matrix,p,&b3.vector,&x3.vector);
    78 
    79         /*Clean up and assign output pointer*/
    80         xDelete(Acopy);
    81         gsl_permutation_free(p);
    82 #endif
    83 
    84         /*allocate output pointers: */
    85         *pX1=X1;
    86         *pX2=X2;
    87         *pX3=X3;
    8846}
    8947/*}}}*/
  • issm/trunk-jpl/src/c/toolkits/gsl/gslincludes.h

    r17328 r17343  
    2222void DenseGslSolve(IssmPDouble** pX,IssmPDouble* A,IssmPDouble* B, int n);
    2323void DenseGslSolve(IssmDouble** pX,IssmDouble* Kff,int Kff_M,int Kff_N,IssmDouble* pf,int pf_M,Parameters* parameters);
    24 void DenseGslTripleSolve(IssmPDouble** pX1,IssmPDouble** pX2,IssmPDouble** pX3,IssmPDouble* A,IssmPDouble* B1,IssmPDouble* B2,IssmPDouble* B3,int n);
    2524
    2625void SolverxSeq(IssmPDouble *X, IssmPDouble *A, IssmPDouble *B,int n);
Note: See TracChangeset for help on using the changeset viewer.