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_2D_out.c 文件参考

This is a set of functions which control the readout of two-dimensional data. 更多...

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

浏览源代码.

宏定义

#define PRINT_NC(v, v_print)
 Print out fluid variable 'v' with array data element 'v_print'. 更多...
 

函数

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. 更多...
 
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. 更多...
 

详细描述

This is a set of functions which control the readout of two-dimensional data.

在文件 file_2D_out.c 中定义.

宏定义说明

◆ PRINT_NC

#define PRINT_NC (   v,
  v_print 
)
值:
do { \
strcpy(file_data, add_out); \
strcat(file_data, #v); \
strcat(file_data, ".dat"); \
if((fp_write = fopen(file_data, "w")) == NULL) \
{ \
printf("Cannot open solution output file: %s!\n", #v); \
exit(1); \
} \
for(k = 0; k < N; ++k) \
{ \
for(i = 0; i < n_y; ++i) \
{ \
for(j = 0; j < n_x; ++j) \
fprintf(fp_write, "%.10g\t", (v_print)); \
fprintf(fp_write, "\n"); \
} \
fprintf(fp_write, "\n\n"); \
} \
fclose(fp_write); \
} while (0)

Print out fluid variable 'v' with array data element 'v_print'.

在文件 file_2D_out.c19 行定义.

函数说明

◆ file_2D_write()

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.

注解
It is quite simple so there will be no more comments.
参数
[in]n_xThe number of x-spatial points in the output data.
[in]n_yThe number of y-spatial points in the output data.
[in]NThe number of time steps in the output data.
[in]CVStructure of variable data in computational grid cells.
[in]XArray of the x-coordinate data.
[in]YArray of the y-coordinate data.
[in]cpu_timeArray of the CPU time recording.
[in]problemName of the numerical results for the test problem.
[in]time_plotArray of the plotting time recording.

在文件 file_2D_out.c55 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ file_2D_write_POINT_TEC()

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.

参数
[in]n_xThe number of x-spatial points in the output data.
[in]n_yThe number of y-spatial points in the output data.
[in]NThe number of time steps in the output data.
[in]CVStructure of variable data in computational grid cells.
[in]XArray of the x-coordinate data.
[in]YArray of the y-coordinate data.
[in]cpu_timeArray of the CPU time recording.
[in]problemName of the numerical results.
[in]time_plotArray of the plotting time recording.

在文件 file_2D_out.c103 行定义.

函数调用图:
这是这个函数的调用关系图: