VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
Gpudefs.h
Go to the documentation of this file.
1/*--------------------------------*- VM2D -*-----------------*---------------*\
2| ## ## ## ## #### ##### | | Version 1.14 |
3| ## ## ### ### ## ## ## ## | VM2D: Vortex Method | 2026/03/06 |
4| ## ## ## # ## ## ## ## | for 2D Flow Simulation *----------------*
5| #### ## ## ## ## ## | Open Source Code |
6| ## ## ## ###### ##### | https://www.github.com/vortexmethods/VM2D |
7| |
8| Copyright (C) 2017-2026 I. Marchevsky, K. Sokol, E. Ryatina, A. Kolganova |
9*-----------------------------------------------------------------------------*
10| File name: Gpudefs.h |
11| Info: Source code of VM2D |
12| |
13| This file is part of VM2D. |
14| VM2D is free software: you can redistribute it and/or modify it |
15| under the terms of the GNU General Public License as published by |
16| the Free Software Foundation, either version 3 of the License, or |
17| (at your option) any later version. |
18| |
19| VM2D is distributed in the hope that it will be useful, but WITHOUT |
20| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
21| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
22| for more details. |
23| |
24| You should have received a copy of the GNU General Public License |
25| along with VM2D. If not, see <http://www.gnu.org/licenses/>. |
26\*---------------------------------------------------------------------------*/
27
28
40#ifndef GPUDEFS_H
41#define GPUDEFS_H
42
44//#define LAMBVORTEX
45
47#define INITIAL
48
50//#define BRIDGE
51
52//#define TURB
53//#define SPH
54
55//#define OPTIMIZER
56//#define OPTIMIZER_START_STEP 10000
57//#define OPTIMIZER_STOP_STEP 12000
58
64// #define USE_CUDA
65// #undef USE_CUDA
66
67// далее -- технические "обертки" под CUDA
68
69#define CUDA_ENABLE(a) a
70#define CUDA_DISABLE(a)
71
72#if defined(USE_CUDA)
73#define CUDAdef CUDA_ENABLE
74#else
75#define CUDAdef CUDA_DISABLE
76#endif
77
78#define IFCUDA_(e, a) e(a)
79#define IFCUDA(...) IFCUDA_(CUDAdef, __VA_ARGS__)
80
81
82#define CUBLOCK (128)
83#define INC_VORT_DEV (1024 * 100)
84
85#define CU_I1I2
86#define CU_RHS
87#define CU_I0I3
88#define CU_CONV_TOWAKE
89#define CU_CONV_TOBOU
90#define CU_CONVVIRT
91#define CU_PAIRS
92#define CU_VP
93
94#define orderAlignment 16
95
96#define idpid (0.15915494309189533576888376337251)
97#define valPi (3.1415926535897932384626433832795)
98#define valPif (3.14159265f)
99
100
101#define codeLength 14
102#define twoPowCodeLength (1 << codeLength)
103#define rbound (1 - (double)1.0 / twoPowCodeLength)
104
105//for tree
106#define THREADS1024 1024
107#define FACTOR1 1
108
109
110#define FACTORgab 6
111#define THREADSgab 32
112
113#define FACTORupward 4
114#define THREADSupward 32
115
116#define FACTORforces 1
117//#define THREADSforces 1024
118
119#define FACTORrhs 1
120#define maxTHREADSrhs 1024
121
122#define FACTORpanToPoint 1
123#define THREADSpanToPoint 1024
124
125#define FACTORnear 1
126#define THREADSnear 32
127
128#define FACTORsegintersect 1
129#define THREADSsegintersect 32
130
131#define THREADSslae 32
132#define FACTORslae 1
133
134#define maxTHREADSslae 1024
135
136#define THREADSI1I2 32
137#define THREADSI0I3 32
138
139#define FACTORI1I2 1
140#define FACTORI0I3 1
141
142const double ifac[] = { 0.0, 1.0, 1.0, 1.0 / 2.0, 1.0 / 6.0, 1.0 / 24.0, 1.0 / 120.0, 1.0 / 720.0, 1.0 / 5040.0, 1.0 / 40320.0, 1.0 / 362880.0, 1.0 / 3628800.0, 1.0 / 39916800.0, 1.0 / 479001600.0, 1.0 / 6227020800.0, 1.0 / 87178291200.0 };
143
144//Характеристики дерева
145enum class tree_T
146{
147 contr, //контрольное
148 aux, //вспомогательное
149 vortex, source //влияющее
150};
151
152enum class object_T
153{
155};
156
157enum class scheme_T
158{
160};
161
162#endif
const double ifac[]
Definition Gpudefs.h:142
object_T
Definition Gpudefs.h:153
tree_T
Definition Gpudefs.h:146
scheme_T
Definition Gpudefs.h:158