Ignore:
Timestamp:
08/30/12 06:59:13 (13 years ago)
Author:
utke
Message:

NEW : register externally differentiated function for ADOL-C ; introduce a generic parameter class to hold a structure of such registry items

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/modules/Solverx/SolverxSeq.cpp

    r13062 r13185  
    4545}/*}}}*/
    4646#ifdef _HAVE_ADOLC_
     47
     48int EDF_for_solverx(int n, IssmPDouble *x, int m, IssmPDouble *y) {
     49    if(m*(m+1)!=n)_error_("Stiffness matrix should be square!");
     50    SolverxSeq(&y,x, x+m*m, m);
     51    return 0;
     52}
     53
    4754void SolverxSeq(IssmDouble** pX,IssmDouble* A,IssmDouble* B,int n){//{{{
    4855        /* if we use Adol-C then the IssmDouble will be an adouble
     
    6168
    6269        /*First, transfer from IssmDouble to double all our matrices and vectors: */
    63         pdoubleA=xNew<double>(n*n);
    64         pdoubleB=xNew<double>(n);
     70        pdoubleA=xNew<IssmPDouble>(n*n);
     71        pdoubleB=xNew<IssmPDouble>(n);
    6572        for(i=0;i<n*n;i++)pdoubleA[i]=reCast<IssmPDouble>(A[i]);
    6673        for(i=0;i<n;i++)pdoubleB[i]=reCast<IssmPDouble>(B[i]);
Note: See TracChangeset for help on using the changeset viewer.