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
de5aa11c
Commit
de5aa11c
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Added time to the concerved quantities output
parent
ff44be2c
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!136
Master
,
!90
Improved multi-timestep SPH
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/engine.c
+4
-4
4 additions, 4 deletions
src/engine.c
with
4 additions
and
4 deletions
src/engine.c
+
4
−
4
View file @
de5aa11c
...
@@ -1848,9 +1848,9 @@ void engine_step(struct engine *e) {
...
@@ -1848,9 +1848,9 @@ void engine_step(struct engine *e) {
fflush
(
stdout
);
fflush
(
stdout
);
/* Write some energy statistics */
/* Write some energy statistics */
fprintf
(
e
->
file_stats
,
"%d %f %f %f %f %f %f %f %f %f %f
\n
"
,
e
->
step
,
e_kin
,
fprintf
(
e
->
file_stats
,
"%d %f %f %f %f %f %f %f %f %f
%f
%f
\n
"
,
e
->
step
,
e_int
,
e_pot
,
e_kin
+
e_int
+
e_pot
,
mom
[
0
],
mom
[
1
],
mom
[
2
],
ang
[
0
],
e
->
time
,
e_kin
,
e_int
,
e_pot
,
e_kin
+
e_int
+
e_pot
,
mom
[
0
],
mom
[
1
],
ang
[
1
],
ang
[
2
]);
mom
[
2
],
ang
[
0
],
ang
[
1
],
ang
[
2
]);
fflush
(
e
->
file_stats
);
fflush
(
e
->
file_stats
);
}
}
}
}
...
@@ -2165,7 +2165,7 @@ void engine_init(struct engine *e, struct space *s, float dt, int nr_threads,
...
@@ -2165,7 +2165,7 @@ void engine_init(struct engine *e, struct space *s, float dt, int nr_threads,
if
(
e
->
nodeID
==
0
)
{
if
(
e
->
nodeID
==
0
)
{
e
->
file_stats
=
fopen
(
"energy.txt"
,
"w"
);
e
->
file_stats
=
fopen
(
"energy.txt"
,
"w"
);
fprintf
(
e
->
file_stats
,
fprintf
(
e
->
file_stats
,
"# Step E_kin E_int E_pot E_tot "
"# Step
Time
E_kin E_int E_pot E_tot "
"p_x p_y p_z ang_x ang_y ang_z
\n
"
);
"p_x p_y p_z ang_x ang_y ang_z
\n
"
);
}
}
...
...
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