OpenLB 1.7
Loading...
Searching...
No Matches
superBaseF2D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2012 Lukas Baron, Tim Dornieden, Mathias J. Krause,
4 * Albert Mink
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_BASE_F_2D_H
26#define SUPER_BASE_F_2D_H
27
28#include <memory>
29
30#include "functors/genericF.h"
31#include "blockBaseF2D.h"
34#include "core/superData.h"
35#include "core/superLattice2D.h"
36
37/* Note: Throughout the whole source code directory genericFunctions, the
38 * template parameters for i/o dimensions are:
39 * F: S^m -> T^n (S=source, T=target)
40 */
41
42namespace olb {
43
44template<typename T, typename DESCRIPTOR> class SuperLattice;
45template<typename T> class SuperStructure2D;
46template<typename T, typename W> class SuperIdentity2D;
47template<typename T> class BlockF2D;
48
50template <typename T, typename W = T>
51class SuperF2D : public GenericF<W, int> {
52protected:
53 SuperF2D(SuperStructure<T,2>& superStructure, int targetDim);
54
56
58
62 std::vector<std::unique_ptr<BlockF2D<W>>> _blockF;
63public:
65
70
74 int getBlockFSize() const;
76 BlockF2D<W>& getBlockF(int iCloc);
77
78 bool operator() (W output[], const int input []) override;
79
80 using GenericF<W,int>::operator();
81
82};
83
84
86template<typename T, typename BaseType>
87class SuperDataF2D : public SuperF2D<T,BaseType> {
88protected:
91public:
95 bool operator() (BaseType output[], const int input[]);
98};
99
101template <typename T, typename W=T>
102class SuperIdentity2D : public SuperF2D<T,W> {
103protected:
105public:
107 bool operator() (W output[], const int input[]) override;
108};
109
111template <typename T, typename DESCRIPTOR>
112class SuperLatticeF2D : public SuperF2D<T,T> {
113protected:
114 SuperLatticeF2D(SuperLattice<T,DESCRIPTOR>& superLattice, int targetDim);
115
117public:
119
120 bool operator () (T output[], const int input []);
121
122 using GenericF<T,int>::operator();
123};
124
126template <typename T, typename DESCRIPTOR>
127class SuperLatticePhysF2D : public SuperLatticeF2D<T,DESCRIPTOR> {
128protected:
130 const UnitConverter<T,DESCRIPTOR>& converter, int targetDim);
132public:
134};
135
137template <typename T, typename DESCRIPTOR, typename TDESCRIPTOR>
146
147} // end namespace olb
148
149#endif
represents all functors that operate on a cuboid in general, mother class of BlockLatticeF,...
Smart pointer for managing the various ways of passing functors around.
Definition functorPtr.h:60
GenericF is a base class, that can represent continuous as well as discrete functions.
Definition genericF.h:50
Functor from SuperData2D
bool operator()(BaseType output[], const int input[])
Operator for this functor - copies data from _superData object into output.
SuperData< 2, T, BaseType > & getSuperData()
Getter for _superData
SuperDataF2D(SuperData< 2, T, BaseType > &superData)
Constructor from SuperData2D - stores _superData reference.
SuperData< 2, T, BaseType > & _superData
SuperData2D object this functor was created from
represents all functors that operate on a SuperStructure<T,2> in general
SuperF2D< T, W > & operator-(SuperF2D< T, W > &rhs)
int getBlockFSize() const
SuperF2D< T, W > & operator+(SuperF2D< T, W > &rhs)
bool operator()(W output[], const int input[]) override
SuperF2D< T, W > & operator*(SuperF2D< T, W > &rhs)
std::vector< std::unique_ptr< BlockF2D< W > > > _blockF
Super functors may consist of several BlockF2D<W> derived functors.
SuperStructure< T, 2 > & getSuperStructure()
SuperF2D(SuperStructure< T, 2 > &superStructure, int targetDim)
SuperStructure< T, 2 > & _superStructure
BlockF2D< W > & getBlockF(int iCloc)
SuperF2D< T, W > & operator/(SuperF2D< T, W > &rhs)
SuperIdentity2D(FunctorPtr< SuperF2D< T, W > > &&f)
FunctorPtr< SuperF2D< T, W > > _f
bool operator()(W output[], const int input[]) override
represents all functors that operate on a SuperLattice in general, e.g. getVelocity(),...
SuperLatticeF2D(SuperLattice< T, DESCRIPTOR > &superLattice, int targetDim)
bool operator()(T output[], const int input[])
SuperLattice< T, DESCRIPTOR > & _sLattice
SuperLattice< T, DESCRIPTOR > & getSuperLattice()
represents all functors that operate on a DESCRIPTOR with output in Phys, e.g. physVelocity(),...
const UnitConverter< T, DESCRIPTOR > & _converter
UnitConverter< T, DESCRIPTOR > const & getConverter() const
SuperLatticePhysF2D(SuperLattice< T, DESCRIPTOR > &sLattice, const UnitConverter< T, DESCRIPTOR > &converter, int targetDim)
represents all thermal functors that operate on a DESCRIPTOR with output in Phys, e....
const ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > & _converter
SuperLatticeThermalPhysF2D(SuperLattice< T, TDESCRIPTOR > &sLattice, const ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > &converter, int targetDim)
ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > const & getConverter() const
Super class maintaining block lattices for a cuboid decomposition.
Conversion between physical and lattice units, as well as discretization specialized for thermal appl...
Conversion between physical and lattice units, as well as discretization.
The description of a generic interface for all functor classes – header file.
Top level namespace for all of OpenLB.
typename util::BaseTypeHelper< T >::type BaseType
Definition baseType.h:59
Dynamics for a generic 2D super data – header file.
The description of a 2D super lattice – header file.