Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
75cd6dd9
Commit
75cd6dd9
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Applied changes to engine.h
parent
70edbfe7
No related branches found
No related tags found
2 merge requests
!136
Master
,
!79
First version of the multiple time-stepping
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/engine.h
+17
-10
17 additions, 10 deletions
src/engine.h
with
17 additions
and
10 deletions
src/engine.h
+
17
−
10
View file @
75cd6dd9
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment