diff --git a/src/distributed_io.c b/src/distributed_io.c index 9f08ca929bc06dc0bc06944b8d7ec96eb703d9de..000033b91ab962b421608fa9ecb4b6bbf0f82764 100644 --- a/src/distributed_io.c +++ b/src/distributed_io.c @@ -358,7 +358,8 @@ void write_output_distributed(struct engine* e, /* Determine if we are writing a reduced snapshot, and if so which * output selection type to use */ - char current_selection_name[FIELD_BUFFER_SIZE] = "Default"; + char current_selection_name[FIELD_BUFFER_SIZE] = + select_output_header_default_name; if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */ diff --git a/src/output_list.c b/src/output_list.c index 4bc43f5ea49cc8ce88da5cb8224fa22d222c2c44..b1a01aa218aa3cfa13dfcc1ade6af637bc2d720a 100644 --- a/src/output_list.c +++ b/src/output_list.c @@ -111,7 +111,8 @@ void output_list_read_file(struct output_list *output_list, size_t ind = 0; int read_successfully = 0; int found_select_output = 0; - char select_output_buffer[FIELD_BUFFER_SIZE] = "Default"; + char select_output_buffer[FIELD_BUFFER_SIZE] = + select_output_header_default_name; while (getline(&line, &len, file) != -1) { double *time = &output_list->times[ind]; /* Write data to output_list */ diff --git a/src/output_options.h b/src/output_options.h index 065b5a91ae95a63b659642a1c9e41036dc462cd9..99176e63755771af060a71d71c33def32549b6d7 100644 --- a/src/output_options.h +++ b/src/output_options.h @@ -36,6 +36,9 @@ enum compression_levels { /* Default value for SelectOutput */ #define compression_level_default compression_write_lossless +/* Default name for the SelectOutput header */ +#define select_output_header_default_name "Default" + /** * @brief Names of the compression levels, used in the select_output.yml * parameter file. diff --git a/src/parallel_io.c b/src/parallel_io.c index f697623f1320c316c8484d548645f9e901b65dca..37999d01eb6a24bc3e1f5c3a5010c19dbde93110 100644 --- a/src/parallel_io.c +++ b/src/parallel_io.c @@ -1105,7 +1105,8 @@ void prepare_file(struct engine* e, const char* fileName, /* Determine if we are writing a reduced snapshot, and if so which * output selection type to use */ - char current_selection_name[FIELD_BUFFER_SIZE] = "Default"; + char current_selection_name[FIELD_BUFFER_SIZE] = + select_output_header_default_name; if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */ @@ -1781,7 +1782,8 @@ void write_output_parallel(struct engine* e, } /* Write everything that is not cancelled */ - char current_selection_name[FIELD_BUFFER_SIZE] = "Default"; + char current_selection_name[FIELD_BUFFER_SIZE] = + select_output_header_default_name; if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */ diff --git a/src/serial_io.c b/src/serial_io.c index da84d0b90d93d01b63c349b95dd061ece7d83e19..43de9c19a8b1832550d036b044d30030ef67660a 100644 --- a/src/serial_io.c +++ b/src/serial_io.c @@ -925,7 +925,8 @@ void write_output_serial(struct engine* e, /* Determine if we are writing a reduced snapshot, and if so which * output selection type to use. Can just create a copy of this on * each rank. */ - char current_selection_name[FIELD_BUFFER_SIZE] = "Default"; + char current_selection_name[FIELD_BUFFER_SIZE] = + select_output_header_default_name; if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */ diff --git a/src/single_io.c b/src/single_io.c index 1d104f0aec2942b227fda042bb7e04a3e6ec26e0..0f22ddeb2aca5b3e063133191d2499fb5e5505bd 100644 --- a/src/single_io.c +++ b/src/single_io.c @@ -817,7 +817,8 @@ void write_output_single(struct engine* e, /* Determine if we are writing a reduced snapshot, and if so which * output selection type to use */ - char current_selection_name[FIELD_BUFFER_SIZE] = "Default"; + char current_selection_name[FIELD_BUFFER_SIZE] = + select_output_header_default_name; if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */