OpenLB 1.7
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>
42 static auto construct(Vector<int,D> n) {
43 return constructConcreteDynamicsForNormal<T,DESCRIPTOR,ConcreteDynamics>(n);
44 }
45};
46
47//constructs DYNAMICS with template args MixinDynamics, Momenta and normal values
48template <
49 typename T, typename DESCRIPTOR,
50 template <typename,typename,typename,typename,int...> typename DYNAMICS,
51 typename MIXIN,
52 typename MOMENTA
53>
55 template <int... Normal>
56 using ConcreteDynamics = DYNAMICS<T,DESCRIPTOR,MIXIN,MOMENTA,Normal...>;
57
58 template <unsigned D>
59 static auto construct(Vector<int,D> n) {
60 return constructConcreteDynamicsForNormal<T,DESCRIPTOR,ConcreteDynamics>(n);
61 }
62};
63
64//constructs Dynamics with template args Mixindynamics and Momenta which expects normal values
65template <
66 typename T, typename DESCRIPTOR,
67 template <typename,typename,typename,typename> typename DYNAMICS,
68 typename MIXIN,
69 template <int...> typename MOMENTA
70>
72 template <int... Normal>
73 using ConcreteDynamics = DYNAMICS<T,DESCRIPTOR,MIXIN,MOMENTA<Normal...>>;
74
75 template <unsigned D>
76 static auto construct(Vector<int,D> n) {
77 return constructConcreteDynamicsForNormal<T,DESCRIPTOR,ConcreteDynamics>(n);
78 }
79};
80
81//constructs Dynamics with template args MixinDynamics, Momenta, direction, and orientation
82template <
83 typename T, typename DESCRIPTOR,
84 template<typename,typename,typename,typename,int,int> typename DYNAMICS,
85 typename MIXIN,
86 typename MOMENTA
87>
89 template <int direction, int orientation>
90 using ConcreteDynamics = DYNAMICS<T,DESCRIPTOR,MIXIN,MOMENTA,direction,orientation>;
91
92 template <unsigned D>
93 static auto construct(Vector<int,D> n) {
94 return constructConcreteDynamicsForDirectionOrientation<T,DESCRIPTOR,ConcreteDynamics>(n);
95 }
96};
97
98}//namespace boundaryhelper
99
100}//namespace olb
101
102#endif
103
Plain old scalar vector.
Definition vector.h:47
Top level namespace for all of OpenLB.
DYNAMICS< T, DESCRIPTOR, MIXIN, MOMENTA, direction, orientation > ConcreteDynamics
DYNAMICS< T, DESCRIPTOR, MOMENTA, Normal... > ConcreteDynamics
DYNAMICS< T, DESCRIPTOR, MIXIN, MOMENTA, Normal... > ConcreteDynamics
DYNAMICS< T, DESCRIPTOR, MIXIN, MOMENTA< Normal... > > ConcreteDynamics