Moved config to inside main and changed several arrays into vectors
This commit is contained in:
parent
329dd2ca4d
commit
747f9f9d89
7 changed files with 115 additions and 108 deletions
|
|
@ -1,9 +1,10 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
#include "double3.h"
|
||||
|
||||
class External_gravity {
|
||||
public:
|
||||
void apply(const int n_act, const double3 x[], const double3 v[], double pot[], double3 a[], double3 adot[])
|
||||
void apply(const int n_act, const std::vector<double3> &x, const std::vector<double3> &v, double pot[], double3 a[], double3 adot[])
|
||||
{
|
||||
for (int i=0; i<n_act; i++) {
|
||||
this->set_coordinates(x[i], v[i]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue