OpenLB 1.7
Loading...
Searching...
No Matches
reductionF3D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2012-2017 Lukas Baron, Tim Dornieden, Mathias J. Krause,
4 * Albert Mink, Benjamin Förster, Adrian Kummerlaender
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 REDUCTION_F_3D_H
26#define REDUCTION_F_3D_H
27
28#include "blockBaseF3D.h"
29#include "superBaseF3D.h"
34
35namespace olb {
36
37
39
43template <typename T, typename DESCRIPTOR>
44class SuperLatticeFfromAnalyticalF3D final : public SuperLatticeF3D<T,DESCRIPTOR> {
45protected:
47public:
54 bool operator() (T output[], const int input[]) override;
55};
56
57
59
62template <typename T, typename DESCRIPTOR>
63class BlockLatticeFfromAnalyticalF3D final : public BlockLatticeF3D<T,DESCRIPTOR> {
64protected:
67public:
75 Cuboid3D<T>& cuboid);
76 bool operator() (T output[], const int input[]) override;
77};
78
81template <typename T, typename DESCRIPTOR>
82class SmoothBlockIndicator3D final : public BlockDataF3D<T,T> {
83protected:
84 /*
85 * int _wa (weight accuracy): to change the size of the weights array, 3 should be enough, 7 & 5 is more accurate.
86 * only use these sizes: 3, 5, 7, 9, ... (still 3 or 5 is recommended)
87 * more testing has to be done
88 * the size of the weights matrix affects the particle size, therefore it has to be known earlier, to calculate the BlockData size
89 *
90 * Note: wa influences the boundary size. Maybe unify eps-boundary size somehow.
91 */
93 const T _h;
95 const T _sigma;
97 const int _eps;
99 const int _wa;
102public:
103 SmoothBlockIndicator3D(IndicatorF3D<T>& f, T h, T eps, T sigma);
104 //bool operator() (T output[], const int input[]);
105};
106
107// TODO: comment code
108template <typename T, typename DESCRIPTOR>
110 BlockLatticeF3D<T,DESCRIPTOR> {
111protected:
115public:
117 BlockLattice<T,DESCRIPTOR>& blockLattice,
118 UnitConverter<T,DESCRIPTOR>& conv, Cuboid3D<T>* c, int range);
121 bool operator() (T output[], const int input[]) override
122 {
123 return false;
124 }
125 void operator() (T output[], const T input[]);
126};
127
128// TODO: comment code
129template <typename T, typename DESCRIPTOR>
131 SuperLatticeF3D<T,DESCRIPTOR> {
132private:
133 std::vector<BlockLatticeInterpPhysVelocity3Degree3D<T,DESCRIPTOR>* > _bLattices;
134public:
137 int range=1);
138 bool operator() (T output[], const int input[]) override
139 {
140 return 0;
141 }
142 void operator()(T output[], const T input[], const int iC);
143};
144
145// TODO: comment code
146template <typename T, typename DESCRIPTOR>
148 BlockLatticeF3D<T,DESCRIPTOR> {
149protected:
153 int _range; // degree of interpolation can be changed (2,3,4,...)
154public:
156 BlockLattice<T,DESCRIPTOR>& blockLattice,
157 BlockGeometry<T,3>& blockGeometry,
158 UnitConverter<T,DESCRIPTOR>& conv, Cuboid3D<T>* c, int range);
161 bool operator() (T output[], const int input[]) override
162 {
163 return false;
164 }
165 void operator() (T output[DESCRIPTOR::q], const T input[3]);
166};
167
168// TODO: comment code
169template <typename T, typename DESCRIPTOR>
171 SuperLatticeF3D<T,DESCRIPTOR> {
172private:
173 std::vector<BlockLatticeInterpDensity3Degree3D<T,DESCRIPTOR>* > _bLattices;
174public:
176 SuperGeometry<T,3>& sGeometry,
177 UnitConverter<T,DESCRIPTOR>& conv, int range=1);
179 // range equals degree of interpolation and can be changed (2,3,4,...)
180 bool operator() (T output[], const int input[]) override
181 {
182 return 0;
183 }
184 void operator()(T output[], const T input[], const int iC);
185};
186
187// TODO: comment code
188template <typename T, typename DESCRIPTOR>
190 BlockLatticeF3D<T,DESCRIPTOR> {
191protected:
194public:
199 bool operator() (T output[], const int input[]) override
200 {
201 return false;
202 }
203 void operator() (T delta[4][4][4], const T physPosP[3]);
204};
205
206// TODO: comment code
207template <typename T, typename DESCRIPTOR>
209 SuperLatticeF3D<T,DESCRIPTOR> {
210private:
211 std::vector<BlockLatticeSmoothDiracDelta3D<T,DESCRIPTOR>* > _bLattices;
212public:
215 SuperGeometry<T,3>& superGeometry);
217 bool operator()(T output[], const int input[]) override
218 {
219 return false;
220 };
221 void operator()(T delta[4][4][4], const T physPos[3], const int iC);
222};
223
224
225} // end namespace olb
226
227#endif
Representation of the 2D block geometry view – header file.
AnalyticalF are applications from DD to XD, where X is set by the constructor.
BlockDataF3D can store data of any BlockFunctor3D.
Representation of a block geometry.
represents all functors that operate on a DESCRIPTOR in general, e.g. getVelocity(),...
Block level functor for conversion of analytical to lattice functors.
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockLatticeFfromAnalyticalF3D(AnalyticalF3D< T, T > &f, BlockLattice< T, DESCRIPTOR > &lattice, Cuboid3D< T > &cuboid)
UnitConverter< T, DESCRIPTOR > & _conv
BlockLatticeInterpDensity3Degree3D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockGeometry< T, 3 > &blockGeometry, UnitConverter< T, DESCRIPTOR > &conv, Cuboid3D< T > *c, int range)
BlockGeometry< T, 3 > & _blockGeometry
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
UnitConverter< T, DESCRIPTOR > & _conv
BlockLatticeInterpPhysVelocity3Degree3D(BlockLattice< T, DESCRIPTOR > &blockLattice, UnitConverter< T, DESCRIPTOR > &conv, Cuboid3D< T > *c, int range)
BlockLatticeSmoothDiracDelta3D(BlockLattice< T, DESCRIPTOR > &blockLattice, UnitConverter< T, DESCRIPTOR > &conv, Cuboid3D< T > *c)
UnitConverter< T, DESCRIPTOR > & _conv
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
Platform-abstracted block lattice for external access and inter-block interaction.
A regular single 3D cuboid is the basic component of a 3D cuboid structure which defines the grid.
Definition cuboid3D.h:58
Smart pointer for managing the various ways of passing functors around.
Definition functorPtr.h:60
IndicatorF3D is an application from .
const int _wa
size of the matrix of weight coefficients (from 3D Gaussian Function) _wa x _wa x _wa
const int _eps
Size (always a multiple of 2) of the epsilon layer eps_phys = _eps * _h.
SmoothBlockIndicator3D(IndicatorF3D< T > &f, T h, T eps, T sigma)
const T _h
Lattice spacing of the particle grid.
IndicatorF3D< T > & _f
_f holds the geometry
const T _sigma
Important parameter for the Gaussian point spread Function (standard deviations)
Representation of a statistic for a parallel 2D geometry.
represents all functors that operate on a SuperLattice in general, e.g. getVelocity(),...
Functor used to convert analytical functions to lattice functions.
bool operator()(T output[], const int input[]) override
FunctorPtr< AnalyticalF3D< T, T > > _f
SuperLatticeFfromAnalyticalF3D(FunctorPtr< AnalyticalF3D< T, T > > &&f, SuperLattice< T, DESCRIPTOR > &sLattice)
SuperLatticeInterpDensity3Degree3D(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 3 > &sGeometry, UnitConverter< T, DESCRIPTOR > &conv, int range=1)
bool operator()(T output[], const int input[]) override
bool operator()(T output[], const int input[]) override
SuperLatticeInterpPhysVelocity3Degree3D(SuperLattice< T, DESCRIPTOR > &sLattice, UnitConverter< T, DESCRIPTOR > &conv, int range=1)
SuperLatticeSmoothDiracDelta3D(SuperLattice< T, DESCRIPTOR > &sLattice, UnitConverter< T, DESCRIPTOR > &conv, SuperGeometry< T, 3 > &superGeometry)
bool operator()(T output[], const int input[]) override
Super class maintaining block lattices for a cuboid decomposition.
Conversion between physical and lattice units, as well as discretization.
The description of a vector of 3D cuboid – header file.
Top level namespace for all of OpenLB.
Representation of a parallel 2D geometry – header file.