OpenLB 1.8.1
Loading...
Searching...
No Matches
fields.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2024 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 REFINEMENT_FIELDS_H
25#define REFINEMENT_FIELDS_H
26
27#include "descriptor/fields.h"
28
29namespace olb {
30
31namespace fields::refinement {
32
33struct CELL_ID_COARSE : public descriptors::TYPED_FIELD_BASE<CellID,1> { };
34struct CELL_ID_FINE : public descriptors::TYPED_FIELD_BASE<CellID,1> { };
35
36struct NORMAL : public descriptors::FIELD_BASE<0,1> { };
37
38struct PREV_RHO : public descriptors::FIELD_BASE<1> { };
39struct PREV_U : public descriptors::FIELD_BASE<0,1> { };
40struct PREV_FNEQ : public descriptors::FIELD_BASE<0,0,1> { };
41
44 template <typename T>
46
47 template <typename T>
49
50 template <typename DESCRIPTOR>
51 requires (DESCRIPTOR::d == 2)
52 static constexpr auto count() any_platform {
54 }
55
56 template <typename DESCRIPTOR>
57 requires (DESCRIPTOR::d == 2)
58 static constexpr auto c(unsigned i) any_platform {
60 }
61
62 template <typename DESCRIPTOR>
63 requires (DESCRIPTOR::d == 3)
64 static constexpr auto count() any_platform {
66 }
67
68 template <typename DESCRIPTOR>
69 requires (DESCRIPTOR::d == 3)
70 static constexpr auto c(unsigned i) any_platform {
72 }
73
74};
75
76}
77
78namespace refinement {
79
80template <typename DESCRIPTOR>
81using DATA_DESCRIPTOR = descriptors::LATTICE_DESCRIPTOR<DESCRIPTOR::d, DESCRIPTOR::q,
84>;
85
86}
87
88}
89
90#endif
constexpr int q() any_platform
Definition functions.h:140
constexpr int c(unsigned iPop, unsigned iDim) any_platform
Definition functions.h:83
Top level namespace for all of OpenLB.
std::uint32_t CellID
Type for sequential block-local cell indices.
#define any_platform
Define preprocessor macros for device-side functions, constant storage.
Definition platform.h:77
Base of a field whose size is defined by [C_0,C_1,C_2]^T * [1,D,Q].
Definition fields.h:52
Base descriptor of a D-dimensional lattice with Q directions and a list of additional fields.
Definition base.h:95
Base of a descriptor field of scalar TYPE.
Definition fields.h:132
Field for storing indices to context data neighbors.
Definition fields.h:43
static constexpr auto count() any_platform
Definition fields.h:64
static constexpr auto count() any_platform
Definition fields.h:52
static constexpr auto c(unsigned i) any_platform
Definition fields.h:70
static constexpr auto c(unsigned i) any_platform
Definition fields.h:58