OpenLB 1.7
Loading...
Searching...
No Matches
latticeDiscreteNormal3D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2020 Clara Schragmann
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 LATTICE_DISCRETE_NORMAL_3D_H
25#define LATTICE_DISCRETE_NORMAL_3D_H
26
27#include<vector>
28
30
33
34
35/* Note: Throughout the whole source code directory genericFunctions, the
36 * template parameters for i/o dimensions are:
37 * F: S^m -> T^n (S=source, T=target)
38 */
39
40namespace olb {
41
43template <typename T, typename DESCRIPTOR>
44class SuperLatticeDiscreteNormal3D final :public SuperLatticeF3D<T,DESCRIPTOR> {
45private:
46 SuperGeometry<T,3>& _superGeometry;
48public:
50 FunctorPtr<SuperIndicatorF3D<T>>&& indicatorF);
51};
52
54template <typename T, typename DESCRIPTOR>
55class BlockLatticeDiscreteNormal3D final : public BlockLatticeF3D<T,DESCRIPTOR> {
56 BlockGeometry<T,3>& _blockGeometry;
57 BlockIndicatorF3D<T>& _indicatorF;
58public:
60 BlockGeometry<T,3>& blockGeometry,
61 BlockIndicatorF3D<T>& indicatorF);
62 bool operator() (T output[], const int input[]) override;
63};
64
66template <typename T, typename DESCRIPTOR>
67class SuperLatticeDiscreteNormalType3D final :public SuperLatticeF3D<T,DESCRIPTOR> {
68private:
69 SuperGeometry<T,3>& _superGeometry;
71public:
73 FunctorPtr<SuperIndicatorF3D<T>>&& indicatorF);
74};
75
77template <typename T, typename DESCRIPTOR>
78class BlockLatticeDiscreteNormalType3D final : public BlockLatticeF3D<T,DESCRIPTOR> {
79 BlockGeometry<T,3>& _blockGeometry;
80 BlockIndicatorF3D<T>& _indicatorF;
81public:
83 BlockGeometry<T,3>& blockGeometry,
84 BlockIndicatorF3D<T>& indicatorF);
85 bool operator() (T output[1], const int input[]) override;
86};
87
88}
89#endif
Representation of a block geometry.
Base block indicator functor.
BlockLatticeDiscreteNormal3D returns pointwise the discrete normal vector of the local lattice bounda...
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockLatticeDiscreteNormal3D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockGeometry< T, 3 > &blockGeometry, BlockIndicatorF3D< T > &indicatorF)
BlockLatticeDiscreteNormalType3D returns pointwise the type of a discrete normal vector.
BlockLatticeDiscreteNormalType3D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockGeometry< T, 3 > &blockGeometry, BlockIndicatorF3D< T > &indicatorF)
bool operator()(T output[1], const int input[]) override
represents all functors that operate on a DESCRIPTOR in general, e.g. getVelocity(),...
Platform-abstracted block lattice for external access and inter-block interaction.
Smart pointer for managing the various ways of passing functors around.
Definition functorPtr.h:60
Representation of a statistic for a parallel 2D geometry.
Base indicator functor (discrete)
functor to get pointwise the discrete normal vector of local lattice boundary cells
SuperLatticeDiscreteNormal3D(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 3 > &superGeometry, FunctorPtr< SuperIndicatorF3D< T > > &&indicatorF)
functor to get pointwise the type of a discrete normal vector
SuperLatticeDiscreteNormalType3D(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 3 > &superGeometry, FunctorPtr< SuperIndicatorF3D< T > > &&indicatorF)
represents all functors that operate on a SuperLattice in general, e.g. getVelocity(),...
Super class maintaining block lattices for a cuboid decomposition.
Top level namespace for all of OpenLB.