OpenLB 1.8.1
Loading...
Searching...
No Matches
lineLattice3D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2024 Dennis Teutscher
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 OLB_LINE_LATTICE_3D_H
25#define OLB_LINE_LATTICE_3D_H
26
27#include "core/vector.h"
29#include "line3D.h"
30
31namespace olb {
32
34
38template <typename T>
40private:
41 CuboidDecomposition<T,3>& _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 Line3D<T> line3D);
77 Line3D<T> line3D,
78 int resolution);
81 Line3D<T> line3D,
82 T h);
83
84 LineLattice3D(const LineLattice3D&) = default;
85
86 const Line3D<T>& getLine3D() const;
87
89 Vector<T,3> getPhysR(const int& n) const;
90
92 int getN() const;
94 T getPhysSpacing() const;
95
99 Vector<T,3> getVectorU() const;
100
101};
102
103}
104
105#endif
Decomposition of a physical volume into a set of disjoint cuboids.
Parametrization of a line3D lattice (i.e. a line lattice).
const Line3D< T > _line3D
LineLattice3D(CuboidDecomposition< T, 3 > &geometry, Line3D< T > line3D)
Constructor for automatic discretization.
LineLattice3D(const LineLattice3D &)=default
T _h
Distance between discrete lattice points.
int _n
Number of lattice points in the direction of _u.
Vector< T, 3 > getPhysR(const int &n) const
Transform 1d lattice coordinates to their physical 3d location.
Vector< T, 3 > getVectorU() const
Vector< T, 3 > _origin
Origin vector of the lattice.
Vector< T, 3 > _u
Direction vector of the lattice, normalized to grid width _h.
const Line3D< T > & getLine3D() const
Vector< T, 3 > getPhysOrigin() const
Plain old scalar vector.
Top level namespace for all of OpenLB.
Definition of a analytical line embedded in 3D space.
Definition line3D.h:37
efficient implementation of a vector class