OpenLB 1.8.1
Loading...
Searching...
No Matches
phaseFieldWall2D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2024 Luiz Eduardo Czelusniak, Tim Bingert
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//This file contains the Phase Field Wall 2D Boundaries
25//This is a new version of the Boundary, which only contains free floating functions
26
27#ifndef OLB_PHASE_FIELD_WALL_2D_H
28#define OLB_PHASE_FIELD_WALL_2D_H
29
30#include "setBoundary.h"
31#include "phaseFieldWall.h"
33
34namespace olb {
35
36namespace boundary {
37
38template <concepts::BaseType T, concepts::LatticeDescriptor DESCRIPTOR, typename MixinDynamics>
39requires (DESCRIPTOR::d == 2)
41
42using value_t = T;
43using descriptor_t = DESCRIPTOR;
44
48
49std::optional<DynamicsPromise<T,DESCRIPTOR>> getDynamics(DiscreteNormalType type,
51 switch (type) {
54
55 default:
56 return std::nullopt;
57 }
58}
59
60std::optional<PostProcessorPromise<T,DESCRIPTOR>> getPostProcessor(DiscreteNormalType type,
62 switch (type) {
65
66 default:
67 return std::nullopt;
68 }
69}
70
71};
72
73template <concepts::BaseType T, concepts::LatticeDescriptor DESCRIPTOR, typename MixinDynamics>
74requires (DESCRIPTOR::d == 2)
110
111template <concepts::BaseType T, concepts::LatticeDescriptor DESCRIPTOR, typename MixinDynamics>
112requires (DESCRIPTOR::d == 2)
114
115 using value_t = T;
116 using descriptor_t = DESCRIPTOR;
117
119 return 1;
120 }
121
122 std::optional<DynamicsPromise<T,DESCRIPTOR>> getDynamics(DiscreteNormalType type,
124 switch (type) {
127
128 default:
129 return std::nullopt;
130 }
131 }
132
133 std::optional<PostProcessorPromise<T,DESCRIPTOR>> getPostProcessor(DiscreteNormalType type,
135 switch (type) {
138
139 default:
140 return std::nullopt;
141 }
142 }
143
144};
145
146template <concepts::BaseType T, concepts::LatticeDescriptor DESCRIPTOR, typename MixinDynamics>
147requires (DESCRIPTOR::d == 2)
148struct FreeEnergyWallMomentum<T,DESCRIPTOR,MixinDynamics> {
149
150using value_t = T;
151using descriptor_t = DESCRIPTOR;
152
154 return 1;
155}
156
157std::optional<DynamicsPromise<T,DESCRIPTOR>> getDynamics(DiscreteNormalType type,
160}
161
166
167};
168
169template <concepts::BaseType T, concepts::LatticeDescriptor DESCRIPTOR, typename MixinDynamics>
170requires (DESCRIPTOR::d == 2)
171struct FreeEnergyWallOrderParameter<T,DESCRIPTOR,MixinDynamics> {
172
173using value_t = T;
174using descriptor_t = DESCRIPTOR;
175
177 return 1;
178}
179
180std::optional<DynamicsPromise<T,DESCRIPTOR>> getDynamics(DiscreteNormalType type,
183}
184
189
190};
191
192/*template <concepts::BaseType T, concepts::LatticeDescriptor DESCRIPTOR, typename MixinDynamics>
193requires (DESCRIPTOR::d == 2)
194struct SignedDistanceBoundary<T,DESCRIPTOR,MixinDynamics> {
195
196using value_t = T;
197using descriptor_t = DESCRIPTOR;
198
199CellDistance getNeighborhoodRadius() {
200 return 1;
201}
202
203std::optional<DynamicsPromise<T,DESCRIPTOR>> getDynamics(DiscreteNormalType type,
204 DiscreteNormal<DESCRIPTOR> n) {
205 return std::nullopt;
206}
207
208std::optional<PostProcessorPromise<T,DESCRIPTOR>> getPostProcessor(DiscreteNormalType type,
209 DiscreteNormal<DESCRIPTOR> n) {
210 return boundaryhelper::promisePostProcessorForNormal<T,DESCRIPTOR,normGradPsiBoundary2D>(n);
211}
212
213};*/
214
215}
216
217}
218
219#endif
Plain old scalar vector.
PostProcessorPromise< T, DESCRIPTOR > promisePostProcessorForNormal(Vector< int, 2 > n)
Top level namespace for all of OpenLB.
DiscreteNormalType
Type associated with a discrete normal vector.
@ ExternalCorner
Normal detected as flat plane.
@ InternalCorner
Normal detected as external corner.
std::int64_t CellDistance
Type for in-memory distance of block-local cell indices.
std::optional< PostProcessorPromise< T, DESCRIPTOR > > getPostProcessor(DiscreteNormalType type, DiscreteNormal< DESCRIPTOR > n)
std::optional< DynamicsPromise< T, DESCRIPTOR > > getDynamics(DiscreteNormalType type, DiscreteNormal< DESCRIPTOR > n)
std::optional< PostProcessorPromise< T, DESCRIPTOR > > getPostProcessor(DiscreteNormalType type, DiscreteNormal< DESCRIPTOR > n)
std::optional< DynamicsPromise< T, DESCRIPTOR > > getDynamics(DiscreteNormalType type, DiscreteNormal< DESCRIPTOR > n)
std::optional< PostProcessorPromise< T, DESCRIPTOR > > getPostProcessor(DiscreteNormalType type, DiscreteNormal< DESCRIPTOR > n)
std::optional< DynamicsPromise< T, DESCRIPTOR > > getDynamics(DiscreteNormalType type, DiscreteNormal< DESCRIPTOR > n)
std::optional< DynamicsPromise< T, DESCRIPTOR > > getDynamics(DiscreteNormalType type, DiscreteNormal< DESCRIPTOR > n)
std::optional< PostProcessorPromise< T, DESCRIPTOR > > getPostProcessor(DiscreteNormalType type, DiscreteNormal< DESCRIPTOR > n)
std::optional< PostProcessorPromise< T, DESCRIPTOR > > getPostProcessor(DiscreteNormalType type, DiscreteNormal< DESCRIPTOR > n)
std::optional< DynamicsPromise< T, DESCRIPTOR > > getDynamics(DiscreteNormalType type, DiscreteNormal< DESCRIPTOR > n)
Identity type to pass non-constructible types as value.
Definition meta.h:79