Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
55011843
Commit
55011843
authored
Sep 26, 2018
by
James Willis
Browse files
Made sft_output_count a static variable in velociraptor_interface.c.
parent
190e7b6f
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
55011843
...
...
@@ -6329,7 +6329,6 @@ void engine_init(struct engine *e, struct space *s, struct swift_params *params,
e
->
snapshot_units
=
(
struct
unit_system
*
)
malloc
(
sizeof
(
struct
unit_system
));
units_init_default
(
e
->
snapshot_units
,
params
,
"Snapshots"
,
internal_units
);
e
->
snapshot_output_count
=
0
;
e
->
stf_output_count
=
0
;
e
->
dt_min
=
parser_get_param_double
(
params
,
"TimeIntegration:dt_min"
);
e
->
dt_max
=
parser_get_param_double
(
params
,
"TimeIntegration:dt_max"
);
e
->
dt_max_RMS_displacement
=
FLT_MAX
;
...
...
src/engine.h
View file @
55011843
...
...
@@ -235,7 +235,6 @@ struct engine {
double
a_first_stf_output
;
double
time_first_stf_output
;
double
delta_time_stf
;
int
stf_output_count
;
/* Output_List for the structure finding */
struct
output_list
*
output_list_stf
;
...
...
src/velociraptor_interface.c
View file @
55011843
...
...
@@ -189,6 +189,7 @@ void velociraptor_invoke(struct engine *e) {
const
size_t
nr_hydro_parts
=
s
->
nr_parts
;
const
int
nr_cells
=
s
->
nr_cells
;
int
*
cell_node_ids
=
NULL
;
static
int
stf_output_count
=
0
;
/* Allow thread to run on any core for the duration of the call to
* VELOCIraptor so that
...
...
@@ -223,7 +224,7 @@ void velociraptor_invoke(struct engine *e) {
e
->
stfBaseName
,
e
->
step
);
}
else
if
(
e
->
stf_output_freq_format
==
io_stf_time
)
{
snprintf
(
outputFileName
,
PARSER_MAX_LINE_SIZE
+
128
,
"%s_%04i.VELOCIraptor"
,
e
->
stfBaseName
,
e
->
stf_output_count
);
e
->
stfBaseName
,
stf_output_count
);
}
/* Allocate and populate an array of swift_vel_parts to be passed to
...
...
@@ -282,7 +283,7 @@ void velociraptor_invoke(struct engine *e) {
free
(
cell_node_ids
);
free
(
swift_parts
);
e
->
stf_output_count
++
;
stf_output_count
++
;
message
(
"VELOCIraptor took %.3f %s on rank %d."
,
clocks_from_ticks
(
getticks
()
-
tic
),
clocks_getunit
(),
engine_rank
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment