HydroCODE_2D 0.1
This is a implementation of fully explict forward Euler scheme for 2-D Euler equations of motion on Eulerian coordinate
file_io.h
浏览该文件的文档.
1
7#ifndef FILEIO_H
8#define FILEIO_H
9
11// io_control.c
13void example_io(const char * example, char * add_mkdir, const int i_or_o);
14
15int flu_var_count (FILE * fp, const char * add);
16int flu_var_count_line(FILE * fp, const char * add, int * n_x);
17
18int flu_var_read(FILE * fp, double * U, const int num);
19
20int time_plot_read(const char * add_in, const int N_max, int * N_plot, double * time_plot[]);
21
23// terminal_io.c
25void arg_preprocess(const int argc_least, const int argc, char *argv[], char * scheme);
26
28// config_handle.c
30void configurate(const char * name);
31
32void config_write(const char * add_out, const double * cpu_time, const char * name);
33
35// file_1D_in.c
37struct flu_var initialize_1D(const char * name, int * N, int * N_plot, double * time_plot[]);
39// file_2D_in.c
41struct flu_var initialize_2D(const char * name, int * N, int * N_plot, double * time_plot[]);
42
44// file_1D_out.c
46void file_1D_write (const int m, const int N, const struct cell_var_stru CV,
47 double * X[], const double * cpu_time, const char * problem, const double time_plot[]);
49// file_2D_out.c
51void file_2D_write (const int n_x, const int n_y, const int N, const struct cell_var_stru CV[],
52 double ** X, double ** Y, const double * cpu_time, const char * problem, const double time_plot[]);
53void file_2D_write_POINT_TEC(const int n_x, const int n_y, const int N, const struct cell_var_stru CV[],
54 double ** X, double ** Y, const double * cpu_time, const char * problem, const double time_plot[]);
55
57// file_out_hdf5.c
59void file_1D_write_HDF5(const int m, const int N, const struct cell_var_stru CV,
60 double * X[], const double * cpu_time, const char * problem, double time_plot[]);
61void file_2D_write_HDF5(const int n_x, const int n_y, const int N, const struct cell_var_stru CV[],
62 double ** X, double ** Y, const double * cpu_time, const char * problem, double time_plot[]);
63
65// file_radial_out.c
67void file_radial_write_TEC(const struct flu_var FV, const double * R, const char * problem, const double time);
68
70// file_2D_unstruct_out.c
72void file_write_2D_BLOCK_TEC(const struct flu_var FV, const struct mesh_var mv, const char * problem, const double time);
73void file_write_3D_VTK (const struct flu_var FV, const struct mesh_var mv, const char * problem, const double time);
74
75#endif
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.
Definition: file_2D_in.c:119
void file_1D_write_HDF5(const int m, const int N, const struct cell_var_stru CV, double *X[], const double *cpu_time, const char *problem, double time_plot[])
This function write the 1-D solution into HDF5 output '.h5' files.
Definition: file_out_hdf5.c:54
void file_2D_write_HDF5(const int n_x, const int n_y, const int N, const struct cell_var_stru CV[], double **X, double **Y, const double *cpu_time, const char *problem, double time_plot[])
This function write the 2-D solution into HDF5 output '.h5' files.
void file_2D_write(const int n_x, const int n_y, const int N, const struct cell_var_stru CV[], double **X, double **Y, const double *cpu_time, const char *problem, const double time_plot[])
This function write the 2-D solution into output '.dat' files.
Definition: file_2D_out.c:55
int flu_var_read(FILE *fp, double *U, const int num)
This function reads the initial data file to generate the initial data.
Definition: io_control.c:221
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.
Definition: io_control.c:163
void file_1D_write(const int m, const int N, const struct cell_var_stru CV, double *X[], const double *cpu_time, const char *problem, const double time_plot[])
void config_write(const char *add_out, const double *cpu_time, const char *name)
This function write configuration data and program record into the file 'log.dat'.
void arg_preprocess(const int argc_least, const int argc, char *argv[], char *scheme)
This is a functions preprocesses ARGuments.
Definition: terminal_io.c:26
void example_io(const char *example, char *add_mkdir, const int i_or_o)
This function produces folder path for data input or output.
Definition: io_control.c:40
int flu_var_count(FILE *fp, const char *add)
This function counts how many numbers are there in the initial data file.
Definition: io_control.c:124
void configurate(const char *name)
This function controls configuration data reading and validation.
void file_2D_write_POINT_TEC(const int n_x, const int n_y, const int N, const struct cell_var_stru CV[], double **X, double **Y, const double *cpu_time, const char *problem, const double time_plot[])
This function write the 2-D solution into Tecplot output files with point data.
Definition: file_2D_out.c:103
void file_write_3D_VTK(const struct flu_var FV, const struct mesh_var mv, const char *problem, const double time)
void file_radial_write_TEC(const struct flu_var FV, const double *R, const char *problem, const double time)
void file_write_2D_BLOCK_TEC(const struct flu_var FV, const struct mesh_var mv, const char *problem, const double time)
struct flu_var initialize_1D(const char *name, int *N, int *N_plot, double *time_plot[])
int time_plot_read(const char *add_in, const int N_max, int *N_plot, double *time_plot[])
This function reads the time data file for plotting 'time_plot.dat' and initialize tha array 'time_pl...
Definition: io_control.c:288
pointer structure of VARiables on STRUctural computational grid CELLs.
Definition: var_struc.h:61
pointer structure of FLUid VARiables array.
Definition: var_struc.h:48
MESHing VARiables.
Definition: var_struc.h:155