HydroCODE_1D 0.1
This is a implementation of fully explict forward Euler scheme for 1-D Euler equations of motion on Lagrangian/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 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 1-D Lagrangian/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 { \
CV.v = (double **)malloc(N * sizeof(double *)); \
if(CV.v == NULL) \
{ \
printf("NOT enough memory! %s\n", #v); \
retval = 5; \
goto return_NULL; \
} \
CV.v[0] = FV0.v; \
for(k = 1; k < N; ++k) \
{ \
CV.v[k] = (double *)malloc(m * sizeof(double)); \
if(CV.v[k] == NULL) \
{ \
printf("NOT enough memory! %s[%d]\n", #v, k); \
retval = 5; \
goto return_NULL; \
} \
} \
} while (0)

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

在文件 hydrocode.c116 行定义.

◆ HDF5PLOT

#define HDF5PLOT

Switch whether to plot with HDF5 data.

在文件 hydrocode.c108 行定义.

◆ NODATPLOT

#define NODATPLOT

Switch whether to plot without Matrix data.

在文件 hydrocode.c103 行定义.

函数说明

◆ main()

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

This is the main function which constructs the main structure of the 1-D Lagrangian/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]: Lagrangian/Eulerian coordinate framework (= LAG or EUL).
  • argv[5,6,…]: Configuration supplement config[n]=(double)C (= n=C).
返回
Program exit status code.

在文件 hydrocode.c150 行定义.

函数调用图:

变量说明

◆ config

double config[N_CONF]

Initial configuration data array.

在文件 hydrocode.c111 行定义.