This file is the header file that controls data input and output. 更多...
函数 | |
| void | example_io (const char *example, char *add_mkdir, const int i_or_o) |
| This function produces folder path for data input or output. 更多... | |
| int | flu_var_count (FILE *fp, const char *add) |
| This function counts how many numbers are there in the initial data file. 更多... | |
| void | _1D_initialize (const char *name, struct flu_var *FV0) |
| This function reads the 1D initial data file of velocity/pressure/density. 更多... | |
| void | _1D_file_write (const int m, const int N, struct cell_var CV, double *X[], const double *cpu_time, const char *name) |
| This function write the solution into output files. 更多... | |
| void | configurate (const char *name) |
| This function controls configuration data reading and validation. 更多... | |
This file is the header file that controls data input and output.
This header file declares functions in the folder 'file_io'.
| void _1D_file_write | ( | const int | m, |
| const int | N, | ||
| struct cell_var | CV, | ||
| double * | X[], | ||
| const double * | cpu_time, | ||
| const char * | name | ||
| ) |
This function write the solution into output files.
| [in] | m | The number of spatial points in the output data. |
| [in] | N | The number of time steps in the output data. |
| [in] | CV | Structural body of grid variable data. |
| [in] | X[] | Array of the coordinate data. |
| [in] | cpu_time | Array of the CPU time recording. |
| [in] | name | Name of the numerical results. |
| void _1D_initialize | ( | const char * | name, |
| struct flu_var * | FV0 | ||
| ) |
This function reads the 1D initial data file of velocity/pressure/density.
The function initialize the extern pointer FV0->RHO/U/P pointing to the position of a block of memory consisting (m+1) variables* of type double. The value of first of these variables is m. The following m variables are the initial value.
| [in] | name | Name of the test example. |
| [out] | FV0 | Structural body pointer of initial data array pointer. |
| void configurate | ( | const char * | add_in | ) |
This function controls configuration data reading and validation.
The parameters in the configuration data file refer to 'doc/config.csv'.
| [in] | add_in | Adress of the initial data folder of the test example. |
| void example_io | ( | const char * | example, |
| char * | add_mkdir, | ||
| const int | i_or_o | ||
| ) |
This function produces folder path for data input or output.
| [in] | example | Name of the test example/numerical results. |
| [out] | add_mkdir | Folder path for data input or output. |
| [in] | i_or_o | Conversion parameters for data input/output.
|
| int flu_var_count | ( | FILE * | fp, |
| const char * | add | ||
| ) |
This function counts how many numbers are there in the initial data file.
| [in] | fp | The pointer to the input file. |
| [in] | add | The address of the input file. |
| -1 | If the given number of column is not coincided with that in the data file. |