fastm/BHgpu  1.5
Быстрые алгоритмы в вихревых методах моделирования плоских течений
Params.h
См. документацию.
1 /*--------------------------------*- BHgpu -*----------------*---------------*\
2 | ##### ## ## | | Version 1.5 |
3 | ## ## ## ## #### ## ## | BHgpu: Barnes-Hut method | 2023/08/29 |
4 | ##### ###### ## ## ## | for 2D vortex particles *----------------*
5 | ## ## ## ## ## ## ## | Open Source Code |
6 | ##### ## ## #### #### | https://www.github.com/vortexmethods/fastm |
7 | |
8 | Copyright (C) 2020-2023 I. Marchevsky, E. Ryatina, A. Kolganova |
9 | Copyright (C) 2013, Texas State University-San Marcos. All rights reserved. |
10 *-----------------------------------------------------------------------------*
11 | File name: Params.h |
12 | Info: Source code of BHgpu |
13 | |
14 | This file is part of BHgpu. |
15 | BHcu is free software: you can redistribute it and/or modify it |
16 | under the terms of the GNU General Public License as published by |
17 | the Free Software Foundation, either version 3 of the License, or |
18 | (at your option) any later version. |
19 | |
20 | BHcu is distributed in the hope that it will be useful, but WITHOUT |
21 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
22 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
23 | for more details. |
24 | |
25 | You should have received a copy of the GNU General Public License |
26 | along with BHgpu. If not, see <http://www.gnu.org/licenses/>. |
27 \*---------------------------------------------------------------------------*/
28 
39 #ifndef PARAMS_H_
40 #define PARAMS_H_
41 
42 #include <string>
43 
44 namespace BHcu
45 {
47 #define EPS 1e-4
48 
50 //eps = 10^{-3}
51 //#define THETA 1.66 //for 12
52 //#define THETA 2.37 //for 11 <<--optimal
53 //#define THETA 1.47 //for 10
54 
55 //eps = 10^{-5}
56 //#define THETA 1.66 //for 12
57 //#define THETA 1.58 //for 11 <<--optimal
58 //#define THETA 1.47 //for 10
59 
60 //eps = 10^{-7}
61 //#define THETA 1.41 //for 16
62 //#define THETA 1.37 //for 15
63 #define THETA 1.31 //for 14
64 //#define THETA 1.23 //for 13
65 //#define THETA 1.14 //for 12
66 //#define THETA 1.04 //for 11 <<--optimal
67 //#define THETA 0.93 //for 10
68 
69  static const int order = 14; //1-MONOPOLE
70 
71  // Имя файла с задачей
72  static const std::string nameFile = "../../test/Wake/wake2m.txt";
73  // Название задачи для файла с результатом
74  static const std::string task = "2m";
75 
76  //Сравнение с прямым методом
77  static const bool compare = true;
78 
79 
80  //Чтение скоростей по прямому методу из файла (если его нет, он будет посчитан и сохранен)
81  static const bool BSfromFile = true;
82  //Сохранение скоростей по быстрому методу в файл
83  static const bool save = false;
84 
85  //Число повторных запусков кода
86  static const int runs = 10;
87 
88  //Тип данных
89 #define CALCinDOUBLE
90 
91  //Печатать ли полную информацию о device
92  static const bool printFullCUDAinfo = false;
93 
94 
95 
96  //КАК ПРАВИЛО, ПАРАМЕТРЫ НИЖЕ НЕ НУЖНО МЕНЯТЬ
97 
98  static const int dev = 0;
99 
100 #ifdef CALCinFLOAT
101 #define real float
102 #define real2 float2
103 #define real3 float3
104 #define make_real2(x,y) make_float2(x,y)
105 #define realmax fmaxf
106 #define realmin fminf
107 #define realPoint Point2Df
108 #define realVortex Vortex2Df
109 #define intPair long long
110 #endif
111 
112 #ifdef CALCinDOUBLE
113 #define real double
114 #define real2 double2
115 #define real3 double3
116 #define make_real2(x,y) make_double2(x,y)
117 #define realmax max
118 #define realmin min
119 #define realPoint Point2D
120 #define realVortex Vortex2D
121 #define intPair long long
122 #endif
123 
124 }//namespace BHcu
125 
126 #endif
static const std::string nameFile
Definition: Params.h:72
Definition: Logo.h:45
static const int dev
Definition: Params.h:98
static const std::string task
Definition: Params.h:74
static const bool save
Definition: Params.h:83
static const bool BSfromFile
Definition: Params.h:81
static const int order
Definition: Params.h:69
static const int runs
Definition: Params.h:86
static const bool printFullCUDAinfo
Definition: Params.h:92
static const bool compare
Definition: Params.h:77