24 return (interactions2.cwise()/interactions1)
46 interactions1.setConstant(2.4);
52 energy +=
E_VDW(interactions1, interactions2);
53 energy *= 1 + 1
e-20 *
i;
55 cout <<
"energy = " << energy << endl;
Namespace containing all symbols from the Eigen library.
SCALAR E_VDW(const Vec &interactions1, const Vec &interactions2)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
EIGEN_DEVICE_FUNC Derived & setConstant(Index size, const Scalar &val)
The matrix class, also used for vectors and row-vectors.
Matrix< SCALAR, Eigen::Dynamic, 1 > Vec