HydroCODE 0.1
This is a implementation of fully explict forward Euler scheme for 1-D Euler equations of motion on Lagrange coordinate
file_io.h 文件参考

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'.

函数说明

◆ _1D_file_write()

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.

注解
It is quite simple so there will be no more comments.
参数
[in]mThe number of spatial points in the output data.
[in]NThe number of time steps in the output data.
[in]CVStructural body of grid variable data.
[in]X[]Array of the coordinate data.
[in]cpu_timeArray of the CPU time recording.
[in]nameName of the numerical results.
函数调用图:
这是这个函数的调用关系图:

◆ _1D_initialize()

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]nameName of the test example.
[out]FV0Structural body pointer of initial data array pointer.
函数调用图:
这是这个函数的调用关系图:

◆ configurate()

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_inAdress of the initial data folder of the test example.
函数调用图:
这是这个函数的调用关系图:

◆ example_io()

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]exampleName of the test example/numerical results.
[out]add_mkdirFolder path for data input or output.
[in]i_or_oConversion parameters for data input/output.
  • 0: data output.
  • else (e.g. 1): data input.
函数调用图:
这是这个函数的调用关系图:

◆ flu_var_count()

int flu_var_count ( FILE *  fp,
const char *  add 
)

This function counts how many numbers are there in the initial data file.

参数
[in]fpThe pointer to the input file.
[in]addThe address of the input file.
返回
The number of the numbers in the initial data file.
返回值
-1If the given number of column is not coincided with that in the data file.