Ignore:
Timestamp:
Dec 6, 2013, 5:12:43 PM (10 years ago)
Author:
zhangj
Message:

Clean version of Tracy: SoleilVersion at the end of 2011.Use this clean version to find the correct dipole fringe field to have the correct FMAP and FMAPDP of ThomX. Modified files: tpsa_lin.cc, soleillib.cc, prtmfile.cc, rdmfile.cc, read_script.cc, physlib.cc, tracy.cc, t2lat.cc, t2elem.cc, naffutils.cc in /tracy/tracy/src folder; naffutils.h, tracy_global.h, physlib.h, tracy.h, read_script.h, solielilib.h, t2elem.h in /tracy/tracy.inc folder; soltracy.cc in tracy/tools folder

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/tracy3-3.10.1b/tracy/tracy/src/tpsa_lin.cc

    r3 r23  
    414414}
    415415
    416 /****************************
    417  * tan(x)
    418  * *************************/
     416
    419417void datan(const tps_buf &x, tps_buf &z)
    420418{
     
    424422}
    425423
    426 /*************************
    427  *  cotan(x)
    428  * ***********************/
    429 void dactan(const tps_buf &x, tps_buf &z)
    430 {
    431   tps_buf  c, s;
    432 
    433   dacos(x, c); dasin(x, s); dadiv_(c, s, z);
    434 }
    435 
    436 /*************************************
    437  *
    438  * Purpose:
    439  *     Get the derivatives of the arcsin(x)
    440  *   
    441  *    d(arcsin(u))/dx = (1/sqrt(1-u^2))*du/dx;
    442  *
    443  *  Input:
    444  *         x: u
    445  *  Output:
    446  *        z: the differential of x.
    447  *
    448  *       
    449  * Comments:
    450  *           13/11/2012
    451  *          Written by Jianfeng Nadolski @ LAL
    452  *                     
    453  * ***********************************/
    454 void daarcsin(const tps_buf &x, tps_buf &z)
    455 {
    456   int     i;
    457   double  a;  //differential of x; a = sqrt(1/1-u^2)
    458 
    459   a = x[0]; z[0] = asin(a); a = 1.0/sqrt(1.0-sqr(a));
    460   for (i = 1; i <= ss_dim; i++)
    461     z[i] = a*x[i];
    462 }
    463 
    464 /*************************************
    465  *
    466  * Purpose:
    467  *     Get the derivatives of the arccos(x)
    468  *   
    469  *    d(arccos(u))/dx = -(1/sqrt(1-u^2))*du/dx;
    470  *
    471  *  Input:
    472  *         x: u
    473  *  Output:
    474  *        z: the differential of x.
    475  *
    476  *       
    477  * Comments:
    478  *           13/11/2012
    479  *          Written by Jianfeng Nadolski @ LAL
    480  *                     
    481  * ***********************************/
    482 void daarccos(const tps_buf &x, tps_buf &z)
    483 {
    484 int     i;
    485   double  a;  //differential of x; a = -sqrt(1/1-u^2)
    486 
    487   a = x[0]; z[0] = asin(a); a = -1.0/sqrt(1.0-sqr(a));
    488   for (i = 1; i <= ss_dim; i++)
    489     z[i] = a*x[i];
    490  
    491 }
    492 /*************************************
    493  *
    494  * Purpose:
    495  *     Get the derivatives of the arctan(x)
    496  *   
    497  *    d(arctan(u))/dx = (1/1+u^2)*du/dx;
    498  *
    499  *  Input:
    500  *         x: u
    501  *  Output:
    502  *        z: the differential of x.
    503  *
    504  *         
    505  * ***********************************/
     424
    506425void daarctan(const tps_buf &x, tps_buf &z)
    507426{
    508427  int     i;
    509   double  a;  //differential of x; a = (1/1+u^2)
     428  double  a;
    510429
    511430  a = x[0]; z[0] = atan(a); a = 1.0/(1.0+sqr(a));
     
    514433}
    515434
    516 /*************************************
    517  *
    518  * Purpose:
    519  *     Get the derivatives of the arcctan(x)
    520  *   
    521  *    d(arcctan(u))/dx = -(1/1+u^2)*du/dx;
    522  *
    523  *  Input:
    524  *         x: u
    525  *  Output:
    526  *        z: the differential of x.
    527  *
    528  *         
    529  * ***********************************/
    530 void daarcctan(const tps_buf &x, tps_buf &z)
    531 {
    532   int     i;
    533   double  a;  //differential of x; a = -(1/1+u^2)
    534 
    535   a = x[0]; z[0] = atan(a); a = -1.0/(1.0+sqr(a));
    536   for (i = 1; i <= ss_dim; i++)
    537     z[i] = a*x[i];
    538 }
    539435
    540436void dafun_(const char *fun, const tps_buf &x, tps_buf &z)
    541437{
    542438  tps_buf  u;
    543  
     439
    544440  if (!strncmp(fun, "INV ", dafunlen))
    545441    dainv_(x, u);
     
    554450  else if (!strncmp(fun, "COS ", dafunlen))
    555451    dacos(x, u);
    556   else if (!strncmp(fun, "TAN ", dafunlen))
    557     datan(x, u);
    558   else if (!strncmp(fun, "CTAN ", dafunlen))
    559     dactan(x, u);
    560452  else if (!strncmp(fun, "SINH ", dafunlen))
    561453    dasinh(x, u);
    562454  else if (!strncmp(fun, "COSH ", dafunlen))
    563455    dacosh(x, u);
    564   else if (!strncmp(fun, "ASIN", dafunlen))
    565     daarcsin(x, u);
    566   else if (!strncmp(fun, "ACOS", dafunlen))
    567     daarccos(x, u);
     456  else if (!strncmp(fun, "TAN ", dafunlen))
     457    datan(x, u);
    568458  else if (!strncmp(fun, "ATAN", dafunlen))
    569459    daarctan(x, u);
    570   else if (!strncmp(fun, "ACTAN", dafunlen))
    571     daarcctan(x, u);
    572460  else {
    573461    printf("dafun: illegal function %s\n", fun);
Note: See TracChangeset for help on using the changeset viewer.