OpenLB 1.7
Loading...
Searching...
No Matches
hyperplaneLattice3D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2017 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_3D_H
25#define HYPERPLANE_LATTICE_3D_H
26
27#include "core/vector.h"
29#include "hyperplane3D.h"
30
31namespace olb {
32
34
40template <typename T>
42private:
44 int computeMaxLatticeDistance(Cuboid3D<T>&& cuboid) const;
46 void constructCuboid(CuboidGeometry3D<T>& geometry, int maxLatticeDistance);
48 void setToResolution(int resolution);
49
50protected:
52
54
64
66 T _h;
68 int _nx;
70 int _ny;
71
72public:
74
78 Hyperplane3D<T> hyperplane);
81 Hyperplane3D<T> hyperplane,
82 int resolution);
85 Hyperplane3D<T> hyperplane,
86 T h);
87
89
96 T h, int nx, int ny);
97
99
100 const Hyperplane3D<T>& getHyperplane() const;
101
103 Vector<T,3> getPhysR(const int& planeX, const int& planeY) const;
104
106 int getNx() const;
108 int getNy() const;
110 T getPhysSpacing() const;
111
115 Vector<T,3> getVectorU() const;
117 Vector<T,3> getVectorV() const;
118
119};
120
121}
122
123#endif
A regular single 3D cuboid is the basic component of a 3D cuboid structure which defines the grid.
Definition cuboid3D.h:58
A cuboid geometry represents a voxel mesh.
Parametrization of a hyperplane lattice.
int _ny
Number of lattice points in the direction of _v.
Vector< T, 3 > getVectorV() const
Vector< T, 3 > getPhysR(const int &planeX, const int &planeY) const
Transform 2d lattice coordinates to their physical 3d location.
Vector< T, 3 > _origin
Origin vector of the lattice.
Vector< T, 3 > _v
Span vector of the lattice, normalized to grid width _h.
Vector< T, 3 > getPhysOrigin() const
Vector< T, 3 > getVectorU() const
Vector< T, 3 > _u
Span vector of the lattice, normalized to grid width _h.
const Hyperplane3D< T > _hyperplane
const Hyperplane3D< T > & getHyperplane() const
HyperplaneLattice3D(CuboidGeometry3D< T > &geometry, Hyperplane3D< T > hyperplane)
Constructor for automatic discretization.
T _h
Distance between discrete lattice points.
int _nx
Number of lattice points in the direction of _u.
HyperplaneLattice3D(const HyperplaneLattice3D &)=default
Plain old scalar vector.
Definition vector.h:47
The description of a vector of 3D cuboid – header file.
Top level namespace for all of OpenLB.
Definition of a analytical 2D plane embedded in 3D space.
efficient implementation of a vector class