OpenLB 1.8.1
Loading...
Searching...
No Matches
normalDynamicsContructors.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2021 Lennart Neukamm, 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
24#ifndef NORMAL_DYNAMICS_CONSTRUCTORS_H
25#define NORMAL_DYNAMICS_CONSTRUCTORS_H
26
27namespace olb {
28
29namespace boundaryhelper {
30
31//constructs DYNAMICS normal values and a plain momenta
32template <
33 typename T, typename DESCRIPTOR,
34 template <typename,typename,typename,int...> typename DYNAMICS,
35 typename MOMENTA
36>
38 template <int... Normal>
39 using ConcreteDynamics = DYNAMICS<T,DESCRIPTOR,MOMENTA,Normal...>;
40
41 template <unsigned D>
45};
46
47//constructs Dynamics with template args Momenta, direction, and orientation
48template <
49 typename T, typename DESCRIPTOR,
50 template<typename,typename,typename,int,int> typename DYNAMICS,
51 typename MOMENTA
52>
54 template <int direction, int orientation>
55 using ConcreteDynamics = DYNAMICS<T,DESCRIPTOR,MOMENTA,direction,orientation>;
56
57 template <unsigned D>
61};
62
63//constructs Dynamics with template direction and orientation
64template <
65 typename T, typename DESCRIPTOR,
66 template<typename,typename,int,int> typename DYNAMICS
67>
69 template <int direction, int orientation>
70 using ConcreteDynamics = DYNAMICS<T,DESCRIPTOR,direction,orientation>;
71
72 template <unsigned D>
76};
77
78//constructs DYNAMICS with template args MixinDynamics, Momenta and normal values
79template <
80 typename T, typename DESCRIPTOR,
81 template <typename,typename,typename,typename,int...> typename DYNAMICS,
82 typename MIXIN,
83 typename MOMENTA
84>
86 template <int... Normal>
87 using ConcreteDynamics = DYNAMICS<T,DESCRIPTOR,MIXIN,MOMENTA,Normal...>;
88
89 template <unsigned D>
93};
94
95//constructs Dynamics with template args Mixindynamics and Momenta which expects normal values
96template <
97 typename T, typename DESCRIPTOR,
98 template <typename,typename,typename,typename> typename DYNAMICS,
99 typename MIXIN,
100 template <int...> typename MOMENTA
101>
103 template <int... Normal>
104 using ConcreteDynamics = DYNAMICS<T,DESCRIPTOR,MIXIN,MOMENTA<Normal...>>;
105
106 template <unsigned D>
110};
111
112//constructs Dynamics with template args MixinDynamics, Momenta, direction, and orientation
113template <
114 typename T, typename DESCRIPTOR,
115 template<typename,typename,typename,typename,int,int> typename DYNAMICS,
116 typename MIXIN,
117 typename MOMENTA
118>
120 template <int direction, int orientation>
121 using ConcreteDynamics = DYNAMICS<T,DESCRIPTOR,MIXIN,MOMENTA,direction,orientation>;
122
123 template <unsigned D>
127};
128
129//constructs Dynamics with template args MixinDynamics, Momenta which takes direction, and orientation
130template <
131 typename T, typename DESCRIPTOR,
132 template<typename,typename,typename,typename> typename DYNAMICS,
133 typename MIXIN,
134 template <int,int> typename MOMENTA
135>
137 template <int direction, int orientation>
138 using ConcreteDynamics = DYNAMICS<T,DESCRIPTOR,MIXIN,MOMENTA<direction,orientation>>;
139
140 template <unsigned D>
144};
145
146//constructs DYNAMICS with MixinDynamics, direction, orientation and a Momenta that itself expects a direction and orientation
147template <
148 typename T, typename DESCRIPTOR,
149 template<typename,typename,typename,typename,int,int> typename DYNAMICS,
150 typename MIXIN,
151 template <int,int> typename MOMENTA
152>
154 template <int direction, int orientation>
155 using ConcreteDynamics = DYNAMICS<T,DESCRIPTOR,MIXIN,MOMENTA<direction,orientation>,direction,orientation>;
156
157 template <unsigned D>
161};
162
163//constructs MixinDynamics with a Momenta that expects direction and orientation as template args
164template <
165 typename T, typename DESCRIPTOR,
166 typename MIXIN,
167 template <int,int> typename MOMENTA
168>
170 template <int x, int y>
171 using ConcreteDynamics = typename MIXIN::template exchange_momenta<MOMENTA<x,y>>;
172
173 template <unsigned D>
177};
178
179}
180
181}
182
183#endif
Plain old scalar vector.
DynamicsPromise< T, DESCRIPTOR > constructConcreteDynamicsForDirectionOrientation(Vector< int, 2 > n)
DynamicsPromise< T, DESCRIPTOR > constructConcreteDynamicsForNormal(Vector< int, 2 > n)
Top level namespace for all of OpenLB.
DYNAMICS< T, DESCRIPTOR, MOMENTA, direction, orientation > ConcreteDynamics
DYNAMICS< T, DESCRIPTOR, direction, orientation > ConcreteDynamics
DYNAMICS< T, DESCRIPTOR, MIXIN, MOMENTA< direction, orientation >, direction, orientation > ConcreteDynamics
DYNAMICS< T, DESCRIPTOR, MIXIN, MOMENTA, direction, orientation > ConcreteDynamics
typename MIXIN::template exchange_momenta< MOMENTA< x, y > > ConcreteDynamics
DYNAMICS< T, DESCRIPTOR, MOMENTA, Normal... > ConcreteDynamics
DYNAMICS< T, DESCRIPTOR, MIXIN, MOMENTA, Normal... > ConcreteDynamics
DYNAMICS< T, DESCRIPTOR, MIXIN, MOMENTA< direction, orientation > > ConcreteDynamics
DYNAMICS< T, DESCRIPTOR, MIXIN, MOMENTA< Normal... > > ConcreteDynamics