OpenLB 1.7
Loading...
Searching...
No Matches
hyperplane3D.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_3D_H
25#define HYPERPLANE_3D_H
26
27#include "core/vector.h"
28#include "geometry/cuboid3D.h"
29
30namespace olb {
31
33
52template <typename T>
58
59 explicit Hyperplane3D() = default;
60
66 Hyperplane3D& centeredIn(const Cuboid3D<T>& cuboid);
73
77 const Vector<T,3>& row1,
78 const Vector<T,3>& row2);
88
90 bool isXYPlane() const;
92 bool isXZPlane() const;
94 bool isYZPlane() const;
95
97 Vector<T,3> project(const Vector<T,2>& x) const;
98};
99
100}
101
102#endif
A regular single 3D cuboid is the basic component of a 3D cuboid structure which defines the grid.
Definition cuboid3D.h:58
Plain old scalar vector.
Definition vector.h:47
The description of a single 3D cuboid – header file.
Top level namespace for all of OpenLB.
Definition of a analytical 2D plane embedded in 3D space.
Vector< T, 3 > project(const Vector< T, 2 > &x) const
Hyperplane3D & centeredIn(const Cuboid3D< T > &cuboid)
Center the hyperplane relative to the given cuboid.
Hyperplane3D & rotateSpanAroundZ(T r)
Rotate the spanning vectors around the Z axis.
Vector< T, 3 > normal
Hyperplane3D()=default
bool isXZPlane() const
Hyperplane3D & spannedBy(const Vector< T, 3 > &u, const Vector< T, 3 > &v)
Span the hyperplane using two span vectors.
Hyperplane3D & rotateSpanAroundX(T r)
Rotate the spanning vectors around the X axis.
Vector< T, 3 > u
Hyperplane3D & rotateSpanAroundY(T r)
Rotate the spanning vectors around the Y axis.
Hyperplane3D & normalTo(const Vector< T, 3 > &normal)
Calculate the spanning vectors of the hyperplane to be orthogonal to the given normal.
Vector< T, 3 > v
bool isYZPlane() const
Vector< T, 3 > origin
bool isXYPlane() const
Hyperplane3D & applyMatrixToSpan(const Vector< T, 3 > &row0, const Vector< T, 3 > &row1, const Vector< T, 3 > &row2)
Apply a matrix given by its row vectors to both span vectors.
Hyperplane3D & originAt(const Vector< T, 3 > &origin)
Center the hyperplane at the given origin vector.
efficient implementation of a vector class