OpenLB 1.7
Loading...
Searching...
No Matches
hyperplaneLattice2D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2018 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 HYPERPLANE_LATTICE_2D_H
25#define HYPERPLANE_LATTICE_2D_H
26
27#include "core/vector.h"
29#include "hyperplane2D.h"
30
31namespace olb {
32
34
38template <typename T>
40private:
41 CuboidGeometry2D<T>& _geometry;
42
44 int computeMaxLatticeDistance() const;
46 void constructCuboid(int maxLatticeDistance);
48 void setToResolution(int resolution);
49
50protected:
52
54
62
64 T _h;
66 int _n;
67
68public:
70
74 Hyperplane2D<T> hyperplane);
77 Hyperplane2D<T> hyperplane,
78 int resolution);
81 Hyperplane2D<T> hyperplane,
82 T h);
83
85
86 const Hyperplane2D<T>& getHyperplane() const;
87
89 Vector<T,2> getPhysR(const int& n) const;
90
92 int getN() const;
94 T getPhysSpacing() const;
95
99 Vector<T,2> getVectorU() const;
100
101};
102
103}
104
105#endif
A cuboid structure represents the grid of a considered domain.
Parametrization of a hyperplane lattice (i.e. a line lattice).
HyperplaneLattice2D(CuboidGeometry2D< T > &geometry, Hyperplane2D< T > hyperplane)
Constructor for automatic discretization.
const Hyperplane2D< T > _hyperplane
Vector< T, 2 > _origin
Origin vector of the lattice.
int _n
Number of lattice points in the direction of _u.
Vector< T, 2 > getPhysR(const int &n) const
Transform 1d lattice coordinates to their physical 2d location.
T _h
Distance between discrete lattice points.
const Hyperplane2D< T > & getHyperplane() const
Vector< T, 2 > getPhysOrigin() const
HyperplaneLattice2D(const HyperplaneLattice2D &)=default
Vector< T, 2 > getVectorU() const
Vector< T, 2 > _u
Direction vector of the lattice, normalized to grid width _h.
Plain old scalar vector.
Definition vector.h:47
The description of a vector of 2D cuboid – header file.
Top level namespace for all of OpenLB.
Definition of a analytical line embedded in 2D space.
efficient implementation of a vector class