OpenLB 1.7
Loading...
Searching...
No Matches
latticeDiscreteNormal2D.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_2D_H
25#define LATTICE_DISCRETE_NORMAL_2D_H
26
27#include <vector>
28
29#include "core/superLattice2D.h"
32
33
34namespace olb {
35
36template<typename T, unsigned D> class SuperGeometry;
37
39template <typename T, typename DESCRIPTOR>
40class SuperLatticeDiscreteNormal2D final : public SuperLatticeF2D<T,DESCRIPTOR> {
41private:
42 SuperGeometry<T,2>& _superGeometry;
44public:
46 FunctorPtr<SuperIndicatorF2D<T>>&& indicatorF);
47};
48
49template <typename T, typename DESCRIPTOR>
54
56template <typename T, typename DESCRIPTOR>
57class BlockLatticeDiscreteNormal2D final : public BlockLatticeF2D<T,DESCRIPTOR> {
58private:
59 BlockGeometry<T,2>& _blockGeometry;
60 BlockIndicatorF2D<T>& _indicatorF;
61public:
63 BlockGeometry<T,2>& blockGeometry,
64 BlockIndicatorF2D<T>& indicatorF);
65 bool operator() (T output[], const int input[]) override;
66};
67
69template <typename T, typename DESCRIPTOR>
70class SuperLatticeDiscreteNormalType2D final : public SuperLatticeF2D<T,DESCRIPTOR> {
71private:
72 SuperGeometry<T,2>& _superGeometry;
74public:
76 FunctorPtr<SuperIndicatorF2D<T>>&& indicatorF);
77};
78
79template <typename T, typename DESCRIPTOR>
84
85
87template <typename T, typename DESCRIPTOR>
88class BlockLatticeDiscreteNormalType2D final : public BlockLatticeF2D<T,DESCRIPTOR> {
89private:
90 BlockGeometry<T,2>& _blockGeometry;
91 BlockIndicatorF2D<T>& _indicatorF;
92public:
94 BlockGeometry<T,2>& blockGeometry,
95 BlockIndicatorF2D<T>& indicatorF);
96 bool operator() (T output[1], const int input[]) override;
97};
98
99}
100#endif
Representation of a block geometry.
Base block indicator functor (discrete)
BlockLatticeDiscreteNormal2D returns pointwise the discrete normal vector of the local lattice bounda...
BlockLatticeDiscreteNormal2D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockGeometry< T, 2 > &blockGeometry, BlockIndicatorF2D< T > &indicatorF)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockLatticeDiscreteNormalType2D returns pointwise the type of a discrete normal vector.
BlockLatticeDiscreteNormalType2D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockGeometry< T, 2 > &blockGeometry, BlockIndicatorF2D< 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.
functor to get pointwise the discrete normal vector of local lattice boundary cells
SuperLatticeDiscreteNormal2D(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 2 > &superGeometry, FunctorPtr< SuperIndicatorF2D< T > > &&indicatorF)
functor to get pointwise the type of a discrete normal vector
SuperLatticeDiscreteNormalType2D(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 2 > &superGeometry, FunctorPtr< SuperIndicatorF2D< T > > &&indicatorF)
represents all functors that operate on a SuperLattice in general, e.g. getVelocity(),...
Super class maintaining block lattices for a cuboid decomposition.
T value_t
Base value type of the lattice.
Top level namespace for all of OpenLB.
SuperLatticeDiscreteNormalType2D(SuperLattice< T, DESCRIPTOR > &, SuperGeometry< typename SuperLattice< T, DESCRIPTOR >::value_t, 2 > &, FunctorPtr< SuperIndicatorF2D< typename SuperLattice< T, DESCRIPTOR >::value_t > > &&) -> SuperLatticeDiscreteNormalType2D< T, DESCRIPTOR >
SuperLatticeDiscreteNormal2D(SuperLattice< T, DESCRIPTOR > &, SuperGeometry< typename SuperLattice< T, DESCRIPTOR >::value_t, 2 > &, FunctorPtr< SuperIndicatorF2D< typename SuperLattice< T, DESCRIPTOR >::value_t > > &&) -> SuperLatticeDiscreteNormal2D< T, DESCRIPTOR >
The description of a 2D super lattice – header file.