This is a set of functions which control the read-in of two-dimensional data. 更多...
#include <math.h>#include <string.h>#include <stdio.h>#include <stdlib.h>#include <stdbool.h>#include "../include/var_struc.h"#include "../include/file_io.h"宏定义 | |
| #define | N_MAX_2D 5 |
| The maximum number of 2-D data dimension storing fluid variables in memory. 更多... | |
| #define | STR_FLU_INI(sfv, err_exit) |
| Count out and read in 2-D data of the initial fluid variable 'sfv' using function 'flu_var_init()'. If the initial data file does not exist, 'err_exit=1' means the program exits, while 'err_exit=0' means the program continues. 更多... | |
函数 | |
| static double * | flu_var_init (const char *add, FILE *fp) |
| This function count out and read in 2-D data file with (line*column) data and initialize pointer to these data. 更多... | |
| struct flu_var | initialize_2D (const char *name, int *N, int *N_plot, double *time_plot[]) |
| This function reads the 2-D initial data file of density/velocity/pressure. 更多... | |
This is a set of functions which control the read-in of two-dimensional data.
在文件 file_2D_in.c 中定义.
| #define N_MAX_2D 5 |
The maximum number of 2-D data dimension storing fluid variables in memory.
在文件 file_2D_in.c 第 17 行定义.
| #define STR_FLU_INI | ( | sfv, | |
| err_exit | |||
| ) |
Count out and read in 2-D data of the initial fluid variable 'sfv' using function 'flu_var_init()'. If the initial data file does not exist, 'err_exit=1' means the program exits, while 'err_exit=0' means the program continues.
在文件 file_2D_in.c 第 75 行定义.
|
static |
This function count out and read in 2-D data file with (line*column) data and initialize pointer to these data.
The value of (line*column) is stored in config[3]; the value (line) number is stored in config[13]; the value (column) number is stored in config[14];
| [in] | add | Adress of the initial data file. |
| [in] | fp | Pointer to the input data file. |
在文件 file_2D_in.c 第 28 行定义.
| struct flu_var initialize_2D | ( | const char * | name, |
| int * | N, | ||
| int * | N_plot, | ||
| double * | time_plot[] | ||
| ) |
This function reads the 2-D initial data file of density/velocity/pressure.
The function initialize the extern pointer FV0.RHO/U/V/P pointing to the position of a block of memory consisting (line*column) variables* of type double. These (line*column) variables are the initial value.
| [in] | name | Name of the test example. |
| [in] | N | Pointer to the number of 2-D data dimension storing fluid variables in memory. |
| [out] | N_plot | Pointer to the number of time steps for plotting. |
| [out] | time_plot | Pointer to the array of the plotting time recording. |
在文件 file_2D_in.c 第 119 行定义.