OpenLB 1.8.1
Loading...
Searching...
No Matches
operator.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_OPERATOR_H
25#define REFINEMENT_OPERATOR_H
26
27#include "operatorScope.h"
28#include "fields.h"
29
30namespace olb {
31
32template <typename T, typename DESCRIPTOR> class BlockD;
33
35template <typename T, typename DESCRIPTOR, Platform PLATFORM>
37
39template <typename T, typename DESCRIPTOR, Platform PLATFORM, typename COUPLER>
41
43template <typename T, typename DESCRIPTOR>
45
47template <typename T, typename DESCRIPTOR>
49 using value_t = T;
50 using descriptor_t = DESCRIPTOR;
51
53
54 virtual Platform getPlatform() const = 0;
55 virtual void setProcessingContext(ProcessingContext context) = 0;
56
58 virtual Data& getData() = 0;
59
61 virtual void add(LatticeR<DESCRIPTOR::d> latticeR) = 0;
63 virtual std::optional<std::size_t> getDataIndex(LatticeR<DESCRIPTOR::d> latticeR) const = 0;
64
66
70
71 template <Platform PLATFORM>
72 auto& asConcrete() {
74 }
75
76};
77
78}
79
80#endif
Untyped promise to execute some block refinement operator.
Context for the execution of block refinement operators.
Plain old scalar vector.
Top level namespace for all of OpenLB.
ProcessingContext
OpenLB processing contexts.
Definition platform.h:54
Platform
OpenLB execution targets.
Definition platform.h:35
Interface for the contextual data of a block refinement.
Definition operator.h:48
virtual void apply(BlockRefinementOperatorPromise< T, DESCRIPTOR > &&promise)=0
Apply promised algorithm step to the previously added connection points.
virtual void setProcessingContext(ProcessingContext context)=0
virtual Data & getData()=0
Return reference to contextual data.
virtual Platform getPlatform() const =0
virtual void add(LatticeR< DESCRIPTOR::d > latticeR)=0
Connect the coarse and fine lattice at position latticeR.
virtual std::optional< std::size_t > getDataIndex(LatticeR< DESCRIPTOR::d > latticeR) const =0
Return index where contextual data of connection point latticeR is stored.
Executor of a concrete block refinement operator in a given context.
Definition operator.h:40