24#ifndef HYPERPLANE_2D_HH
25#define HYPERPLANE_2D_HH
37 origin[0] = o[0] - 2*std::numeric_limits<T>::epsilon()*
util::fabs(o[0]);
38 origin[1] = o[1] - 2*std::numeric_limits<T>::epsilon()*
util::fabs(o[1]);
50 origin[0] = (cuboidOrigin[0] + 0.5 * deltaR * extend[0]);
51 origin[1] = (cuboidOrigin[1] + 0.5 * deltaR * extend[1]);
52 origin[0] -= 2*std::numeric_limits<T>::epsilon()*
util::fabs(origin[0]);
53 origin[1] -= 2*std::numeric_limits<T>::epsilon()*
util::fabs(origin[1]);
83 u = {normal[1], -normal[0]};
A regular single 2D cuboid is the basic component of a 2D cuboid structure which defines the grid.
Vector< int, 2 > const getExtent() const
Read only access to the number of voxels in every dimension.
T getDeltaR() const
Read access to the distance of cuboid nodes.
Vector< T, 2 > const getOrigin() const
Read only access to left lower corner coordinates.
cpu::simd::Pack< T > fabs(cpu::simd::Pack< T > value)
bool nearZero(const ADf< T, DIM > &a)
T dotProduct2D(const Vector< T, 2 > &a, const Vector< T, 2 > &b)
dot product, only valid in 2d
Top level namespace for all of OpenLB.
constexpr Vector< T, D > normalize(const ScalarVector< T, D, IMPL > &a, T scale=T{1})
#define OLB_POSTCONDITION(COND)
Definition of a analytical line embedded in 2D space.
Hyperplane2D & parallelTo(const Vector< T, 2 > &direction)
Set the direction of the line parallel to a vector.
bool isParallelToY() const
Hyperplane2D & centeredIn(const Cuboid2D< T > &cuboid)
Center the line relative to the given cuboid.
Hyperplane2D & originAt(const Vector< T, 2 > &origin)
Center the line at the given origin vector.
bool isParallelToX() const
Hyperplane2D & normalTo(const Vector< T, 2 > &normal)
Calculate the direction vector of the line to be orthogonal to the given normal.