forked from OpenCFD-IMECH/OpenCFD-SCU
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opencfd.c
66 lines (48 loc) · 1.48 KB
/
opencfd.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//----------------------------------------------------------------------------------------------------------------------------------------
// OpenCFD-SC , 3-D compressible Navier-Stokes Finite difference Solver
// Copyright by LI Xinliang, LHD, Institute of Mechanics, CAS, Email: [email protected]
//
// The default code is double precision computation
// If you want to use SINGLE PRECISION computation, you can change "OCFD_REAL_KIND=8" to "OCFD_REAL_KIND=4" ,
// and "OCFD_DATA_TYPE=MPI_DOUBLE_PRECISION" to "OCFD_DATA_TYPE=MPI_REAL" in the file OpenCFD.h
//----------------------------------------------------------------------------------------------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include "mpi.h"
#include "utility.h"
#include "parameters.h"
#include "OCFD_NS_Solver.h"
#include "OCFD_mpi.h"
#include "OCFD_init.h"
#include "cuda_commen.h"
#include "OCFD_mpi_dev.h"
#include "OCFD_filtering.h"
#ifdef PROFILING
#include <cuda_profiler_api.h>
#endif
#ifdef __cplusplus
extern "C"{
#endif
int main(int argc, char *argv[]){
mpi_init(&argc , &argv);
read_parameters();
opencfd_mem_init_mpi();
part();
set_para_filtering();
opencfd_mem_init_all();
cuda_commen_init();
init();
#ifdef PROFILING
cudaProfilerStart();
#endif
NS_solver_real();
#ifdef PROFILING
cudaProfilerStop();
#endif
opencfd_mem_finalize_all();
mpi_finalize();
return 0;
}
#ifdef __cplusplus
}
#endif