OpenLB 1.7
Loading...
Searching...
No Matches
latticeDescriptors.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2019 Adrian Kummerlaender
4 * E-mail contact: info@openlb.net
5 * The most recent release of OpenLB can be downloaded at
6 * <http://www.openlb.net/>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22*/
23
30#ifndef LATTICE_DESCRIPTORS_H
31#define LATTICE_DESCRIPTORS_H
32
33#include "descriptorBase.h"
34#include "descriptorField.h"
35#include "descriptorFunction.h"
36
37namespace olb {
38
40
51namespace descriptors {
52
53
55template <typename... FIELDS>
56struct D2Q9 : public LATTICE_DESCRIPTOR<2,9,POPULATION,FIELDS...> {
57 D2Q9() = delete;
58};
59
60namespace data {
61
62template <>
64
65template <>
67 { 0, 0},
68 {-1, 1}, {-1, 0}, {-1,-1}, { 0,-1},
69 { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}
70};
71
72template <>
74 0, 5, 6, 7, 8, 1, 2, 3, 4
75};
76
77template <>
79 {4, 9}, {1, 36}, {1, 9}, {1, 36}, {1, 9},
80 {1, 36}, {1, 9}, {1, 36}, {1, 9}
81};
82
83template <>
85
86}
87
88
90template <typename... FIELDS>
91struct D2Q5 : public LATTICE_DESCRIPTOR<2,5,POPULATION,FIELDS...> {
92 D2Q5() = delete;
93};
94
95namespace data {
96
97template <>
99
100template <>
102 { 0, 0},
103 {-1, 0}, {0, -1}, {1,0}, { 0,1}
104};
105
106template <>
108 0, 3, 4, 1, 2
109};
110
111template <>
113 {1, 3},
114 {1, 6}, {1, 6},
115 {1, 6}, {1, 6}
116};
117
118template <>
120
121}
122
123
125template <typename... FIELDS>
126struct D3Q19 : public LATTICE_DESCRIPTOR<3,19,POPULATION,FIELDS...> {
127 D3Q19() = delete;
128};
129
130namespace data {
131
132template <>
134
135template <>
137 { 0, 0, 0},
138
139 {-1, 0, 0}, { 0,-1, 0}, { 0, 0,-1},
140 {-1,-1, 0}, {-1, 1, 0}, {-1, 0,-1},
141 {-1, 0, 1}, { 0,-1,-1}, { 0,-1, 1},
142
143 { 1, 0, 0}, { 0, 1, 0}, { 0, 0, 1},
144 { 1, 1, 0}, { 1,-1, 0}, { 1, 0, 1},
145 { 1, 0,-1}, { 0, 1, 1}, { 0, 1,-1}
146};
147
148template <>
150 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9
151};
152
153template <>
155 {1, 3},
156
157 {1, 18}, {1, 18}, {1, 18},
158 {1, 36}, {1, 36}, {1, 36},
159 {1, 36}, {1, 36}, {1, 36},
160
161 {1, 18}, {1, 18}, {1, 18},
162 {1, 36}, {1, 36}, {1, 36},
163 {1, 36}, {1, 36}, {1, 36}
164};
165
166template <>
168
169}
170
171
173template <typename... FIELDS>
174struct D3Q7 : public LATTICE_DESCRIPTOR<3,7,POPULATION,FIELDS...> {
175 D3Q7() = delete;
176};
177
178namespace data {
179
180template <>
182
183template <>
185 { 0, 0, 0},
186
187 {-1, 0, 0}, {0,-1, 0},
188 { 0, 0,-1}, {1, 0, 0},
189 { 0, 1, 0}, {0, 0, 1},
190};
191
192template <>
194 0, 4, 5, 6, 1, 2, 3
195};
196
197template <>
199
200template <>
202 {1, 4},
203
204 {1, 8}, {1, 8}, {1, 8},
205 {1, 8}, {1, 8}, {1, 8}
206};
207
208}
209
210
212template <typename... FIELDS>
213struct D3Q13 : public LATTICE_DESCRIPTOR<3,13,POPULATION,FIELDS...> {
214 D3Q13() = delete;
215};
216
217namespace data {
218
219template <>
221
222template <>
224 { 0, 0, 0},
225
226 {-1,-1, 0}, {-1, 1, 0}, {-1, 0,-1},
227 {-1, 0, 1}, { 0,-1,-1}, { 0,-1, 1},
228
229 { 1, 1, 0}, { 1,-1, 0}, { 1, 0, 1},
230 { 1, 0,-1}, { 0, 1, 1}, { 0, 1,-1}
231};
232
233template <>
235 0, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6
236};
237
238template <>
240
241template <>
243 {1, 2},
244
245 {1, 24}, {1, 24}, {1, 24},
246 {1, 24}, {1, 24}, {1, 24},
247
248 {1, 24}, {1, 24}, {1, 24},
249 {1, 24}, {1, 24}, {1, 24}
250};
251
252template <>
254
255template <>
257
258}
259
260
262template <typename... FIELDS>
263struct D3Q15 : public LATTICE_DESCRIPTOR<3,15,POPULATION,FIELDS...> {
264 D3Q15() = delete;
265};
266
267namespace data {
268
269template <>
271
272template <>
274 { 0, 0, 0},
275
276 {-1, 0, 0}, { 0,-1, 0}, { 0, 0,-1},
277 {-1,-1,-1}, {-1,-1, 1}, {-1, 1,-1}, {-1, 1, 1},
278
279 { 1, 0, 0}, { 0, 1, 0}, { 0, 0, 1},
280 { 1, 1, 1}, { 1, 1,-1}, { 1,-1, 1}, { 1,-1,-1}
281};
282
283template <>
285 0, 8, 9, 10, 11, 12, 13, 14, 1, 2, 3, 4, 5, 6, 7
286};
287
288template <>
290
291template <>
293 {2, 9},
294
295 {1, 9}, {1, 9}, {1, 9},
296 {1, 72}, {1, 72}, {1, 72}, {1, 72},
297
298 {1, 9}, {1, 9}, {1, 9},
299 {1, 72}, {1, 72}, {1, 72}, {1, 72}
300};
301
302}
303
304
306template <typename... FIELDS>
307struct D3Q27 : public LATTICE_DESCRIPTOR<3,27,POPULATION,FIELDS...> {
308 D3Q27() = delete;
309};
310
311namespace data {
312
313template <>
315
316template <>
318 { 0, 0, 0},
319
320 {-1, 0, 0}, { 0,-1, 0}, { 0, 0,-1},
321 {-1,-1, 0}, {-1, 1, 0}, {-1, 0,-1},
322 {-1, 0, 1}, { 0,-1,-1}, { 0,-1, 1},
323 {-1,-1,-1}, {-1,-1, 1}, {-1, 1,-1}, {-1, 1, 1},
324
325 { 1, 0, 0}, { 0, 1, 0}, { 0, 0, 1},
326 { 1, 1, 0}, { 1,-1, 0}, { 1, 0, 1},
327 { 1, 0,-1}, { 0, 1, 1}, { 0, 1,-1},
328 { 1, 1, 1}, { 1, 1,-1}, { 1,-1, 1}, { 1,-1,-1}
329};
330
331template <>
333 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
334 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
335};
336
337template <>
339
340template <>
342 {8, 27},
343
344 {2, 27}, {2, 27}, {2, 27},
345 {1, 54}, {1, 54}, {1, 54},
346 {1, 54}, {1, 54}, {1, 54},
347 {1, 216}, {1, 216}, {1, 216}, {1, 216},
348
349 {2, 27}, {2, 27}, {2, 27},
350 {1, 54}, {1, 54}, {1, 54},
351 {1, 54}, {1, 54}, {1, 54},
352 {1, 216}, {1, 216}, {1, 216}, {1, 216}
353};
354
355}
356
357
358} // namespace descriptors
359
360} // namespace olb
361
362#endif
Floating-point independent fraction type.
Definition fraction.h:34
platform_constant_definition int c< 3, 19 >[19][3]
platform_constant_definition Fraction cs2< 2, 9 >
platform_constant_definition int opposite< 2, 5 >[5]
platform_constant_definition Fraction cs2< 3, 19 >
platform_constant_definition int opposite< 2, 9 >[9]
platform_constant_definition int vicinity< 3, 27 >
platform_constant_definition Fraction t< 3, 19 >[19]
platform_constant_definition int c< 3, 15 >[15][3]
platform_constant_definition int vicinity< 2, 9 >
platform_constant_definition Fraction lambda_e< 3, 13 >
platform_constant_definition Fraction lambda_h< 3, 13 >
platform_constant_definition int opposite< 3, 15 >[15]
platform_constant_definition int vicinity< 3, 15 >
platform_constant_definition int vicinity< 3, 7 >
platform_constant_definition int c< 2, 5 >[5][2]
platform_constant_definition int vicinity< 3, 19 >
platform_constant_definition int opposite< 3, 7 >[7]
platform_constant_definition Fraction cs2< 3, 13 >
platform_constant_definition Fraction t< 3, 27 >[27]
platform_constant_definition int opposite< 3, 27 >[27]
platform_constant_definition int vicinity< 3, 13 >
platform_constant_definition int c< 2, 9 >[9][2]
platform_constant_definition Fraction cs2< 3, 15 >
platform_constant_definition int opposite< 3, 13 >[13]
platform_constant_definition Fraction t< 3, 13 >[13]
platform_constant_definition Fraction cs2< 3, 27 >
platform_constant_definition Fraction t< 3, 7 >[7]
platform_constant_definition Fraction t< 2, 5 >[5]
platform_constant_definition Fraction cs2< 3, 7 >
platform_constant_definition int c< 3, 27 >[27][3]
platform_constant_definition int c< 3, 13 >[13][3]
platform_constant_definition int vicinity< 2, 5 >
platform_constant_definition int c< 3, 7 >[7][3]
platform_constant_definition Fraction t< 3, 15 >[15]
platform_constant_definition Fraction cs2< 2, 5 >
platform_constant_definition Fraction t< 2, 9 >[9]
platform_constant_definition int opposite< 3, 19 >[19]
Top level namespace for all of OpenLB.
#define platform_constant_definition
Definition platform.h:80
Base descriptor of a D-dimensional lattice with Q directions and a list of additional fields.