Header file for the implementation of a 2D vector.
#include "FPClassify.h"
#include "MathTrait.h"
#include "SqrtTrait.h"
#include "Utility.h"
#include "core/DataTypes.h"
#include "core/VectorTrait.h"
#include "core/debug/Debug.h"
#include "core/mpi/Datatype.h"
#include "core/mpi/RecvBuffer.h"
#include "core/mpi/SendBuffer.h"
#include <cmath>
#include <cstddef>
#include <iostream>
#include <limits>
#include <type_traits>
Classes | |
class | walberla::math::Vector2< Type > |
Efficient, generic implementation of a 2-dimensional vector. More... | |
struct | walberla::math::Vector2LexicographicalyLess< T > |
Functor providing a lexicographical ordering for Vector2. More... | |
struct | walberla::mpi::BufferSizeTrait< walberla::math::Vector2< VT > > |
struct | walberla::MPITrait< Vector2< T > > |
struct | walberla::VectorTrait< Vector2< T > > |
struct | std::hash< walberla::Vector2< T > > |
Namespaces | |
walberla | |
\file TimestepTracker.h \ingroup lbm \author Frederik Hennig frede rik. henni g@fa u.de | |
walberla::math | |
walberla::mpi | |
Macros | |
#define | HIGH typename MathTrait<Type,Other>::High |
High-order return value. More... | |
Functions | |
template<typename T , typename G , typename VT > | |
mpi::GenericSendBuffer< T, G > & | walberla::mpi::operator<< (mpi::GenericSendBuffer< T, G > &buf, const Vector2< VT > &vec) |
template<typename T , typename VT > | |
mpi::GenericRecvBuffer< T > & | walberla::mpi::operator>> (mpi::GenericRecvBuffer< T > &buf, Vector2< VT > &vec) |
Vector2 operators | |
template<typename T > | |
Vector2< T > & | walberla::math::normalize (Vector2< T > &v) |
Normalization of the vector ( \(|\vec{a}|=1\)). More... | |
template<typename Type > | |
bool | walberla::math::operator== (unsigned char scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of an unsigned char scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (char scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a char scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (signed char scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a signed char scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (wchar_t scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a wchar_t scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (unsigned short scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of an unsigned short scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (short scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a short scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (unsigned int scalar, const Vector2< Type > &vec) |
template<typename Type > | |
bool | walberla::math::operator== (int scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of an int scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (unsigned long scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of an unsigned long scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (long scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a long scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (float scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a float scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (double scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a double scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (long double scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a long double scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (unsigned char scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of an unsigned char scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (char scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a char scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (signed char scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a signed char scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (wchar_t scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a wchar_t scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (unsigned short scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of an unsigned short scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (short scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a short scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (unsigned int scalar, const Vector2< Type > &vec) |
template<typename Type > | |
bool | walberla::math::operator!= (int scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of an int scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (unsigned long scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of an unsigned long scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (long scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a long scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (float scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a float scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (double scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a double scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (long double scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a long double scalar value and a vector. More... | |
template<typename Type > | |
std::ostream & | walberla::math::operator<< (std::ostream &os, const Vector2< Type > &v) |
Global output operator for 2-dimensional vectors. More... | |
template<typename Type > | |
std::istream & | walberla::math::operator>> (std::istream &is, Vector2< Type > &v) |
Global input operator for 2-dimensional vectors. More... | |
template<typename Type > | |
bool | walberla::math::isnan (const Vector2< Type > &v) |
Checks the given vector for not-a-number elements. More... | |
template<typename Type > | |
const Vector2< Type > | walberla::math::abs (const Vector2< Type > &v) |
Returns a vector containing the absolute values of each single element of v. More... | |
template<typename Type > | |
const Vector2< Type > | walberla::math::fabs (const Vector2< Type > &v) |
Returns a vector containing the absolute values of each single element of v. More... | |
template<typename Type , typename Other > | |
std::enable_if< std::is_fundamental< Other >::value, Vector2< typename MathTrait< Type, Other >::High > >::type | walberla::math::operator* (Other scalar, const Vector2< Type > &vec) |
Multiplication operator for the multiplication of a scalar value and a vector. More... | |
template<> | |
std::istream & | walberla::math::operator>> (std::istream &is, Vector2< bool > &v) |
Specialization for input operator for 2-dimensional vectors of bool. More... | |
template<typename T , typename Enable = std::enable_if_t<std::is_integral<T>::value>> | |
std::size_t | walberla::math::hash_value (const Vector2< T > &v) |
Function providing a hash value for Vector2. More... | |
Vector2 operators | |
template<typename T > | |
Vector2< T > & | walberla::math::normalize (Vector2< T > &v) |
Normalization of the vector ( \(|\vec{a}|=1\)). More... | |
template<typename Type > | |
bool | walberla::math::operator== (unsigned char scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of an unsigned char scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (char scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a char scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (signed char scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a signed char scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (wchar_t scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a wchar_t scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (unsigned short scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of an unsigned short scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (short scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a short scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (unsigned int scalar, const Vector2< Type > &vec) |
template<typename Type > | |
bool | walberla::math::operator== (int scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of an int scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (unsigned long scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of an unsigned long scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (long scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a long scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (float scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a float scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (double scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a double scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator== (long double scalar, const Vector2< Type > &vec) |
Equality operator for the comparison of a long double scalar and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (unsigned char scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of an unsigned char scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (char scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a char scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (signed char scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a signed char scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (wchar_t scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a wchar_t scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (unsigned short scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of an unsigned short scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (short scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a short scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (unsigned int scalar, const Vector2< Type > &vec) |
template<typename Type > | |
bool | walberla::math::operator!= (int scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of an int scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (unsigned long scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of an unsigned long scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (long scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a long scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (float scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a float scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (double scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a double scalar value and a vector. More... | |
template<typename Type > | |
bool | walberla::math::operator!= (long double scalar, const Vector2< Type > &vec) |
Inequality operator for the comparison of a long double scalar value and a vector. More... | |
template<typename Type > | |
std::ostream & | walberla::math::operator<< (std::ostream &os, const Vector2< Type > &v) |
Global output operator for 2-dimensional vectors. More... | |
template<typename Type > | |
std::istream & | walberla::math::operator>> (std::istream &is, Vector2< Type > &v) |
Global input operator for 2-dimensional vectors. More... | |
template<typename Type > | |
bool | walberla::math::isnan (const Vector2< Type > &v) |
Checks the given vector for not-a-number elements. More... | |
template<typename Type > | |
const Vector2< Type > | walberla::math::abs (const Vector2< Type > &v) |
Returns a vector containing the absolute values of each single element of v. More... | |
template<typename Type > | |
const Vector2< Type > | walberla::math::fabs (const Vector2< Type > &v) |
Returns a vector containing the absolute values of each single element of v. More... | |
template<typename Type , typename Other > | |
std::enable_if< std::is_fundamental< Other >::value, Vector2< typename MathTrait< Type, Other >::High > >::type | walberla::math::operator* (Other scalar, const Vector2< Type > &vec) |
Multiplication operator for the multiplication of a scalar value and a vector. More... | |
template<> | |
std::istream & | walberla::math::operator>> (std::istream &is, Vector2< bool > &v) |
Specialization for input operator for 2-dimensional vectors of bool. More... | |
template<typename T , typename Enable = std::enable_if_t<std::is_integral<T>::value>> | |
std::size_t | walberla::math::hash_value (const Vector2< T > &v) |
Function providing a hash value for Vector2. More... | |
#define HIGH typename MathTrait<Type,Other>::High |
High-order return value.
Abbreviation for the evaluation of the higher-order data type in a numerical operation.