git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12612 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2014-10-07 20:30:25 +00:00
parent 3c0612815f
commit 044084847b
33 changed files with 2284 additions and 2595 deletions

View File

@ -1,3 +1,5 @@
/// -*- c++ -*-
#ifndef COLVARTYPES_H
#define COLVARTYPES_H
@ -35,7 +37,7 @@ public:
{}
/// \brief Set all components to a scalar value
inline void set (cvm::real const value = 0.0) {
inline void set (cvm::real const &value = 0.0) {
x = y = z = value;
}
@ -539,13 +541,13 @@ inline cvm::rvector operator * (cvm::rmatrix const &m,
/// Numerical recipes diagonalization
void jacobi (cvm::real **a, int n, cvm::real d[], cvm::real **v, int *nrot);
void jacobi (cvm::real **a, cvm::real d[], cvm::real **v, int *nrot);
/// Eigenvector sort
void eigsrt (cvm::real d[], cvm::real **v, int n);
void eigsrt (cvm::real d[], cvm::real **v);
/// Transpose the matrix
void transpose (cvm::real **v, int n);
void transpose (cvm::real **v);
@ -603,7 +605,7 @@ public:
}
/// \brief Set all components to a scalar
inline void set (cvm::real const value = 0.0)
inline void set (cvm::real const &value = 0.0)
{
q0 = q1 = q2 = q3 = value;
}
@ -645,7 +647,7 @@ public:
case 3:
return this->q3;
default:
cvm::fatal_error ("Error: incorrect quaternion component.\n");
cvm::error ("Error: incorrect quaternion component.\n");
return q0;
}
}
@ -662,9 +664,9 @@ public:
case 3:
return this->q3;
default:
cvm::fatal_error ("Error: trying to access a quaternion "
"component which is not between 0 and 3.\n");
return this->q0;
cvm::error ("Error: trying to access a quaternion "
"component which is not between 0 and 3.\n");
return 0.0;
}
}
@ -943,9 +945,9 @@ public:
/// Constructor after a quaternion
inline rotation (cvm::quaternion const &qi)
: b_debug_gradients (false)
: q (qi),
b_debug_gradients (false)
{
q = qi;
}
/// Constructor after an axis of rotation and an angle (in radians)
@ -1091,8 +1093,3 @@ protected:
#endif
// Emacs
// Local Variables:
// mode: C++
// End: