diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-09-26 07:24:48 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-09-26 07:24:48 (GMT) |
commit | a105a8e03b4cf188ac6a3a5b9d87433d78ac56f7 (patch) | |
tree | f4fcc7f48bfbe99f852043a4564a57799761ad28 /src | |
parent | 6d5c2726dad7f1b0539ffba19c726d10ad579430 (diff) |
Set default frame set size when setting stride len.
By befault adapt the frame set to 100*stride length in util
functions.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/tng_io.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index c682a92..70d114c 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -13728,7 +13728,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_frequency_set current_trajectory_frame_set; tng_particle_data_t p_data; tng_non_particle_data_t np_data; - int64_t n_particles, n_frames = 10000; + int64_t n_particles, n_frames = 100*f; tng_function_status stat; if(!frame_set || tng_data->n_trajectory_frame_sets <= 0) @@ -13863,7 +13863,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_write current_trajectory_frame_set; tng_particle_data_t p_data; tng_non_particle_data_t np_data; - int64_t n_particles, n_frames = 10000, stride_length = 1000, frame_pos; + int64_t n_particles, n_frames = 10000, stride_length = 100, frame_pos; tng_function_status stat; char block_type_flag; @@ -13886,7 +13886,11 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_write return(stat); } } - else if(frame_nr >= frame_set->first_frame + n_frames) + else + { + n_frames = frame_set->n_frames; + } + if(frame_nr >= frame_set->first_frame + n_frames) { stat = tng_frame_set_write(tng_data, TNG_USE_HASH); if(stat != TNG_SUCCESS) @@ -13904,10 +13908,6 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_write return(stat); } } - else - { - n_frames = frame_set->n_frames; - } frame_set->n_unwritten_frames = frame_nr - frame_set->first_frame + 1; } |