Quaternion.h File Reference

Detailed Description

Header file for the implementation of a quaternion.

Author
Klaus Iglberger
Sebastian Eibl sebas.nosp@m.tian.nosp@m..eibl.nosp@m.@fau.nosp@m..de
#include "core/math/MathTrait.h"
#include "core/math/Utility.h"
#include "core/debug/Debug.h"
#include "core/debug/CheckFunctions.h"
#include "core/DataTypes.h"
#include "core/mpi/SendBuffer.h"
#include "core/mpi/RecvBuffer.h"
#include <core/logging/Logging.h>
#include <type_traits>
#include <cmath>
#include <istream>
#include <ostream>
#include <limits>

Classes

class  walberla::math::Matrix3< Type >
 Efficient, generic implementation of a 3x3 matrix. More...
 
class  walberla::math::Vector3< Type >
 Efficient, generic implementation of a 3-dimensional vector. More...
 
class  walberla::math::Quaternion< Type >
 Efficient implementation of a quaternion. More...
 
struct  walberla::mpi::BufferSizeTrait< walberla::math::Quaternion< VT > >
 
struct  walberla::VectorTrait< Quaternion< T > >
 

Namespaces

 walberla
 \file TimestepTracker.h \ingroup lbm \author Frederik Hennig frede.nosp@m.rik..nosp@m.henni.nosp@m.g@fa.nosp@m.u.de
 
 walberla::math
 
 walberla::mpi
 
 walberla::debug
 
 walberla::debug::check_functions_detail
 

Functions

template<typename T , typename G , typename VT >
mpi::GenericSendBuffer< T, G > & walberla::mpi::operator<< (mpi::GenericSendBuffer< T, G > &buf, const math::Quaternion< VT > &quat)
 
template<typename T , typename VT >
mpi::GenericRecvBuffer< T > & walberla::mpi::operator>> (mpi::GenericRecvBuffer< T > &buf, math::Quaternion< VT > &quat)
 
template<>
bool walberla::debug::check_functions_detail::check_float_equal (const math::Quaternion< real_t > &lhs, const math::Quaternion< real_t > &rhs)
 
template<>
bool walberla::debug::check_functions_detail::check_float_equal_eps (const math::Quaternion< real_t > &lhs, const math::Quaternion< real_t > &rhs, const real_t epsilon)
 
Quaternion operators
template<typename T1 , typename T2 >
bool walberla::math::operator== (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs)
 Equality operator for the comparison of two quaternions. More...
 
template<typename T1 , typename T2 >
bool walberla::math::operator!= (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs)
 Inequality operator for the comparison of two quaternions. More...
 
template<typename Type >
std::ostream & walberla::math::operator<< (std::ostream &os, const Quaternion< Type > &q)
 Global output operator for quaternions. More...
 
template<typename Type >
std::istream & walberla::math::operator>> (std::istream &is, Quaternion< Type > &q)
 Global input operator for quaternions. More...
 
template<typename Type >
bool walberla::math::isnan (const Quaternion< Type > &q)
 Checks the given quaternion for not-a-number elements. More...
 
template<typename Type >
void walberla::math::reset (Quaternion< Type > &q)
 Resetting the given quaternion. More...
 
template<typename Type >
void walberla::math::clear (Quaternion< Type > &q)
 Clearing the given quaternion. More...
 
template<typename Type >
bool walberla::math::isDefault (const Quaternion< Type > &q)
 Returns whether the given quaternion is in default state. More...
 
template<typename Type >
const Quaternion< Type > walberla::math::inv (const Quaternion< Type > &q)
 Inverting the given quaternion. More...
 
template<typename Type >
const Quaternion< Type > walberla::math::sq (const Quaternion< Type > &q)
 Squaring the given quaternion. More...
 
template<typename Type >
void walberla::math::swap (Quaternion< Type > &a, Quaternion< Type > &b)
 Swapping the contents of two quaternions. More...
 
Quaternion arithmetic operators

These operators support operations between quaternions of different element types.

They work for all element types supported by the MathTrait class template.

template<typename T1 , typename T2 >
const Quaternion< typename MathTrait< T1, T2 >::MultType > walberla::math::operator* (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs)
 Multiplication operator for the multiplication of two quaternions ( \( \hat{q}=\hat{p}*\hat{r} \)). More...
 
Quaternion operators
template<typename T1 , typename T2 >
bool walberla::math::operator== (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs)
 Equality operator for the comparison of two quaternions. More...
 
template<typename T1 , typename T2 >
bool walberla::math::operator!= (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs)
 Inequality operator for the comparison of two quaternions. More...
 
template<typename Type >
std::ostream & walberla::math::operator<< (std::ostream &os, const Quaternion< Type > &q)
 Global output operator for quaternions. More...
 
template<typename Type >
std::istream & walberla::math::operator>> (std::istream &is, Quaternion< Type > &q)
 Global input operator for quaternions. More...
 
template<typename Type >
bool walberla::math::isnan (const Quaternion< Type > &q)
 Checks the given quaternion for not-a-number elements. More...
 
template<typename Type >
void walberla::math::reset (Quaternion< Type > &q)
 Resetting the given quaternion. More...
 
template<typename Type >
void walberla::math::clear (Quaternion< Type > &q)
 Clearing the given quaternion. More...
 
template<typename Type >
bool walberla::math::isDefault (const Quaternion< Type > &q)
 Returns whether the given quaternion is in default state. More...
 
template<typename Type >
const Quaternion< Type > walberla::math::inv (const Quaternion< Type > &q)
 Inverting the given quaternion. More...
 
template<typename Type >
const Quaternion< Type > walberla::math::sq (const Quaternion< Type > &q)
 Squaring the given quaternion. More...
 
template<typename Type >
void walberla::math::swap (Quaternion< Type > &a, Quaternion< Type > &b)
 Swapping the contents of two quaternions. More...
 
Quaternion arithmetic operators

These operators support operations between quaternions of different element types.

They work for all element types supported by the MathTrait class template.

template<typename T1 , typename T2 >
const Quaternion< typename MathTrait< T1, T2 >::MultType > walberla::math::operator* (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs)
 Multiplication operator for the multiplication of two quaternions ( \( \hat{q}=\hat{p}*\hat{r} \)). More...