OpenLB 1.7
Loading...
Searching...
No Matches
rtlbmDescriptors.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2017-2019 Albert Mink, 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
27#ifndef RTLBM_DESCRIPTORS_H
28#define RTLBM_DESCRIPTORS_H
29
30#include "latticeDescriptors.h"
31#include "utilities/omath.h"
32
33namespace olb {
34
35namespace descriptors {
36
37namespace tag {
38
39struct RTLBM : public CATEGORY, public DESCRIPTOR_TAG { };
40
41}
42
43
44namespace rtlbm_data {
45
47
48template <unsigned D, unsigned Q>
50
51template <unsigned D, unsigned Q>
53
54template <>
56 0,
57 {1, 6}, {1, 6}, {1, 6},
58 {1, 6}, {1, 6}, {1, 6}
59};
60
61template <>
63 0.0,
64 1.0, 1.0, 1.0,
65 1.0, 1.0, 1.0
66};
67
68template <>
70 0,
71 {1, 15}, {1, 15}, {1, 15},
72 {3, 40}, {3, 40}, {3, 40}, {3, 40},
73 {1, 15}, {1, 15}, {1, 15},
74 {3, 40}, {3, 40}, {3, 40}, {3, 40}
75};
76
77template <>
79 0.0,
80 1.0, 1.0, 1.0,
81 1.73205080757, 1.73205080757, 1.73205080757, 1.73205080757,
82 1.0, 1.0, 1.0,
83 1.73205080757, 1.73205080757, 1.73205080757, 1.73205080757
84};
85
86template <>
88 0,
89
90 {1, 21}, {1, 21}, {1, 21},
91 {4, 105}, {4, 105}, {4, 105},
92 {4, 105}, {4, 105}, {4, 105},
93 {9, 280}, {9, 280}, {9, 280}, {9, 280},
94
95 {1, 21}, {1, 21}, {1, 21},
96 {4, 105}, {4, 105}, {4, 105},
97 {4, 105}, {4, 105}, {4, 105},
98 {9, 280}, {9, 280}, {9, 280}, {9, 280}
99};
100
101template <>
103 0.0,
104 1.0, 1.0, 1.0,
105 1.41421356237, 1.41421356237, 1.41421356237,
106 1.41421356237, 1.41421356237, 1.41421356237,
107 1.73205080757, 1.73205080757, 1.73205080757, 1.73205080757,
108 1.0, 1.0, 1.0,
109 1.41421356237, 1.41421356237, 1.41421356237,
110 1.41421356237, 1.41421356237, 1.41421356237,
111 1.73205080757, 1.73205080757, 1.73205080757, 1.73205080757
112};
113
114}
115
116template <typename T, unsigned D, unsigned Q>
117constexpr T t(unsigned iPop, tag::RTLBM)
118{
119 return rtlbm_data::t<D,Q>[iPop].template as<T>();
120}
121
122template <typename T, unsigned D, unsigned Q>
123constexpr T norm_c(unsigned iPop, tag::RTLBM)
124{
125 return T{rtlbm_data::norm_c<D,Q>[iPop]};
126}
127
128template <typename T, typename DESCRIPTOR>
129constexpr T norm_c(unsigned iPop)
130{
131 return norm_c<T, DESCRIPTOR::d, DESCRIPTOR::q>(iPop, typename DESCRIPTOR::category_tag());
132}
133
134} // namespace descriptors
135
136} // namespace olb
137
138#endif
Floating-point independent fraction type.
Definition fraction.h:34
Descriptor for all types of 2D and 3D lattices.
platform_constant Fraction t[Q]
platform_constant_definition Fraction t< 3, 7 >[7]
platform_constant_definition Fraction t< 3, 15 >[15]
platform_constant_definition double norm_c< 3, 27 >[27]
platform_constant double norm_c[Q]
platform_constant_definition double norm_c< 3, 7 >[7]
platform_constant_definition Fraction t< 3, 27 >[27]
platform_constant_definition double norm_c< 3, 15 >[15]
constexpr T t(unsigned iPop, tag::CUM) any_platform
Definition cum.h:69
constexpr T norm_c(unsigned iPop, tag::RTLBM)
Top level namespace for all of OpenLB.
#define platform_constant_definition
Definition platform.h:80
#define platform_constant
Definition platform.h:79
Base of a descriptor tag.
Base of all tags describing the category of a descriptor.