This is a set of common functions which control the input/output data. 更多...
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include "../include/var_struc.h"
#include "../include/tools.h"
函数 | |
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. 更多... | |
int | flu_var_count_line (FILE *fp, const char *add, int *n_x) |
This function counts the line and column number of the numbers are there in the initial data file. 更多... | |
int | flu_var_read (FILE *fp, double *U, const int num) |
This function reads the initial data file to generate the initial data. 更多... | |
This is a set of common functions which control the input/output data.
在文件 io_control.c 中定义.
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.
|
在文件 io_control.c 第 39 行定义.
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. |
在文件 io_control.c 第 111 行定义.
int flu_var_count_line | ( | FILE * | fp, |
const char * | add, | ||
int * | n_x | ||
) |
This function counts the line and column number of the numbers are there in the initial data file.
[in] | fp | The pointer to the input file. |
[in] | add | The address of the input file. |
[out] | n_x | The colume number of the numbers in the initial data file. |
在文件 io_control.c 第 150 行定义.
int flu_var_read | ( | FILE * | fp, |
double * | U, | ||
const int | num | ||
) |
This function reads the initial data file to generate the initial data.
[in] | fp | The pointer to the input file. |
[out] | U | The pointer to the data array of fluid variables. |
[in] | num | The number of the numbers in the input file. |
在文件 io_control.c 第 208 行定义.