Got rid of remaining manual allocations, moved some variable declarations to where they are needed

This commit is contained in:
Yohai Meiron 2020-10-28 19:18:37 -04:00
parent aef0f26878
commit d9ed8e5131
8 changed files with 67 additions and 90 deletions

View file

@ -4,7 +4,7 @@
class External_gravity {
public:
void apply(const int n_act, const std::vector<double3> &x, const std::vector<double3> &v, double pot[], double3 a[], double3 adot[])
void apply(const int n_act, const std::vector<double3> &x, const std::vector<double3> &v, std::vector<double> &pot, std::vector<double3> &a, std::vector<double3> &adot)
{
for (int i=0; i<n_act; i++) {
this->set_coordinates(x[i], v[i]);