Skip to content
Snippets Groups Projects
Commit 75cd6dd9 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Applied changes to engine.h

parent 70edbfe7
No related branches found
No related tags found
2 merge requests!136Master,!79First version of the multiple time-stepping
...@@ -78,14 +78,23 @@ struct engine { ...@@ -78,14 +78,23 @@ struct engine {
/* The task scheduler. */ /* The task scheduler. */
struct scheduler sched; struct scheduler sched;
/* The maximum dt to step (current). */ /* The minimum and maximum allowed dt */
float dt_step;
/* The minimum dt over all particles in the system. */
float dt_min, dt_max; float dt_min, dt_max;
/* The system time step. */ /* Time of the simulation beginning */
float dt, dt_orig; float timeBegin;
/* Time of the simulation end */
float timeEnd;
/* The previous system time. */
float timeOld;
/* The current system time. */
float time;
/* Time step */
float timeStep;
/* The system energies from the previous step. */ /* The system energies from the previous step. */
double ekin, epot; double ekin, epot;
...@@ -96,9 +105,6 @@ struct engine { ...@@ -96,9 +105,6 @@ struct engine {
/* The number of particles updated in the previous step. */ /* The number of particles updated in the previous step. */
int count_step; int count_step;
/* The current system time. */
float time;
/* Data for the threads' barrier. */ /* Data for the threads' barrier. */
pthread_mutex_t barrier_mutex; pthread_mutex_t barrier_mutex;
pthread_cond_t barrier_cond; pthread_cond_t barrier_cond;
...@@ -128,7 +134,8 @@ struct engine { ...@@ -128,7 +134,8 @@ struct engine {
/* Function prototypes. */ /* Function prototypes. */
void engine_barrier(struct engine *e, int tid); void engine_barrier(struct engine *e, int tid);
void engine_init(struct engine *e, struct space *s, float dt, int nr_threads, void engine_init(struct engine *e, struct space *s, float dt, int nr_threads,
int nr_queues, int nr_nodes, int nodeID, int policy); int nr_queues, int nr_nodes, int nodeID, int policy,
float timeBegin, float timeEnd);
void engine_prepare(struct engine *e); void engine_prepare(struct engine *e);
void engine_step(struct engine *e); void engine_step(struct engine *e);
void engine_maketasks(struct engine *e); void engine_maketasks(struct engine *e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment