Changeset 2464 for branches/hpc33/src


Ignore:
Timestamp:
04/13/12 12:57:18 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs:

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Merge bug fix on trunk (r2461).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/hpc33/src/STGrid.cpp

    r2459 r2464  
    10581058    center_(0) = xcen.getValue( "rad" ) ;
    10591059    center_(1) = ycen.getValue( "rad" ) ;
    1060   }
     1060    double base = 0.5 * (xmin + xmax) ;
     1061    int maxrotate = 1 ;
     1062    int nelem = 2 * maxrotate + 1 ;
     1063    double *sep = new double[nelem] ;
     1064    for ( int i = 0 ; i < nelem ; i++ )
     1065      sep[i] = abs(base - center_[0] - (i-maxrotate) * C::_2pi) ;
     1066//     os << "sep[0]=" << sep[0] << endl 
     1067//        << "sep[1]=" << sep[1] << endl
     1068//        << "sep[2]=" << sep[2] << LogIO::POST ;
     1069    int idx = 0 ;
     1070    base = sep[0] ;
     1071    int nrotate = 0 ;
     1072    while ( idx < nelem ) {
     1073      if ( base > sep[idx] ) {
     1074        base = sep[idx] ;
     1075        nrotate = idx ;
     1076      }
     1077      idx++ ;
     1078    }
     1079    delete sep ;
     1080    nrotate -= maxrotate ;
     1081//     os << "nrotate = " << nrotate << LogIO::POST ;
     1082    center_[0] += nrotate * C::_2pi ;
     1083  }
     1084//   os << "xmin=" << xmin << LogIO::POST ;
     1085//   os << "center_=" << center_ << LogIO::POST ;
    10611086
    10621087
Note: See TracChangeset for help on using the changeset viewer.