Skip to content
Snippets Groups Projects
Commit 292bcc6b authored by James Willis's avatar James Willis
Browse files

Call VELOCIraptor every 250 steps.

parent 5f02138a
No related branches found
No related tags found
1 merge request!578Swift velociraptor
...@@ -51,12 +51,20 @@ ...@@ -51,12 +51,20 @@
/* Global profiler. */ /* Global profiler. */
struct profiler prof; struct profiler prof;
//void InvokeVelociraptor(const int nbodies, struct gpart *parts); void InitVelociraptor();
void InvokeVelociraptor(); void InvokeVelociraptor(const int num_gravity_parts, struct gpart *gravity_parts);
void call_velociraptor() { void init_velociraptor() {
InvokeVelociraptor(); InitVelociraptor();
}
void call_velociraptor(struct engine *e) {
struct gpart *gparts = e->s->gparts;
const int nr_gparts = e->s->nr_gparts;
InvokeVelociraptor(nr_gparts, gparts);
} }
/** /**
...@@ -127,7 +135,7 @@ void print_help_message() { ...@@ -127,7 +135,7 @@ void print_help_message() {
*/ */
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
call_velociraptor(); init_velociraptor();
struct clocks_time tic, toc; struct clocks_time tic, toc;
struct engine e; struct engine e;
...@@ -871,6 +879,8 @@ int main(int argc, char *argv[]) { ...@@ -871,6 +879,8 @@ int main(int argc, char *argv[]) {
/* Take a step. */ /* Take a step. */
engine_step(&e); engine_step(&e);
if (e.step%250 == 0) call_velociraptor(&e);
/* Print the timers. */ /* Print the timers. */
if (with_verbose_timers) timers_print(e.step); if (with_verbose_timers) timers_print(e.step);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment