HydroCODE_2D 0.1
This is a implementation of fully explict forward Euler scheme for 2-D Euler equations of motion on Eulerian coordinate
hydrocode.c 文件参考

This is a C file of the main function. 更多...

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "../include/var_struc.h"
#include "../include/file_io.h"
#include "../include/finite_volume.h"
hydrocode.c 的引用(Include)关系图:

浏览源代码.

宏定义

#define NODATPLOT
 Switch whether to plot without Matrix data. 更多...
 
#define HDF5PLOT
 Switch whether to plot with HDF5 data. 更多...
 
#define NOTECPLOT
 Switch whether to plot without Tecplot data. 更多...
 
#define CV_INIT_MEM(v, N)
 N memory allocations to the initial fluid variable 'v' in the structure cell_var_stru. 更多...
 

函数

int main (int argc, char *argv[])
 This is the main function which constructs the main structure of the 2-D Eulerian hydrocode. 更多...
 

变量

double config [N_CONF]
 Initial configuration data array. 更多...
 

详细描述

This is a C file of the main function.

在文件 hydrocode.c 中定义.

宏定义说明

◆ CV_INIT_MEM

#define CV_INIT_MEM (   v,
 
)
值:
do { \
for(k = 0; k < N; ++k) \
{ \
CV[k].v = (double **)malloc(n_x * sizeof(double *)); \
if(CV[k].v == NULL) \
{ \
printf("NOT enough memory! CV[%d].%s\n", k, #v); \
retval = 5; \
goto return_NULL; \
} \
for(j = 0; j < n_x; ++j) \
{ \
CV[k].v[j] = (double *)malloc(n_y * sizeof(double)); \
if(CV[k].v[j] == NULL) \
{ \
printf("NOT enough memory! CV[%d].%s[%d]\n", k, #v, j); \
retval = 5; \
goto return_NULL; \
} \
} \
} \
} while (0)

N memory allocations to the initial fluid variable 'v' in the structure cell_var_stru.

在文件 hydrocode.c128 行定义.

◆ HDF5PLOT

#define HDF5PLOT

Switch whether to plot with HDF5 data.

在文件 hydrocode.c115 行定义.

◆ NODATPLOT

#define NODATPLOT

Switch whether to plot without Matrix data.

在文件 hydrocode.c110 行定义.

◆ NOTECPLOT

#define NOTECPLOT

Switch whether to plot without Tecplot data.

在文件 hydrocode.c120 行定义.

函数说明

◆ main()

int main ( int  argc,
char *  argv[] 
)

This is the main function which constructs the main structure of the 2-D Eulerian hydrocode.

参数
[in]argcARGument Counter.
[in]argvARGument Values.
  • argv[1]: Folder name of test example (input path).
  • argv[2]: Folder name of numerical results (output path).
  • argv[3]: Order of numerical scheme[_scheme name] (= 1[_Riemann_exact] or 2[_GRP]).
  • argv[4]: Eulerian coordinate framework (= EUL).
  • argv[5,6,…]: Configuration supplement config[n]=(double)C (= n=C).
返回
Program exit status code.

在文件 hydrocode.c164 行定义.

函数调用图:

变量说明

◆ config

double config[N_CONF]

Initial configuration data array.

在文件 hydrocode.c123 行定义.