ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/Snapshot.cpp
(Generate patch)

Comparing trunk/src/brains/Snapshot.cpp (file contents):
Revision 890 by gezelter, Thu Feb 16 22:05:48 2006 UTC vs.
Revision 963 by tim, Wed May 17 21:51:42 2006 UTC

# Line 54 | Line 54 | namespace oopse {
54   namespace oopse {
55  
56    void  Snapshot::setHmat(const Mat3x3d& m) {
57 <    const double orthoTolerance = NumericConstant::epsilon;
57 >    const RealType orthoTolerance = NumericConstant::epsilon;
58      hmat_ = m;
59      invHmat_ = hmat_.inverse();
60      
61      //prepare fortran Hmat
62 <    double fortranHmat[9];
63 <    double fortranInvHmat[9];
62 >    RealType fortranHmat[9];
63 >    RealType fortranInvHmat[9];
64      hmat_.getArray(fortranHmat);
65      invHmat_.getArray(fortranInvHmat);
66  
67      //determine whether the box is orthoTolerance or not
68      int oldOrthoRhombic = orthoRhombic_;
69      
70 <    double smallDiag = fabs(hmat_(0, 0));
70 >    RealType smallDiag = fabs(hmat_(0, 0));
71      if(smallDiag > fabs(hmat_(1, 1))) smallDiag = fabs(hmat_(1, 1));
72      if(smallDiag > fabs(hmat_(2, 2))) smallDiag = fabs(hmat_(2, 2));    
73 <    double tol = smallDiag * orthoTolerance;
73 >    RealType tol = smallDiag * orthoTolerance;
74  
75      orthoRhombic_ = 1;
76  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines