Esempio n. 1
0
 virtual void SetUp() {
     boxdim = 3;
     nparticles = 1e1;
     ndof = boxdim*nparticles;
     origin = Array<double>(ndof);
     std::fill(origin.data(),origin.data()+ndof,0);
     x = Array<double>(ndof);
     std::fill(x.data(),x.data()+ndof,0);
     stepsize = 1e-2;
     k = 400;
     potential = std::make_shared<pele::Harmonic>(origin, k, boxdim);
     max_iter = 1e5;
 }
Esempio n. 2
0
template<typename... Ix> arr data_t(const arr_t& a, Ix&&... index) {
    return arr(a.size() - a.index_at(index...), a.data(index...));
}