| 54 | 
  | 
namespace oopse { | 
| 55 | 
  | 
 | 
| 56 | 
  | 
  void  Snapshot::setHmat(const Mat3x3d& m) { | 
| 57 | 
– | 
    const RealType orthoTolerance = NumericConstant::epsilon; | 
| 57 | 
  | 
    hmat_ = m; | 
| 58 | 
  | 
    invHmat_ = hmat_.inverse(); | 
| 59 | 
  | 
     | 
| 69 | 
  | 
    RealType smallDiag = fabs(hmat_(0, 0)); | 
| 70 | 
  | 
    if(smallDiag > fabs(hmat_(1, 1))) smallDiag = fabs(hmat_(1, 1)); | 
| 71 | 
  | 
    if(smallDiag > fabs(hmat_(2, 2))) smallDiag = fabs(hmat_(2, 2));     | 
| 72 | 
< | 
    RealType tol = smallDiag * orthoTolerance; | 
| 72 | 
> | 
    RealType tol = smallDiag * orthoTolerance_; | 
| 73 | 
  | 
 | 
| 74 | 
  | 
    orthoRhombic_ = 1; | 
| 75 | 
  | 
 | 
| 93 | 
  | 
                 "\tThis is usually a good thing, but if you want the\n" | 
| 94 | 
  | 
                 "\tNon-Orthorhombic computations, make the orthoBoxTolerance\n" | 
| 95 | 
  | 
                 "\tvariable ( currently set to %G ) smaller.\n", | 
| 96 | 
< | 
                 orthoTolerance); | 
| 96 | 
> | 
                 orthoTolerance_); | 
| 97 | 
  | 
        painCave.severity = OOPSE_INFO; | 
| 98 | 
  | 
        simError(); | 
| 99 | 
  | 
      } | 
| 105 | 
  | 
                 "\tNPTf integration. If you want to live on the edge with\n" | 
| 106 | 
  | 
                 "\tthe Orthorhombic computations, make the orthoBoxTolerance\n" | 
| 107 | 
  | 
                 "\tvariable ( currently set to %G ) larger.\n", | 
| 108 | 
< | 
                 orthoTolerance); | 
| 108 | 
> | 
                 orthoTolerance_); | 
| 109 | 
  | 
        painCave.severity = OOPSE_WARNING; | 
| 110 | 
  | 
        simError(); | 
| 111 | 
  | 
      } | 
| 155 | 
  | 
 | 
| 156 | 
  | 
  } | 
| 157 | 
  | 
 | 
| 158 | 
+ | 
  Vector3d Snapshot::getCOM() { | 
| 159 | 
+ | 
    if( !hasCOM_ ) { | 
| 160 | 
+ | 
      sprintf( painCave.errMsg, "COM was requested before COM was computed!\n"); | 
| 161 | 
+ | 
      painCave.severity = OOPSE_ERROR; | 
| 162 | 
+ | 
      simError(); | 
| 163 | 
+ | 
    } | 
| 164 | 
+ | 
    return COM_; | 
| 165 | 
+ | 
  } | 
| 166 | 
+ | 
   | 
| 167 | 
+ | 
  Vector3d Snapshot::getCOMvel() { | 
| 168 | 
+ | 
    if( !hasCOM_ ) { | 
| 169 | 
+ | 
      sprintf( painCave.errMsg, "COMvel was requested before COM was computed!\n"); | 
| 170 | 
+ | 
      painCave.severity = OOPSE_ERROR; | 
| 171 | 
+ | 
      simError(); | 
| 172 | 
+ | 
    } | 
| 173 | 
+ | 
    return COMvel_; | 
| 174 | 
+ | 
  } | 
| 175 | 
+ | 
   | 
| 176 | 
+ | 
  Vector3d Snapshot::getCOMw() { | 
| 177 | 
+ | 
    if( !hasCOM_ ) { | 
| 178 | 
+ | 
      sprintf( painCave.errMsg, "COMw was requested before COM was computed!\n"); | 
| 179 | 
+ | 
      painCave.severity = OOPSE_ERROR; | 
| 180 | 
+ | 
      simError(); | 
| 181 | 
+ | 
    } | 
| 182 | 
+ | 
    return COMw_; | 
| 183 | 
+ | 
  } | 
| 184 | 
+ | 
  | 
| 185 | 
  | 
} | 
| 186 | 
  | 
   |