OpenLB 1.7
|
Set of functions commonly used in LB computations – header file. More...
#include <sstream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <type_traits>
#include "core/baseType.h"
#include "core/vector.h"
#include "utilities/vectorHelpers.h"
#include "meta.h"
#include "utilities/omath.h"
#include "utilities/oalgorithm.h"
#include "dynamics/descriptorFunction.h"
Go to the source code of this file.
Classes | |
struct | olb::util::TensorVal< DESCRIPTORBASE > |
Compute number of elements of a symmetric d-dimensional tensor. More... | |
Namespaces | |
namespace | olb |
Top level namespace for all of OpenLB. | |
namespace | olb::util |
namespace | olb::util::tensorIndices2D |
namespace | olb::util::tensorIndices3D |
Enumerations | |
enum | { olb::util::tensorIndices2D::xx =0 , olb::util::tensorIndices2D::xy =1 , olb::util::tensorIndices2D::yy =2 } |
enum | { olb::util::tensorIndices3D::xx =0 , olb::util::tensorIndices3D::xy =1 , olb::util::tensorIndices3D::xz =2 , olb::util::tensorIndices3D::yy =3 , olb::util::tensorIndices3D::yz =4 , olb::util::tensorIndices3D::zz =5 } |
Functions | |
template<typename T > | |
T | olb::util::norm (const std::vector< T > &a) |
l2 norm of a vector of arbitrary length | |
template<typename T > | |
int | olb::util::sign (T val) |
template<typename T > | |
bool | olb::util::aligned_to_x (const std::vector< T > &vec) |
template<typename T > | |
bool | olb::util::aligned_to_y (const std::vector< T > &vec) |
template<typename T > | |
bool | olb::util::aligned_to_z (const std::vector< T > &vec) |
template<typename T > | |
bool | olb::util::aligned_to_grid (const std::vector< T > &vec) |
bool | olb::util::intersect (int x0, int x1, int y0, int y1, int x0_, int x1_, int y0_, int y1_, int &newX0, int &newX1, int &newY0, int &newY1) |
bool | olb::util::intersect (int x0, int x1, int y0, int y1, int z0, int z1, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int &newX0, int &newX1, int &newY0, int &newY1, int &newZ0, int &newZ1) |
bool | olb::util::contained (int x, int y, int x0, int x1, int y0, int y1) |
bool | olb::util::contained (int x, int y, int z, int x0, int x1, int y0, int y1, int z0, int z1) |
template<typename T > | |
T | olb::util::sqr (T arg) |
template<typename ARRAY_LIKE , unsigned D> | |
auto | olb::util::normSqr (const ARRAY_LIKE &u) any_platform |
Compute norm square of a d-dimensional vector. | |
template<unsigned D, typename ARRAY_LIKE > | |
auto | olb::util::norm (const ARRAY_LIKE &u) |
template<typename T , unsigned D> | |
T | olb::util::normSqr (const T *u) any_platform |
template<typename T > | |
T | olb::util::normSqr (std::initializer_list< T > data) |
template<typename T , unsigned D, typename IMPL > | |
T | olb::util::normSqr (const ScalarVector< T, D, IMPL > &u) any_platform |
Compute norm square of a d-dimensional vector. | |
template<typename T , int d> | |
T | olb::util::scalarProduct (const T u1[d], const T u2[d]) |
template<typename T > | |
T | olb::util::scalarProduct (const std::vector< T > &u1, const std::vector< T > &u2) |
template<typename DESCRIPTOR , unsigned iVel, int value> | |
constexpr auto | olb::util::populationsContributingToVelocity () any_platform |
Return array of population indices where c[iVel] == value. | |
template<typename DESCRIPTOR , int... NORMAL> | |
constexpr auto | olb::util::populationsContributingToDirection () any_platform |
Return array of population indices where c[iPop][iD] == NORMAL[iD]. | |
template<typename DESCRIPTORBASE > | |
int | olb::util::findVelocity (const int v[DESCRIPTORBASE::d]) any_platform |
template<typename DESCRIPTOR , int direction, int orientation> | |
constexpr auto | olb::util::subIndexOutgoing () any_platform |
Compute opposites of wall-incoming population indices. | |
template<typename DESCRIPTOR , int direction, int orientation> | |
constexpr auto | olb::util::subIndexOutgoingRemaining () any_platform |
template<typename DESCRIPTOR , int plane, int normal1, int normal2> | |
constexpr auto | olb::util::subIndexOutgoing3DonEdges () any_platform |
template<typename DESCRIPTOR , int normalX, int normalY> | |
constexpr auto | olb::util::subIndexOutgoing2DonCorners () any_platform |
template<typename DESCRIPTOR , int normalX, int normalY, int normalZ> | |
constexpr auto | olb::util::subIndexOutgoing3DonCorners () any_platform |
template<typename DESCRIPTORBASE > | |
std::vector< int > | olb::util::remainingIndexes (const std::vector< int > &indices) |
finds all the remaining indexes of a lattice given some other indexes | |
template<typename T , typename DESCRIPTOR > | |
int | olb::util::get_nearest_link (const std::vector< T > &vec) |
Util Function for Wall Model of Malaspinas get link with smallest angle to a vector. | |
template<typename T , typename DESCRIPTOR > | |
T | olb::util::densityFromPressure (T latticePressure) |
compute lattice density from lattice pressure | |
template<typename T , typename DESCRIPTOR > | |
T | olb::util::pressureFromDensity (T latticeDensity) |
compute lattice pressure from lattice density | |
template<typename T > | |
std::enable_if_t< std::is_arithmetic< T >::type::value, T > | olb::abs (T x) |
Set of functions commonly used in LB computations – header file.
Definition in file util.h.