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; }
template<typename... Ix> size_t at_t(const arr_t& a, Ix&&... idx) { return a.at(idx...); }
template<typename... Ix> arr data_t(const arr_t& a, Ix&&... index) { return arr(a.size() - a.index_at(index...), a.data(index...)); }
template<typename... Ix> size_t offset_at_t(const arr_t& a, Ix... idx) { return a.offset_at(idx...); }
template<typename... Ix> size_t index_at_t(const arr_t& a, Ix... idx) { return a.index_at(idx...); }