OpenLB 1.8.1
Loading...
Searching...
No Matches
superLatticeO.h
Go to the documentation of this file.
1/* Lattice Boltzmann sample, written in C++, using the OpenLB
2 * library
3 *
4 * Copyright (C) 2025 Shota Ito
5 * E-mail contact: info@openlb.net
6 * The most recent release of OpenLB can be downloaded at
7 * <http://www.openlb.net/>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this program; if not, write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
23 */
24
25#ifndef SUPER_LATTICE_O_H
26#define SUPER_LATTICE_O_H
27
29
30namespace olb {
31
34template <typename OPERATOR>
36 static constexpr OperatorScope scope = OPERATOR::scope;
37 using parameters = typename OPERATOR::parameters;
38
39 template <typename CELLS> requires (OPERATOR::scope == OperatorScope::PerCell)
40 void apply(CELLS& cells) {
41 OPERATOR().apply(cells.template get<names::Lattice>());
42 }
43 template <typename CELLS, typename PARAMETERS> requires (OPERATOR::scope == OperatorScope::PerCellWithParameters)
44 void apply(CELLS& cells, PARAMETERS& parameters) {
45 OPERATOR().apply(cells.template get<names::Lattice>(), parameters);
46 }
47};
48
49template <typename OPERATOR, typename T, typename DESCRIPTOR>
51 return std::make_unique<SuperLatticeCoupling<SingleLatticeO<OPERATOR>,
55}
56
57}
58
59#endif
#define OPERATOR(OP, rhs)
Definition aDiffTape.h:64
Super class maintaining block lattices for a cuboid decomposition.
Top level namespace for all of OpenLB.
auto makeSuperLatticeO(SuperLattice< T, DESCRIPTOR > &lattice)
OperatorScope
Block-wide operator application scopes.
@ PerCell
Per-cell application, i.e. OPERATOR::apply is passed a CELL concept implementation.
@ PerCellWithParameters
Per-cell application with parameters, i.e. OPERATOR::apply is passed a CELL concept implementation an...
Wrapper class for SuperLatticeCoupling with only a single lattice instance in order to allow operator...
void apply(CELLS &cells, PARAMETERS &parameters)
typename OPERATOR::parameters parameters
void apply(CELLS &cells)
static constexpr OperatorScope scope
Pair of base value and descriptor type.
Definition base.h:123