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
58// #define USE_CUDA
59// #undef USE_CUDA
60
61// далее -- технические "обертки" под CUDA
62
63#define CUDA_ENABLE(a) a
64#define CUDA_DISABLE(a)
65
66#if defined(USE_CUDA)
67#define CUDAdef CUDA_ENABLE
68#else
69#define CUDAdef CUDA_DISABLE
70#endif
71
72#define IFCUDA_(e, a) e(a)
73#define IFCUDA(...) IFCUDA_(CUDAdef, __VA_ARGS__)
74
75
76#define CUBLOCK (128)
77#define INC_VORT_DEV (1024 * 100)
78
79#define CU_I1I2
80#define CU_RHS
81#define CU_I0I3
82#define CU_CONV_TOWAKE
83#define CU_CONV_TOBOU
84#define CU_CONVVIRT
85#define CU_PAIRS
86#define CU_VP
87
88#define orderAlignment 16
89
90
91
92#define idpid (0.15915494309189533576888376337251)
93#define valPi (3.1415926535897932384626433832795)
94#define valPif (3.14159265f)
95
96
97#define codeLength 14
98#define twoPowCodeLength (1 << codeLength)
99#define rbound (1 - (double)1.0 / twoPowCodeLength)
100
101//for tree
102#define FACTORgab 6
103#define THREADSgab 32
104
105#define FACTORupward 4
106#define THREADSupward 32
107
108#define FACTORforces 1
109#define THREADSforces 1024
110
111#define FACTORrhs 1
112#define maxTHREADSrhs 1024
113
114#define FACTORpanToPoint 1
115#define THREADSpanToPoint 1024
116
117#define FACTORnear 1
118#define THREADSnear 32
119
120#define FACTORsegintersect 1
121#define THREADSsegintersect 32
122
123#define THREADSslae 32
124#define FACTORslae 1
125
126#define maxTHREADSslae 1024
127
128#define THREADSI1I2 32
129#define THREADSI0I3 32
130
131#define FACTORI1I2 1
132#define FACTORI0I3 1
133
134
135
136
137//Характеристики дерева
138enum class tree_T
139{
140 contr, //контрольное
141 aux, //вспомогательное
142 vortex, source //влияющее
143};
144
145enum class object_T
146{
148};
149
150enum class scheme_T
151{
153};
154
155#endif
object_T
Definition Gpudefs.h:146
tree_T
Definition Gpudefs.h:139
scheme_T
Definition Gpudefs.h:151