 Timestamp:
 Mar 19, 2013 12:18:09 PM (6 years ago)
 Location:
 branches/MPI/ADOLC/src
 Files:

 2 deleted
 2 edited
Legend:
 Unmodified
 Added
 Removed

branches/MPI/ADOLC/src/adouble.cpp
r418 r419 1358 1358 /* y+0.0 is a hack since condassign is currently not defined for 1359 1359 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*pihalfatan(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*pihalfatan(x/y)), 1364 (adouble) 0.0 ); 1365 condassign( ret, (adouble) (fabs(x)  fabs(y)), a1, a2 ); 1364 1366 return ret; 1365 1367 } … … 1398 1400 } 1399 1401 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()) ); 1402 1404 1403 1405 return ret; … … 1417 1419 fprintf(DIAG_OUT,"\nADOLC message: negative exponent and zero basis deactivated\n"); 1418 1420 } 1419 condassign(a1, y, (adouble)ADOLC_MATH_NSP::pow(vx,vy), pow(x,vy));1420 condassign(a2, fabs(x), pow(x, vy), 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); 1422 1424 1423 1425 return ret; … … 1775 1777 1776 1778 /**/ 1777 void condassign( adouble &res, const badouble &cond,1778 const badouble &arg1, const badouble &arg2 ) {1779 void condassign( adouble &res, const adouble &cond, 1780 const adouble &arg1, const adouble &arg2 ) { 1779 1781 ADOLC_OPENMP_THREAD_NUMBER; 1780 1782 ADOLC_OPENMP_GET_THREAD_NUMBER; … … 1800 1802 1801 1803 /**/ 1802 void condassign( adouble &res, const badouble &cond, const badouble &arg ) {1804 void condassign( adouble &res, const adouble &cond, const adouble &arg ) { 1803 1805 ADOLC_OPENMP_THREAD_NUMBER; 1804 1806 ADOLC_OPENMP_GET_THREAD_NUMBER; 
branches/MPI/ADOLC/src/adouble.h
r418 r419 111 111 class adub; 112 112 class badouble; 113 class adubv; 114 /* class doublev; that's history */ 113 115 114 116 /**/ … … 136 138 */ 137 139 class ADOLC_DLL_EXPORT badouble { 138 friend ADOLC_DLL_EXPORT class advector;140 friend ADOLC_DLL_EXPORT class badoublev; 139 141 protected: 140 142 locint location; … … 144 146 // 145 147 // badouble( const badouble& a ) {location = a.location;}; 146 explicitbadouble( locint lo ) {148 badouble( locint lo ) { 147 149 location = lo; 148 150 }; … … 166 168 badouble& operator = ( const adub& ); 167 169 double getValue() const; 168 inline double value() const{170 inline double value() { 169 171 return getValue(); 170 172 } … … 284 286 /**/ 285 287 /* 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 ); 290 292 }; 291 293 … … 315 317 exit(2); 316 318 }; 317 explicitadub( double ):badouble(0) {319 adub( double ):badouble(0) { 318 320 fprintf(DIAG_OUT,"ADOLC error: illegal construction of adub variable" 319 321 " from double\n"); … … 400 402 */ 401 403 class ADOLC_DLL_EXPORT adouble:public badouble { 402 friend ADOLC_DLL_EXPORT class advector;403 404 public: 404 405 adouble( const adub& );
Note: See TracChangeset
for help on using the changeset viewer.