Changeset 419 for branches


Ignore:
Timestamp:
Mar 19, 2013 12:18:09 PM (6 years ago)
Author:
kulshres
Message:

revert previous change

Location:
branches/MPI/ADOL-C/src
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • branches/MPI/ADOL-C/src/adouble.cpp

    r418 r419  
    13581358    /* y+0.0 is a hack since condassign is currently not defined for
    13591359       badoubles */
    1360     condassign( sy,  y,  (adouble)1.0 , (adouble)-1.0 );
    1361     condassign( a1,  x,  atan(y/x),  atan(y/x)+sy*2*pihalf);
    1362     condassign( a2,  fabs(y), sy*pihalf-atan(x/y), (adouble) 0.0 );
    1363     condassign( ret, fabs(x) - fabs(y), a1, a2 );
     1360    condassign( sy,  y+0.0,  1.0 , -1.0 );
     1361    condassign( a1,  x+0.0, (adouble) atan(y/x),
     1362                (adouble)( atan(y/x)+sy*2*pihalf));
     1363    condassign( a2,  (adouble) fabs(y), (adouble) (sy*pihalf-atan(x/y)),
     1364                (adouble) 0.0 );
     1365    condassign( ret, (adouble) (fabs(x) - fabs(y)), a1, a2 );
    13641366    return ret;
    13651367}
     
    13981400    }
    13991401
    1400     condassign (ret, (adouble) coval, exp(y*ADOLC_MATH_NSP::log(coval)),
    1401                 (adouble) ADOLC_MATH_NSP::pow(coval,y.getValue()) );
     1402    condassign (ret, coval, exp(y*ADOLC_MATH_NSP::log(coval)),
     1403            ADOLC_MATH_NSP::pow(coval,y.getValue()) );
    14021404
    14031405    return ret;
     
    14171419            fprintf(DIAG_OUT,"\nADOL-C message: negative exponent and zero basis deactivated\n");
    14181420    }
    1419     condassign(a1, -y, (adouble) ADOLC_MATH_NSP::pow(vx,vy), pow(x,vy));
    1420     condassign(a2, fabs(x), pow(x, vy), a1);
    1421     condassign(ret, x, exp(y*log(x)),a2);
     1421    condassign(a1,-y, ADOLC_MATH_NSP::pow(vx,vy), pow(x,vy));
     1422    condassign(a2, fabs(x), pow(x, vy),a1);
     1423    condassign(ret,x+0.0, exp(y*log(x)),a2);
    14221424
    14231425    return ret;
     
    17751777
    17761778/*--------------------------------------------------------------------------*/
    1777 void condassign( adouble &res,         const badouble &cond,
    1778                  const badouble &arg1, const badouble &arg2 ) {
     1779void condassign( adouble &res,        const adouble &cond,
     1780                 const adouble &arg1, const adouble &arg2 ) {
    17791781    ADOLC_OPENMP_THREAD_NUMBER;
    17801782    ADOLC_OPENMP_GET_THREAD_NUMBER;
     
    18001802
    18011803/*--------------------------------------------------------------------------*/
    1802 void condassign( adouble &res, const badouble &cond, const badouble &arg ) {
     1804void condassign( adouble &res, const adouble &cond, const adouble &arg ) {
    18031805    ADOLC_OPENMP_THREAD_NUMBER;
    18041806    ADOLC_OPENMP_GET_THREAD_NUMBER;
  • branches/MPI/ADOL-C/src/adouble.h

    r418 r419  
    111111class adub;
    112112class badouble;
     113class adubv;
     114/* class doublev;  that's history */
    113115
    114116/*--------------------------------------------------------------------------*/
     
    136138*/
    137139class ADOLC_DLL_EXPORT badouble {
    138     friend ADOLC_DLL_EXPORT class advector;
     140    friend ADOLC_DLL_EXPORT class badoublev;
    139141protected:
    140142    locint location;
     
    144146    //
    145147    // badouble( const badouble& a ) {location = a.location;};
    146     explicit badouble( locint lo ) {
     148    badouble( locint lo ) {
    147149        location = lo;
    148150    };
     
    166168    badouble& operator = ( const adub& );
    167169    double getValue() const;
    168     inline double value() const {
     170    inline double value() {
    169171        return getValue();
    170172    }
     
    284286    /*--------------------------------------------------------------------------*/
    285287    /* Conditionals */
    286     friend ADOLC_DLL_EXPORT void condassign( adouble &res, const badouble &cond,
    287             const badouble &arg1, const badouble &arg2 );
    288     friend ADOLC_DLL_EXPORT void condassign( adouble &res, const badouble &cond,
    289             const badouble &arg );
     288    friend ADOLC_DLL_EXPORT void condassign( adouble &res, const adouble &cond,
     289            const adouble &arg1, const adouble &arg2 );
     290    friend ADOLC_DLL_EXPORT void condassign( adouble &res, const adouble &cond,
     291            const adouble &arg );
    290292};
    291293
     
    315317        exit(-2);
    316318    };
    317     explicit adub( double ):badouble(0) {
     319    adub( double ):badouble(0) {
    318320        fprintf(DIAG_OUT,"ADOL-C error: illegal  construction of adub variable"
    319321                " from double\n");
     
    400402*/
    401403class ADOLC_DLL_EXPORT adouble:public badouble {
    402     friend ADOLC_DLL_EXPORT class advector;
    403404public:
    404405    adouble( const adub& );
Note: See TracChangeset for help on using the changeset viewer.